Repository navigation
Render the Include Walk Once per build_dist.py --check Run - #2241
Conversation
main() computed the include drift and then is_stale() computed it again, so every check rendered each region twice. is_stale() now takes the drift list main() already holds. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID:
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2241 +/- ##
==========================================
Coverage ? 56.65%
==========================================
Files ? 16
Lines ? 7482
Branches ? 0
==========================================
Hits ? 4239
Misses ? 3243
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is a minimal, backward-compatible refactor whose correctness and single-render behavior are verified and covered by a new regression test, with no objective issues found.
Review effort: Balanced
Findings: None
What changed in this PR
This pull request removes a redundant include-region render in scripts/build_dist.py's --check path. Previously main() computed the drift via include_drift() and then is_stale() computed it again internally, so every check run rendered and compared each include region twice. The change threads the already-computed drift list into is_stale(), eliminating the second walk while keeping exit codes and messages unchanged. This supports the fleet's skill-distribution tooling, where build_dist.py --check is the gate that detects when generated .github/skills/ and .claude-plugin/fleet-skills/ trees are behind their .agents/skills/ sources.
Changes:
is_stale()gains an optionaldriftparameter and reuses a passed list instead of re-walking, falling back toinclude_drift()when called without one.main()passes its already-computeddriftintois_stale(drift).- A new test pins exactly one render per include document for both a clean and a drifted tree, failing against the prior double-walk code.
| File | Description |
|---|---|
| scripts/build_dist.py | Adds optional drift param to is_stale() and reuses main()'s computed drift to avoid a second include walk. |
| tests/test_build_dist.py | Adds a regression test asserting one filled_bytes render per include document across clean and drifted --check runs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
## Summary Promotes develop to main, carrying the pull requests below, each already reviewed and merged into develop. - [#2203](#2203): Strip every heredoc body a line opens in the wait-loop rule. - [#2216](#2216): Point the charset-unknown message at where a tier is classified. - [#2218](#2218): Name the leftover old tree when the Bash loader cannot remove it. - [#2227](#2227): End the guard's stdin redirect scan at a trailing comment. - [#2230](#2230): Tell apart the causes a labels payload is refused for. - [#2232](#2232): Correct the task names and pointers in the Python tasks snippet header. - [#2234](#2234): Drop the stale private-repository note from PhotoCleaner's registry entry. - [#2237](#2237): State the bootstrap's archive live channel in two skills. - [#2239](#2239): Stop the promotion count on a failed fetch in backlog-burndown. - [#2241](#2241): Render the include walk once per `build_dist.py --check` run. - [#2243](#2243): Have the tree check call `escapes_repo_root` and refuse a symlinked component. - [#2247](#2247): Refuse a Windows drive component anywhere in a tree path. - [#2222](#2222): Tick the adopted repos in the merge-bot and gate rollout stages. - [#2121](#2121): Refuse a dangling remote-tracking target in `local_review`. - [#2249](#2249): Ignore a quoted separator when the guard finds a loop's `done`. Closes #2112 Closes #2171 Closes #1790 Closes #2152 Closes #1372 Closes #2149 Closes #1082 Closes #1772 Closes #1310 Closes #1379 Closes #1452 Closes #2244 Closes #2168 Closes #2106 Closes #2207 🤖 Generated with [Claude Code](https://claude.com/claude-code)
In
--checkmodemain()computed the include drift and thenis_stale()computed it again, so one run rendered every include region twice.is_stale()now takes the drift listmain()already holds, and falls back to walking the includes when called without one. Exit codes and messages are unchanged. A new test pins one render per include document for both a clean and a drifted tree, and fails against the previous code.Closes on promotion: #1379
🤖 Generated with Claude Code