Closed
Labels
needs-triageNot yet classified. Floor until a type and one priority tier are set.
Description
Problem
The Stop-hook regressions fixed in #4408, #4421 and #4422 (whole-transcript reads, an interpreter cache that missed per shell, sourcing ~thousands of library lines before an opt-in check, an extra env process) all merged without any automated signal and were found weeks later from OTEL.
Proposal
- A CI check that runs every hooks.json command with a fixture payload for its event against a small and a large transcript (e.g. 50 KB and 10 MB), and fails when process count per fire exceeds the hook's declared budget or when time grows with transcript size beyond a bound. Counters first; durations only as a ratio to a same-run no-op spawn, since CI runners are noisy.
- A lint for known slow shapes:
mapfile -sor full reads over transcript_path,#!/usr/bin/envscripts registered without a leadingbash, andsourceof large libraries before an opt-in/early-exit check.
Replaces the 500 ms judgment figure in the hook-budget convention with budgets expressed in multiples of S (ROADMAP item 8).
Parent: #4373
Found during the Windows hook-latency work under #4373 (#4389/#4408, #4415/#4421, #4416/#4422).
Metadata
Metadata
Assignees
Labels
needs-triageNot yet classified. Floor until a type and one priority tier are set.
Type
Fields
No fields configured for issues without a type.
Activity
chore(ci): set hook ratchet ceilings to the CI-measured counts
chore(source-control): bump to 0.57.1 for the budget pointer fix
test(ci): TEMPORARY hand mutants for the hook ratchets, reverted next
Revert "test(ci): TEMPORARY hand mutants for the hook ratchets, rever…
docs(scripts): name every exit path in hook-census.sh's header
fix(ci): fail closed on partial hooks.json reads; tighten the tail -c…
fix(ci): pin the census environment and print tool versions beside th…
test(ci): TEMPORARY census variance probe, reverted next
fix(ci): mark the slow-shapes scripts executable; sort gate output
Revert "test(ci): TEMPORARY census variance probe, reverted next"
docs(ci): state the census's network limit and the versions each ceil…
fix(scripts): mark hook-census's readlink -f as a Linux-only site
chore(ci): re-trigger pull_request checks
feat(ci): hook spawn and transcript-growth ratchets, hook budget in m…
test(hooks): feed kill-switch cases stdin from a file
perf(ratchets): lower the guardrails PostToolUse spawn ceiling to 102
fix(ci): hoist-ok marker, no globbing in token walks, sorted findings
fix(ci): scope transcript bounds to one command; report non-scalar sh…
docs(ci): list bound text inside a pattern as a known slow-shapes miss
feat(ci): hook slow-shapes gate, bash-prefix sweep, and exit-before-s…
kyle-sexton commentedon Sep 24, 2026
Done in two PRs.
Follow-ups: #4458/#4460 (test stdin pipe race), #4466 (skill-evidence on Windows), #3966 comment (Windows-only suite failures).
Merge branch 'main' into fix/test-stdin-pipe-race