Repository navigation
docs(guardrails): record the measured Bash row cost of block-cross-domain and protected trees - #10807
Conversation
…budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-review reviewed Incremental review of I found nothing to flag. I did not re-review the other file in the PR, which is unchanged since the last review. I did not run the measurements or tests the PR description cites for #9743 and #9751. They are author-claimed and unverified by me. Closing issues #9743 and #9751 were read. The incremental change doesn't affect their criteria. No manifest items are hit. No cost or security hold applies. |
|
claude-security-review reviewed Incremental security review of The only change rewords one sentence in a performance-history note. It now says every decision is byte-identical to 0.33.11 in exit code, stdout and stderr, over the same corpora as before. It changes no code, hook block list, allowlist, manifest, workflow or trust control, and it deletes no standing instruction. Nothing is narrowed or softened. This is README prose only, so the skip gate's "no security-relevant surface" case applies. No manifest items were hit, so there are no critical-findings: 0 |
Lane-Activity: pr-refine/fix-docs
Closes #9743
Closes #9751
Summary
Problem: the guardrails README said the
Bash|PowerShellrow's added wall time forblock-cross-domain(#9743) and for theblock-root-delete-targetprotected trees (#9751) was "not measured yet". This PR records those measurements, taken on the Windows reference host (melo-lap-001) asdocs/conventions/hook-budgetdescribes. Both changes cost nothing measurable: they stay inside the noise of the rows they do not touch.Fix
plugins/guardrails/README.md, "Hook budget accounting": both entries now state the host, the harness, the run count and the paired median in ms and in S, where they used to say "not measured yet".patchchangelog fragment.Verification
Harness: the dotfiles fan-out harness
tools/measure/measure-claude-hook-fanout.sh(sha256e1bbebb9…, the hash the hook-budget launcher A/B used) ran on melo-lap-001: Windows 11, Git Bash 5.3.15, Node 24.21.0, jq 1.8.2, on AC power. It ran with--runs 7against a scratchCLAUDE_CONFIG_DIRthat enables only guardrails, overriding the plugin root with--plugin-root.Rounds: 15 rounds over five arms, with the arm order rotated each round, for 75 runs. All 75 were valid: S was 20 to 29 ms, with a median of 21 ms, against the 160 ms validity limit.
main(0.61.2), set throughCLAUDE_PLUGIN_OPTION_BLOCK_CROSS_DOMAIN_ENABLED. The arms werefalse(control),truewith no map, andtruewith a placeholderidentity-domains.json.f39428d89(feat(guardrails): deny recursive deletes of protected trees ahead of the allowed roots #9981) against its parent.Results: paired per-round medians of the guardrails
PreToolUseBash row against its control:$(…)Arm controls: in every round the map arm wrote the compiled cache and the disabled arm did not. So the
truearm ran the guard's map path and thefalsearm stopped at the kill switch.Inside the budget: neither change adds a spawn on this path (k unchanged), and the measured added time, +0 to +5 ms (at most 0.2 S), is inside the ±0.3 S that the untouched rows moved. So there is no measurable added work, and the row stays inside its k × S budget.
The other done-when items of both issues, rechecked on this head:
scripts/run-test-file.shprintedblock-root-delete-target.test.shPASS=2665 FAIL=0,block-cross-domain.test.shPASS=310 FAIL=0, andrun-guards.test.shPASS=701 FAIL=0.block-root-delete-target.test.shsection 2e holds every deny case the issue lists:.git, a worktree root, the toplevel, another session's scratchpad,~/.claudeand a listed tree. It also holds both allow cases: a subdirectory of the toplevel and this session's own scratchpad.run-guards.test.shkeeps the guardrails: Bash|PowerShell PreToolUse row takes 30+s on a ~70 KB command; its 60s timeout fails open #4528 over-length case.scripts/check-changelog-fragments.sh --check-required origin/mainexits 0.block-cross-domainis on thehooks.jsonrow,.userConfig.block_cross_domain_enabledis set, andgit grep -nE "melodic|kyle|sexton"over both guard files prints nothing.scripts/check-affected.sh --testson the committed head, after mergingorigin/main: 13 passed, 3 skipped.Left out: the recursive-delete arm of feat(guardrails): deny recursive deletes of protected trees ahead of the allowed roots #9751 is not timed. The harness samples (
git status --short,echo $(git rev-parse HEAD)) are not recursive deletes, so the figure above is the common call's cost. That matches the README's claim that only a judged recursive delete pays for the arm.Related
Refs:and left this measurement open.🤖 Generated with Claude Code