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
{{ message }}
Repository navigation
hook-telemetry: envelope schema validates nothing while ten suites hand-transcribe the field list (deepening candidate) #3410
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.
Category: Task (confirmed, and slightly worse than filed). State: verified → blocked by #3408 decision. Work class:structural. Priority:medium.
Blocked by #3408, recorded as a native dependency edge. #3408 is the decision carrier for this cluster; one human touch there unblocks this.
Re-verification against current main (2026-09-06)
Both claims hold, and the second has grown:
The schema still validates nothing. A repo-wide search for references to the envelope schema file finds it named only in its own definition and in the convention README beside it. No script, no suite, no check executes it. It remains a published interface with no adapter, exactly as filed.
The hand-transcribed field list has spread from ten copies to eleven. The same literal field-list loop now appears in the ten suites originally named plus the shared library's own test suite. Ten days, one more copy. That is the strongest available evidence that transcription is the path of least resistance here and will keep being taken until the shared check exists.
The failure mode cited in the body (a transcribed assertion going vacuous while still appearing to pass) is not hypothetical; the referenced commit is a worked instance of it.
Why blocked rather than agent-ready
The work itself is well-specified, but where the shared check may live is the same question #3408 carries. These suites sit in ten different plugins, so a helper they all consume is cross-plugin shared code, which the vendoring ADR governs, while the shell-test-helpers convention separately governs where shared test code may live and draws a line between the repo-tooling layer and per-plugin suites. The body flags this reconciliation as needed and does not resolve it.
Answering it independently here would risk contradicting whatever #3408 decides for the production-side prologue, and having the test layer and the production layer land on different answers is worse than either answer.
The scope is clear and the acceptance criteria in the body are sound. Two points worth carrying forward:
The non-vacuity assertion is the important one. A shared check that never fails is exactly the failure this issue exists to prevent, so the helper's own suite must prove a malformed envelope fails it. Without that, the change substitutes one unverified assertion for eleven.
The stdout-parity assertion must stay per-suite and stay pointed at real captured output. It is a different property from schema conformance (the envelope must not appear on the hook's own stdout), and folding it into the shared check would lose it.
One addition to the body's criteria: the schema file should gain a consumer test as well as a consumer, so that a future change deleting the last caller fails rather than silently returning the schema to its current orphaned state.
Decision packet. This comes from the 2026-09-29 audit of the Cursor run. The issue is reopened and needs an owner decision.
1. What happened
It was closed COMPLETED by #4980 with none of its 3 criteria met. #4980 parked the check as "Option A: park until funded", citing #3408 (closed 2026-09-27T19:48Z as obsolete, with no ruling on where shared test code lives) and #3412 (closed, no delivered ruling). Fix PR #5313 (draft) removes that text and restores the baseline hook-telemetry README and CHANGELOG (git diff 7acaf085 -- docs/conventions/hook-telemetry is empty). It implements no option.
2. Question
Build the schema-driven envelope check, and where, or keep envelope.schema.json documentation-only?
Settle #3412 first, then do A in the home it picks. Basis: the 2026-09-06 triage on this issue ("answering it independently here would risk contradicting whatever #3408 decides"; "what is ready the moment #3408 resolves" names the non-vacuity assertion and the per-suite stdout-parity assertion as must-keep) and the #3412 triage (19 of 34 suites already consume plugin-local helpers).
5. Unblocks
A scoped implementation brief with criteria: schema executed by one code path, loops replaced, malformed envelope fails, consumer test. Kept status: needs-decision.
Owner decision (2026-09-29): Settle #3412 first, then build the schema-driven envelope check (option A) in the home #3412 selects. Owner's words: "Accept recommendation: Settle #3412 first, then A in that home."
Depends on #3412 (open): its owner ruling is recorded (plugin-local helper for the formatter family, option 1) but not yet implemented or closed, and it does not by itself name the home for the cross-plugin envelope check.
Next: once #3412 lands, an agent builds the check in that home: schema executed by one code path, the 11 transcribed field loops replaced, a malformed envelope proven to fail, a consumer test so the schema cannot return to orphan, and the per-suite stdout-parity assertion kept.
Activity
feat(formatters): emit data.changed so the per-session rewrote report…
feat(hook-telemetry): carry the correlation keys on the envelope spin…
kyle-sexton commentedon Sep 6, 2026
This was generated by AI during triage.
Claimed for triage by autonomous lane instance
vm-triage-202609050304. Lease expires 2026-09-06T20:15:00Z. Triage claim only, not an execution claim.Generated by Claude Code
kyle-sexton commentedon Sep 6, 2026
This was generated by AI during triage.
Triage verdict
Category: Task (confirmed, and slightly worse than filed). State: verified → blocked by #3408 decision. Work class:
structural. Priority:medium.Blocked by #3408, recorded as a native dependency edge. #3408 is the decision carrier for this cluster; one human touch there unblocks this.
Re-verification against current
main(2026-09-06)Both claims hold, and the second has grown:
The failure mode cited in the body (a transcribed assertion going vacuous while still appearing to pass) is not hypothetical; the referenced commit is a worked instance of it.
Why blocked rather than agent-ready
The work itself is well-specified, but where the shared check may live is the same question #3408 carries. These suites sit in ten different plugins, so a helper they all consume is cross-plugin shared code, which the vendoring ADR governs, while the shell-test-helpers convention separately governs where shared test code may live and draws a line between the repo-tooling layer and per-plugin suites. The body flags this reconciliation as needed and does not resolve it.
Answering it independently here would risk contradicting whatever #3408 decides for the production-side prologue, and having the test layer and the production layer land on different answers is worse than either answer.
What is ready the moment #3408 resolves
The scope is clear and the acceptance criteria in the body are sound. Two points worth carrying forward:
One addition to the body's criteria: the schema file should gain a consumer test as well as a consumer, so that a future change deleting the last caller fails rather than silently returning the schema to its current orphaned state.
Triage claim released by
vm-triage-202609050304.Generated by Claude Code
docs(hook-telemetry): park envelope schema validation (#3410)
docs(hook-telemetry): park envelope schema validation (#3410) (#4980)
kyle-sexton commentedon Sep 29, 2026
Decision packet. This comes from the 2026-09-29 audit of the Cursor run. The issue is reopened and needs an owner decision.
1. What happened
It was closed COMPLETED by #4980 with none of its 3 criteria met. #4980 parked the check as "Option A: park until funded", citing #3408 (closed 2026-09-27T19:48Z as obsolete, with no ruling on where shared test code lives) and #3412 (closed, no delivered ruling). Fix PR #5313 (draft) removes that text and restores the baseline hook-telemetry README and CHANGELOG (
git diff 7acaf085 -- docs/conventions/hook-telemetryis empty). It implements no option.2. Question
Build the schema-driven envelope check, and where, or keep
envelope.schema.jsondocumentation-only?3. Options
scripts/lib/test-harness.sh). Replace the eleven transcribedfor field in schema_version timestamp hook hook_event status duration_ms dataloops (ten plugin suites pluslib/hook-utils.test.sh, re-measured 2026-09-28). The helper's own suite proves a malformed envelope fails it, and a consumer test keeps the schema from returning to orphan.4. Recommended (not decided)
Settle #3412 first, then do A in the home it picks. Basis: the 2026-09-06 triage on this issue ("answering it independently here would risk contradicting whatever #3408 decides"; "what is ready the moment #3408 resolves" names the non-vacuity assertion and the per-suite stdout-parity assertion as must-keep) and the #3412 triage (19 of 34 suites already consume plugin-local helpers).
5. Unblocks
A scoped implementation brief with criteria: schema executed by one code path, loops replaced, malformed envelope fails, consumer test. Kept
status: needs-decision.docs(conventions): revert agent rulings on owner-reserved issues and …
kyle-sexton commentedon Sep 29, 2026
Owner decision (2026-09-29): Settle #3412 first, then build the schema-driven envelope check (option A) in the home #3412 selects. Owner's words: "Accept recommendation: Settle #3412 first, then A in that home."
Depends on #3412 (open): its owner ruling is recorded (plugin-local helper for the formatter family, option 1) but not yet implemented or closed, and it does not by itself name the home for the cross-plugin envelope check.
Next: once #3412 lands, an agent builds the check in that home: schema executed by one code path, the 11 transcribed field loops replaced, a malformed envelope proven to fail, a consumer test so the schema cannot return to orphan, and the per-suite stdout-parity assertion kept.
refactor(hooks): share one telemetry-sink test helper across the 14 i…
refactor(hooks): assert telemetry envelopes through the schema-driven…