docs: add fork-budget rule with census method and measured limits#812
Merged
Conversation
Records how PRs #801-#811 measured forks (PATH-shim census as ground truth; bash -x traces overcount via re-echoed test output), the replacement patterns that worked, and — equally important — the measured dead ends (bash loops lose to awk beyond ~100 lines, ${var//} is quadratic on bash 3.2, single-file build is not faster, tput width is snapshot-load-bearing). Auto-loads when editing src/ so future perf work starts from evidence instead of re-profiling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Background
The fork-reduction series (#801-#811) produced measurement techniques and — equally valuable — measured dead ends that would otherwise be re-discovered (or worse, "optimized" into regressions) by the next contributor or agent touching
src/.💡 Changes
.claude/rules/perf-fork-budget.md: shim-census method (and whybash -xcounts are inflated), the replacement patterns that worked, where pure bash measurably loses to awk, and the current per-run fork budgets enforced by the regression tests.src/**so future perf work starts from evidence.