You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(testing): fold field_absent + envelope_field_absent into #1045
Per @bokelley's review comment: both checks share the same handler path
as `envelope_field_present`, so the runtime delta is a single
`validateFieldAbsent` function and two `case` entries in the switch.
- `field_absent` / `envelope_field_absent` added to
`StoryboardValidationCheck` type union
- `validateFieldAbsent`: passes when path is absent (undefined/null),
fails when present — mirrors `validateFieldPresent` semantics inverted
- Drift detector: both checks collected by `collectFieldValidations` but
skip reachability assertions (absence checks have no schema target)
- 6 new tests in `storyboard-validations.test.js` (pass/fail/no-path
for both `field_absent` and `envelope_field_absent`)
- Changeset updated to list all five new check types; removes the
"future PR" note since they ship here
Unlocks the `v3-envelope-integrity.yaml` TODO block's MUST-NOT
assertions (`task_status`/`response_status`) without a second SDK
release.
https://claude.ai/code/session_01R6VkP124L1RGqVART85gxo
Storyboards that assert v3 envelope-level fields (`status`, `task_id`, `message`, `replayed`, `governance_context`, `timestamp`, `context_id`, `push_notification_config`) need a way to tell static drift detection to walk `protocol-envelope.json` instead of the per-tool response schema. The previous un-prefixed checks pointed at the inner response schema, which doesn't contain envelope fields, so the `v3-envelope-integrity.yaml` storyboard required a `VERIFIER_UNREACHABLE` exemption.
8
8
9
-
Adds three envelope-scoped`StoryboardValidationCheck` values:
9
+
Adds five new`StoryboardValidationCheck` values:
10
10
11
+
-`field_absent` — passes when the path is absent; fails when present (companion to `field_present`)
12
+
-`envelope_field_absent` — envelope-scoped companion to `field_absent`; signals drift detection to walk `protocol-envelope.json`; absence checks skip reachability assertions by design
11
13
-`envelope_field_present` — companion to `field_present`
12
14
-`envelope_field_value` — companion to `field_value`
13
15
-`envelope_field_value_or_absent` — companion to `field_value_or_absent`
14
16
15
17
**Runtime**: identical semantics to the un-prefixed checks — `TaskResult` already exposes envelope fields at its surface (`data.status`, `data.task_id`, etc.), so the dispatcher passes through to the existing handlers. Result objects report the original check name verbatim so reporters can distinguish. The same passthrough lands in `scripts/conformance-replay.ts` so storyboard replay grades the new checks.
16
18
17
-
**Drift detection**: walks `ProtocolEnvelopeSchema` (from `core/protocol-envelope.json`) instead of `TOOL_RESPONSE_SCHEMAS[task]` for envelope-scoped entries. The existing un-prefixed checks stay pinned to inner-response schemas.
19
+
**Drift detection**: walks `ProtocolEnvelopeSchema` (from `core/protocol-envelope.json`) instead of `TOOL_RESPONSE_SCHEMAS[task]` for envelope-scoped entries. `field_absent` and `envelope_field_absent` are collected by the drift detector but skip reachability assertions — absence checks have no schema target by design.
18
20
19
21
**Not envelope fields**: `errors` lives inside `payload` (per the per-tool response schema), and `adcp_version` / `adcp_major_version` are request-side only — these stay on the un-prefixed checks.
20
22
21
-
Forward-compatible with the current 3.0.1 storyboards (no consumers yet). Lights up when the upstream PR migrates `v3-envelope-integrity.yaml` from `field_present: status` to `envelope_field_present: status` (the `VERIFIER_UNREACHABLE` exemption gets dropped after the next `npm run sync-schemas` post-3.0.2).
22
-
23
-
A future PR will add `field_absent` + `envelope_field_absent` runner support so `v3-envelope-integrity.yaml` can land its currently-TODO `task_status` / `response_status` MUST-NOT assertions.
23
+
Forward-compatible with the current 3.0.1 storyboards. Lights up when the upstream PR migrates `v3-envelope-integrity.yaml` from `field_present: status` to `envelope_field_present: status` (the `VERIFIER_UNREACHABLE` exemption gets dropped after the next `npm run sync-schemas` post-3.0.2). The `task_status` / `response_status` MUST-NOT assertions in `v3-envelope-integrity.yaml` can now land using `field_absent` / `envelope_field_absent` without a further SDK release.
0 commit comments