Extends getNestedValue() in apps/apollo/src/lib/triggers/webhook_ingress/field_resolver.ts to treat canonical numeric segments (0, 1, 42) as array indices when the current value is an Array. Non-canonical forms (01, +0, -0, 1.5) and non-numeric segments on arrays resolve to undefined.
Batched webhook providers need signature/handshake field references resolved on the raw body before the event_parser splits the batch. Signature verification runs at trigger_event.ts:279, well before parseEvents() at :320, so the path engine must be able to reach into the array on the raw body.
Concrete driver: the outlook V2 cutover (mercury PR — link to follow) needs the signature spec to look at json_body.value.0.clientState because Microsoft Graph echoes the per-subscription clientState inside every item of value[] rather than at the top level.
Backward-compatible by construction. Previously every path segment took the isRecord(current) branch, so a numeric segment on an array always returned undefined. No existing reference spec relies on that behavior — every shipped spec resolves through records only.
01), non-numeric segment on array, and the existing happy paths preserved.field_resolver.test.ts cases pass (24 original + 6 new).webhook_ingress/ suite pass — no regressions on signature, handshake, event_parser, or types.✓ src/lib/triggers/webhook_ingress/field_resolver.test.ts (30 tests) 4ms
Test Files 5 passed (5)
Tests 87 passed (87)
This PR MUST land before the matching mercury bundle is pushed. The outlook trigger-config.ts in the mercury PR references json_body.value.0.clientState; without this extension, old apollo cannot resolve that path and signature verification returns 401 on every notification for newly-created outlook trigger instances.
🤖 Generated with Claude Code
Based on git blame analysis of 2 file(s):
| Contributor | Contribution | Files |
|---|---|---|
| Anshu Garg | 100% | 2 |
Recommend Anshu Garg — they made the most recent edits (today) to both files and have full context on the webhook_ingress field resolver changes. If you want a second reviewer, pick someone on the Apollo/webhook-ingress area who’s familiar with the trigger/path handling.
🤖 Based on git blame with recency weighting (recent edits count more).
:white_check_mark: All modified and coverable lines are covered by tests.
| Flag | Coverage Δ | |
|---|---|---|
| e2e-tests | 6.03% <0.00%> (-0.01%) | :arrow_down: |
| self-hosted-tests | 5.58% <0.00%> (-0.01%) | :arrow_down: |
| unit-tests | 58.95% <100.00%> (+<0.01%) | :arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...src/lib/triggers/webhook_ingress/field_resolver.ts | 94.61% <100.00%> (+0.49%) | :arrow_up: |
... and 4 files with indirect coverage changes