ci: delete unwired pr-linkage-mcp-gate and assert hook wiring liveness - #3098
Conversation
#2188 stripped repo-local hook wiring; the leftover script kept claiming enforcement. Delete it (policy already lives in the plugin hook + required CI) and fail hygiene when a .claude/hooks/*.sh is not referenced by settings.json commands or env. Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Claude finished @kyle-sexton's task in 3m 20s —— View job Claude finished the code review
SummaryNo blocking or high-signal findings. This is the Reviewed:
Both new scripts carry the One non-blocking note: this sandbox's checkout has stray untracked copies of the two deleted files ( I did not independently execute |
|
Claude finished @kyle-sexton's task in 1m 19s —— View job Security Review
No security issues found. This PR is CI/tooling-only: it deletes an already-unwired repo-local hook ( Verification performed:
No CRITICAL, IMPORTANT, or SUGGESTION findings to report. |
|
Last security-reviewed head: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd233ccfb9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude has reviewed this PR 2 times. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…3100) ## Summary Compress the session-flow handoff instruction walk (`save-point.md`, `structure.md`, `skills/handoff/SKILL.md`) under docs-hygiene flavor-only discipline. Re-review the Stop-hook escalation from #3018; no defect found, hook not shipped. ## Fix Author-time compression of the three named files: drop filler and verbose verbs that do not carry contract meaning. Preserve find-handoff detection contract (rails, copy instruction, `Read @…-handoff-…` directive, `Re-arm <i> of <n> — <L> lines:`), redaction rules, rooted-path / `Handoff origin:` rationale, and STOP / output-order contract. Bump session-flow 0.32.2 → 0.32.3. Stop-hook re-review: 0.26.1 already shipped the STOP/output-order contract; one observed occurrence; find-handoff rung 1 still recovers file-mode; the 0.22% cut does not change occupancy. No hook change. ## Test plan - [x] `markdownlint-cli2` on the three compressed files + CHANGELOG: 0 issues - [x] `scripts/changelog-parity.sh --check --check-bump origin/main --check-order --check-preserved origin/main` - [x] Contract tokens remain: rails, copy instruction, Read @…-handoff-…, Re-arm header, redaction markers, STOP / output-order - [x] Byte delta vs author-time snapshots: 188 B / 0.22% (save-point 152 B, structure 27 B, SKILL 9 B) ## Verification - `markdownlint-cli2` on the three files + CHANGELOG: 0 issues. - Changelog-parity `--check`, `--check-bump origin/main`, `--check-order`, `--check-preserved origin/main`: all pass. - Contract-token grep: rails, copy instruction, `Read @…-handoff-…`, `Re-arm <i> of <n> — <L> lines:`, redaction markers, STOP / output-order all still present. - Byte savings vs `/tmp/wt-3018-snap`: save-point 40831→40679 (152 B), structure 23296→23269 (27 B), SKILL 19641→19632 (9 B); total 188 B / 0.22%. ## Related - Closes #3018 - Follows #3097 / #3098 / #3099 - Stop-hook re-review; no defect — hook not shipped Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Drop the comment-only source-control edits that reused a published version. Bound hook-name matching so a longer sibling cannot satisfy a shorter basename. Stop naming the SessionStart bootstrap in the new scripts (it chained affected-tests off actionlint.yaml). Use "invalid JSON" instead of the typos-flagged spelling. Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Claude finished @cursor[bot]'s task in 2m 32s —— View job Code review
SummaryNo blocking or high-signal findings. This PR was already reviewed by this lane at Codex's P2 finding (unbounded Also checked:
|
Closes #2959
Closes #2960
Summary
Delete the dead repo-local hook
.claude/hooks/pr-linkage-mcp-gate.sh(and its unused test) and add a hygiene-lane wiring-liveness check so the same class cannot ship green again.#2188 stripped project hook wiring as a bare-baseline reset: an instruction returns only with ledger evidence. #2655 restored SessionStart only. The leftover script kept claiming it loaded in every session while
.claude/settings.jsonno longer named it. Policy enforcement already survives via the source-control plugin hook plus required CIpr-issue-linkage. This PR does not rewire the stripped hook.The new check requires every
.claude/hooks/*.shexcept*.test.shto be referenced bysettings.jsonhook commands (or args) or itsenvblock, which is howhook-telemetry-sink.shstays live viaHOOK_TELEMETRY_SINK.Fix
.claude/hooks/pr-linkage-mcp-gate.shand.claude/hooks/pr-linkage-mcp-gate.test.sh. Nothing else invoked the test, and the plugin copy plus required CI remain the enforcement path.scripts/check-hook-wiring-liveness.shin the hygiene lane: every non-test.claude/hooks/*.shmust appear insettings.jsonhook commands/args orenv, with a bounded path-segment match sonot-gate.shdoes not satisfygate.sh.scripts/check-hook-wiring-liveness.test.sh), then the gate, then feedhook-wiring-livenessinto the existing hygiene aggregator.Test plan
bash scripts/check-hook-wiring-liveness.shon the pre-delete tree (dead script still present) exits 1 and names.claude/hooks/pr-linkage-mcp-gate.sh.bash scripts/check-hook-wiring-liveness.test.sh— all assertions passed, including the pre-delete replica,*.test.shexclusion, command- and args-form wiring, bounded basename match, fail-closed missing/invalid settings, and a live-checkout pin.bash plugins/source-control/hooks/pr-linkage-mcp-gate.test.sh— 24/24 (plugin copy unchanged).bash .claude/hooks/hook-telemetry-sink.test.sh— PASS.shellcheckon the new scripts — clean.bash scripts/affected-tests.sh .github/actionlint.yaml— empty selection (the new suite no longer names a file that chains from that probe).Verification
Pre-delete run of the new gate exited 1 naming
pr-linkage-mcp-gate.sh. Post-delete run exited 0. The contract suite passed locally, including the #2959 replica and the bounded-match case. Plugin MCP-gate tests stayed 24/24. The first CI cycle failed on typos (unparseable), changelog-parity (comment-only plugin edits), plugin-gate (affected-tests R3/R4 via a bootstrap filename), and PR-body## Fix/## Verificationsections; those are the fixes in this update.Related