Repository navigation
Description
Parent: #4390 (its one remaining slice). Waits on PR #10060 (adds the ratchet counter). If #10060 has not merged when this starts, stop with pushback; do not add the counter here.
Runs in: lane.
Problem
The guardrails PreToolUse Write|Edit|NotebookEdit row (plugins/guardrails/hooks/hooks.json) spawns 14 processes per fire on Linux (scripts/hook-census.sh, PR #10060), against an Ideal of 1 × S. plugins/guardrails/reference/edit-write-guards/PLAN.md records that replacing its programs (grep -E for the secret oracle, git rev-parse, git check-ignore) with builtins or session state "was not attempted". PR #10060 names the clean-path fork sites: the $(...) capture in secret_scan, the <(printf ...) process substitution in secrets::scan_text, and the two git calls plus the VIOLATIONS=$(...) capture in hardcoded-path-check.sh.
Owner decision Q113 (2026-10-25): agents set and lower this row's spawn ceiling from measurements; raising a ceiling, or changing what a blocking guard blocks, stays with the owner.
Fix
Attribute the row's spawns per guard (secret-pattern-detection, hardcoded-path-check, block-windows-drive-tmp), then remove external processes, git probes first, without changing any verdict. Lower the ceiling with ratchet.py propose-tighten --write in the same PR. Add a .changes/guardrails/ fragment.
Done when
Taken from the intake refinement criteria:
- The
guardrails-pretooluse-write-edit-spawnscounter'sceilingin.performance/ratchets.jsonis lower than 14 and equals the value the CI runner measures after this change - The ceiling was lowered with
ratchet.py propose-tighten --write, in the same PR as the spawn reduction - The PR body attributes spawns per guard and shows at least one external process removed
- The existing guard test suites for secret-pattern-detection, hardcoded-path-check and block-windows-drive-tmp pass with unchanged expected verdicts
- The three PreToolUse guards stay synchronous and fail-closed; nothing is set
async - No ceiling is raised (
git diff origin/main...HEAD -- .performance/ratchets.jsonshows only decreases) -
ci-statusis green on the PR head
Split by the backlog HITL session (2026-10-25, owner rule Q93: split large work before a run picks it up). This was generated by AI.
Activity
github-actions commentedon Oct 26, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Understood: reduce the external process spawns on the guardrails Write/Edit/NotebookEdit PreToolUse row without changing any guard verdict. The PR should attribute spawns per guard, lower the ratchet ceiling with
ratchet.py propose-tighten --write, and add a changes fragment. The issue says it waits on PR #10060 (the ratchet counter), which is a pull request and not an open issue, so I listed no blocking issue. If #10060 has not merged when work starts, the issue says to stop with pushback. I found no likely duplicates among the open issues.Automated triage, applied by the lanes App.
melodic-automation-lanes commentedon Oct 29, 2026
This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 40797661823, the work-resolve-issue run that
agent-readystarted, before it did any work; that run ended at 2026-10-29T01:31:27Z. work-unblock has now removed and addedagent-readyback to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last addedagent-readyor a run last reported, work-unblock waits longer before each one, up to 24 hours.melodic-automation-lanes commentedon Oct 29, 2026
The work-resolve-issue lane stopped on this issue (
host-only): the run reports the work needs a host run the lane cannot make.It added
host-runand removedagent-ready: an agent run on a host builds it, and it waits on no decision from a person.In the run's words:
What the run says it did not do:
Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40820459179
To hand it back to the lane, remove
host-runand addagent-readyagain.kyle-sexton commentedon Oct 29, 2026
Host run. Ran
scripts/hook-census.shunder strace to attribute the Write/Edit PreToolUse row's spawns per guard, removed external processes without changing any verdict, and lowered the ratchet withratchet.py propose-tighten --write.What ran (WSL2 Ubuntu, bash 5.3.9, dash as sh, git 2.53.0, strace 6.19, Claude Code 2.1.312):
scripts/hook-census.shon theguardrails-pretooluse-write-edit-spawnspayload, with per-pid traces (strace -ff) and bash xtrace to attribute each fork. Before:spawns=14 creations=9 execs=5. That splits as launcher 3, secret-pattern-detection 5, hardcoded-path-check 6, block-windows-drive-tmp 0. After:spawns=7 creations=4 execs=3. That splits as launcher 3, secret-pattern-detection 4, hardcoded-path-check 0, block-windows-drive-tmp 0. The Edit form of the payload also measures 7.git rev-parseandgit check-ignore, whenever no telemetry envelope can be written. Its dirty path runs rev-parse as$(exec git …).secrets::any_match, so the capture subshell opens only on a hit.<(printf …)process substitution stays, because a here-string deadlocks at the pipe-size boundary.python3 plugins/performance/scripts/ratchet.py propose-tighten --writelowered the ceiling from 14 to 7.ratchet.py checkthen reportedspawns=7 = ceiling. The same run also proposedjs-complexity-share2.54 → 2.04, measured with this host's lizard; that change is unrelated, so it was not kept.scripts/check-affected.sh --testson the committed head: 13 passed, 3 skipped.Against the acceptance criteria:
propose-tighten --writein the same PR: met.async: met.hooks.jsonis untouched.ci-statusgreen on the PR head: pending. CI is running on the ready PR.PR: #11064
Target labels: add none; remove host-run.