feat(ci): silent-skip gate for hook prerequisite visibility - #391
Conversation
Adds scripts/check-silent-skips.sh (+ unit tests, + a dedicated ci.yml lane wired into ci-status): a grep-level tripwire failing any hook entry script that quietly no-ops when a CLI prerequisite is absent — the `command -v X || exit 0` shape and the silent `if ! command -v` block — unless the skip is visible (sanctioned notice call or stderr write) or carries a documented `# silent-skip-ok: <reason>` quiet classification. First run caught a real prerequisite-visibility wave miss: guardrails' flag-commit-pr-skill-bypass jq guard was silent while every sibling hook emits a stderr notice — fixed to match (guardrails 0.7.1). The two deliberate quiet sites are now annotated at the site: claude-ops' fire-and-forget telemetry sink (0.13.1) and powershell-format's not-applicable pwsh skip (0.4.1). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 4m 49s —— View job PR Review: feat(ci): silent-skip gate for hook prerequisite visibility
Verdict: Approve with minor suggestions. The implementation is correct, the test suite is solid, and the CI integration is clean. Two minor gaps are worth noting for future-proofing but are not blocking. Core gate logic (
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c25ea88955
ℹ️ 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".
Both scripts committed with mode 100644; hygiene's shebang-executable check failed and the silent-skip-gate lane died with exit 126 invoking the script. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 2m 2s —— View job PR Review: feat(ci): silent-skip gate for hook prerequisite visibility
Verdict: Approve. The Codex P1 blocker is correctly resolved, the gate logic and test suite are sound, and the plugin fixes are accurate. The two low-severity test gaps noted in the earlier review remain open but are non-blocking. Permission fix (
|
Summary
Deferred CI-gate backlog item from the prerequisite-visibility wave: a grep-level tripwire that fails CI when a hook entry script quietly no-ops on a missing CLI prerequisite.
scripts/check-silent-skips.shscansplugins/*/hooks/*.sh(entry scripts only —hook-utils.shlib copies have their own sync gate;*.test.shexcluded) for two shapes: the same-linecommand -v X … || exit 0/|| return 0/|| <skip-named helper>guard, and theif ! command -v Xblock that reachesexit/return 0. A site passes when the skip is visible (hook::emit_skip_notice,hook::emit_system_message,hook::notice_once,hook::require_jq, or a stderr write) or carries a documented# silent-skip-ok: <reason>quiet classification at the site.scripts/check-silent-skips.test.sh: 14 fixture-based unit tests (annotation scoping, nested-fidepth tracking, non-skip guards never flagged, exclusions).silent-skip-gateci.yml lane, added to theci-statusneeds graph.The gate's first catch
guardrails/flag-commit-pr-skill-bypass.shhad a genuinely silent jq guard (if ! command -v jq … exit 0with no notice) while every sibling guardrails hook emits a one-line stderr notice — a prerequisite-visibility wave miss. Fixed to match the siblings (guardrails 0.7.1).Sanctioned quiet sites, now recorded at the site
hook-telemetry-sink.sh: fire-and-forget sink; the producer discards stdout+stderr, so no notice channel exists (producer owns visibility).pwshis the documented not-applicable quiet classification; telemetry still records the skip.Comment-only annotation changes for those two; behavior unchanged.
Related
Part of the epic's deferred CI-gate backlog: #313 (epic stays open — remaining backlog items land separately).
No linked issue: this PR closes nothing; it is tracked under epic #313.
🤖 Generated with Claude Code