Skip to content

perf(prune): keep an earlier row out of a later row's root - #1112

Merged
wenzowski merged 1 commit into
mainfrom
claude/sweet-faraday-6rxhxv
Oct 3, 2026
Merged

wenzowski merged 1 commit into
mainfrom
claude/sweet-faraday-6rxhxv

Conversation

@wenzowski

Copy link
Copy Markdown
Contributor

Closes CLOUD-2104

The lap-close prune escalation walked each [[prune.regrowable]] row across the whole target tree. The incremental row is declared first, so it also matched the incremental directories inside perf* and semver*. The consumer declares those roots last because they are the most expensive to regrow. Most laps escalate, and each time the escalation stripped the perf arm's incremental state.

Measured in a copy of target/perf/arms: after a one-line edit, the head arm rebuilds in 13 CPU-s with that state and in 380–423 CPU-s without it. 380 CPU-s is what perf-gate paid on the last two ledgers.

  • directories_named_outside does not descend into a directory that a later row names. The later root is taken whole on its own turn, or not at all.
  • Test prune::tests::an_earlier_row_never_reaches_inside_a_later_rows_root; mutant later-root-unshielded, killed by hand. Its sed script was dry-run to confirm it matches exactly one line.
  • All 40 prune unit tests and all 82 target_prune integration cases pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFeJfGnT67NjjLWQJ1SgXB


Generated by Claude Code

`drop_regrowable` walked each `[[prune.regrowable]]` row across the whole
target tree, so `incremental`, declared first, matched the `incremental`
directories inside `perf*` and `semver*` — roots the consumer declares last
because they are dearest to regrow. The lap-close escalation fired on most
laps, and each time it stripped the perf arm's incremental state. Measured
in a copy of `target/perf/arms`: the head arm's rebuild after a one-line
edit costs 13 CPU-s with that state and 380-423 without, and 380 is what
`perf-gate` paid on the last two ledgers.

`directories_named_outside` does not descend into a directory a later row
names. The later root goes whole on its own turn, or stays.

`prune::tests::an_earlier_row_never_reaches_inside_a_later_rows_root` pins
both halves; `later-root-unshielded` is killed by hand.

Refs: CLOUD-2104
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: button-inc/batten/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6d582972-3b92-4ac4-9578-71786707d168
📥 Commits

Reviewing files that changed from the base of the PR and between 978ef3f and 7317617.

📒 Files selected for processing (1)
  • crates/batten/src/prune.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wenzowski
wenzowski marked this pull request as ready for review October 3, 2026 22:31
@wenzowski

Copy link
Copy Markdown
Contributor Author

/fast-forward

@wenzowski
wenzowski merged commit 7317617 into main Oct 3, 2026
26 checks passed
@wenzowski
wenzowski deleted the claude/sweet-faraday-6rxhxv branch October 3, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant