Measured by the plugin-quality auditor (packet docs-hygiene-audit-noise/20260815T173035Z): 1.47s per 386-line file, 9.8s with a tracked concern file present (per-line parse-concern-value.sh forks), ~700x a grep pass — because shape detection forks 2+ command substitutions per LINE and the convention-root cache is set inside a subshell so it never persists. This is the root cause of the observed >5-minute timeout on the first repo-wide run (1027 files; the session had to hand-chunk 26 ways — PR #2721).
Fix ladder:
- Hoist + export the convention-root resolution once per run (one-line class of fix; also repairs
AUDIT_NOISE_CONTRACT_ROOT being lost to subshells — auditor F6, which currently makes a configured contract root's bare reviews//handoffs/ child silently exempt against the lib's stated intent, untested in the suite).
- Restructure per-line detection to avoid command substitution in the hot loop.
- Single-pass awk implementation (structural; ~grep-order runtime).
Related affordance gap (auditor F8): the 0.12.0 clean-tree fallback prescribes a "chunked detect.sh pass" but no script support exists — chunking currently requires shell loops that collide with this fleet's hook-bypass guardrails. Add --chunk N / parallel mode (or make the single pass fast enough that chunking is moot).
Severity: High.
Measured by the plugin-quality auditor (packet
docs-hygiene-audit-noise/20260815T173035Z): 1.47s per 386-line file, 9.8s with a tracked concern file present (per-lineparse-concern-value.shforks), ~700x a grep pass — because shape detection forks 2+ command substitutions per LINE and the convention-root cache is set inside a subshell so it never persists. This is the root cause of the observed >5-minute timeout on the first repo-wide run (1027 files; the session had to hand-chunk 26 ways — PR #2721).Fix ladder:
AUDIT_NOISE_CONTRACT_ROOTbeing lost to subshells — auditor F6, which currently makes a configured contract root's barereviews//handoffs/child silently exempt against the lib's stated intent, untested in the suite).Related affordance gap (auditor F8): the 0.12.0 clean-tree fallback prescribes a "chunked detect.sh pass" but no script support exists — chunking currently requires shell loops that collide with this fleet's hook-bypass guardrails. Add
--chunk N/ parallel mode (or make the single pass fast enough that chunking is moot).Severity: High.