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
docs/conventions/hook-telemetry/envelope.schema.json is a published interface with no adapter: a repo-wide grep across *.sh / *.mjs / *.py / *.json finds no consumer beyond its own $id line (reproduced 2026-08-27). Nothing executes it.
Meanwhile the literal line for field in schema_version timestamp hook hook_event status duration_ms data; do appears in 10 test suites (go-format:351, ruff-format:380, biome-format:351, bash-format:508, powershell-format:930, typos-format:1586, markdown-format:1886 and 1933, actionlint:301, eol-normalizer:213), each followed by the same four-line jq -e "has(...)" body. Each copy is a hand transcription of the schema, and a transcription can go vacuous without any gate noticing: #3394 (d6e7830) is the concrete failure, where go-format's stdout-leak assertion grepped a variable the telemetry run never assigned and "passed unconditionally ... leaving the stdout-parity contract unguarded while appearing tested."
Deletion test: concentrates. Two adapters are natural: producers emit envelopes in production, and one schema-driven check consumes them in tests.
Proposed work
One envelope-check helper driven by the actual schema file (the pinned check-jsonschema is already in the toolchain), consumed by the suites in place of the transcribed loops.
Make the check provably non-vacuous: a deliberately malformed envelope must fail it (asserted in the helper's own suite).
Keep the per-suite stdout-parity assertion (envelope never on the hook's own stdout), pointed at real captured output.
Acceptance criteria
envelope.schema.json is executed by at least one code path (the shared check), with the schema file as the single source of the field list.
The ten transcription loops are replaced by calls to the shared check.
A malformed envelope demonstrably fails the check (mutation-style assertion in the helper's suite).
Constraint to weigh: docs/conventions/shell-test-helpers/README.md governs where shared test code may live; this proposal should be reconciled with it (repo-tooling layer vs per-plugin suites).
Parent candidate: the shared formatter-hook prologue (filed separately, top recommendation).
Found by the /architecture:improve deepening scan (2026-08-27); shallow-signal reproduced before filing. Dependency category: local-substitutable. Recommendation: Strong.
Context
docs/conventions/hook-telemetry/envelope.schema.jsonis a published interface with no adapter: a repo-wide grep across*.sh/*.mjs/*.py/*.jsonfinds no consumer beyond its own$idline (reproduced 2026-08-27). Nothing executes it.Meanwhile the literal line
for field in schema_version timestamp hook hook_event status duration_ms data; doappears in 10 test suites (go-format:351, ruff-format:380, biome-format:351, bash-format:508, powershell-format:930, typos-format:1586, markdown-format:1886 and 1933, actionlint:301, eol-normalizer:213), each followed by the same four-linejq -e "has(...)"body. Each copy is a hand transcription of the schema, and a transcription can go vacuous without any gate noticing: #3394 (d6e7830) is the concrete failure, where go-format's stdout-leak assertion grepped a variable the telemetry run never assigned and "passed unconditionally ... leaving the stdout-parity contract unguarded while appearing tested."Deletion test: concentrates. Two adapters are natural: producers emit envelopes in production, and one schema-driven check consumes them in tests.
Proposed work
check-jsonschemais already in the toolchain), consumed by the suites in place of the transcribed loops.Acceptance criteria
envelope.schema.jsonis executed by at least one code path (the shared check), with the schema file as the single source of the field list.References
docs/conventions/hook-telemetry/envelope.schema.json,docs/conventions/hook-telemetry/README.mddocs/conventions/shell-test-helpers/README.mdgoverns where shared test code may live; this proposal should be reconciled with it (repo-tooling layer vs per-plugin suites)./architecture:improvedeepening scan (2026-08-27); shallow-signal reproduced before filing. Dependency category: local-substitutable. Recommendation: Strong.