fix: restore green main - clippy needless borrow + unix pid-0 liveness (#1213 follow-up) - #1229
Merged
Merged
Conversation
…w-up) PR #1227 was merged with the Check jobs red: clippy denies needless_borrows_for_generic_args on `output::result(&format!(...))` in daemon_cmd.rs (output::result takes impl Display, so the borrow is needless). The fix existed locally but was never committed. Pass the String by value, restoring green Check Ubuntu/Windows/macOS on main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe daemon command now passes the formatted stale-record message directly to ChangesDaemon output formatting
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
zackees
added a commit
that referenced
this pull request
Aug 1, 2026
kill(0, 0) probes the caller's own process group and succeeds, so the unix liveness check reported pid 0 as alive. That failed the two #1227 install-lock staleness tests on macOS/Linux (Check macOS red on PR #1229; Ubuntu masked behind the clippy error), and in production a corrupt owner record holding pid=0 would never be reclaimed — the exact #1213 deadlock class. Guard pid 0 explicitly and add a cross-platform regression test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #1213
Summary
PR #1227 was admin-merged with the Check jobs red, breaking main two ways. This PR fixes both:
needless_borrows_for_generic_args,daemon_cmd.rs:26): passformat!(...)by value instead of&format!(...)—output::resulttakesimpl Display, and-D warningsturns the lint into an error. This is what turned Check Ubuntu/Windows red at the merge commit (green on the prior push, fix(ldf): honor lib_deps on Teensy/STM32 and warn on inert lib_ldf_mode (#1214) #1226).pid_is_aliveusedkill(pid, 0) == 0, butkill(0, 0)probes the caller's own process group and succeeds — so PID 0 read as "alive" on macOS/Linux. That failed fix(packages,daemon): reclaim dead-owner install locks; stop leaving stale endpoint records (#1213) #1227's two install-lock staleness tests on Check macOS (Ubuntu masked behind the clippy error; Windows unaffected, which is why it slipped through local dev). It is also a real production hole: a corruptowner.txtrecordingpid=0would never be reclaimed — the exact Orphaned mkdir install-locks deadlock after daemon crash; stale daemon endpoint survives 'daemon stop'; esptool provisioning failure kills daemon #1213 deadlock class. Fixed with an explicit pid-0 guard + cross-platform regression test.With this follow-up, all three parts of #1213 are fully landed (dead-owner install-lock reclaim + stale endpoint clearing shipped in #1227).
Validation
soldr cargo clippy -p fbuild-cli --all-targets -- -D warnings— clean (previously reproduced the exact CI error).soldr cargo test -p fbuild-core process_identity— 7 passed (incl. newpid_zero_is_never_alive).soldr cargo test -p fbuild-packages-fetch install_lock— 12 passed.🤖 Generated with Claude Code