Repository navigation
Name the Leftover Old Tree When the Bash Loader Cannot Remove It - #2218
Conversation
Closes on promotion: #1790 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 #2218 +/- ##
==========================================
Coverage ? 56.61%
==========================================
Files ? 16
Lines ? 7482
Branches ? 0
==========================================
Hits ? 4236
Misses ? 3246
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 two-line change is traced-correct, parallels the existing PowerShell loader message, and is covered by a dedicated regression test whose setup reaches exactly the targeted failure path.
Review effort: Balanced
Findings: None
What changed in this PR
The Linux bootstrap loader's swap_in previously called remove_owned "$retired" bare when clearing a leftover owned .old tree. If an entry in that tree could not be removed (e.g. a locked directory), remove_tree returned non-zero and set -Eeuo pipefail aborted the run with only rm's raw error, leaving no indication of the .old path or the remedy, and every later kept-tree run failed the same way. This PR adds a || die refusal that names the .old path and the fix, bringing bootstrap.sh into parity with the message bootstrap.ps1 already emits in the same state.
Changes:
- Wrap
remove_owned "$retired"inswap_inwith|| die, producing a path-naming refusal consistent withbootstrap.ps1:309. - Add a regression test seeding a live tree, a staged
.new, and a locked.old, asserting the swap stops, the message names the.oldpath, and the live tree is preserved.
| File | Description |
|---|---|
| host-setup/bootstrap.sh | Adds a ` |
| tests/test_bootstrap.py | Adds a test that a locked leftover .old beside a live tree fails the swap with the loader's message and leaves the live tree intact. |
💡 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)
The Linux loader's
swap_incalledremove_ownedbare on a leftover owned.oldtree, so an entryrmcould not remove aborted the run with onlyrm's own error. It now stops with the loader's message naming the.oldpath and the remedy, matching whatbootstrap.ps1already says in the same state. A test with a locked entry in the leftover tree fails without the change.Closes on promotion: #1790
🤖 Generated with Claude Code