Repository navigation
fix(ci): treat fbuild build error: as failure even on exit code 0 - #3784
Merged
Merged
Conversation
fbuild's daemon formats build failures as a bare `build error: <msg>` log line and the CLI exits with the response's `exit_code` verbatim. fbuild already guards against a zero `exit_code` arriving alongside `success=false` (fbuild issue #130, `cli/deploy.rs:485-498`) but only on the `test-emu` path -- `cli/build.rs:141-146` and the main `cli/deploy.rs:241-247` both `exit(resp.exit_code)` unclamped, and `daemon_client.rs:386` reads that code out of untyped JSON. A zero there silently reads as a green build. Corroborate the return code against the marker in `run_fbuild_compile` and `run_fbuild_deploy` (deploy builds before it flashes, so it has the same exposure). Match only at line start: `compile-many` embeds the same text mid-line in its per-sketch summary, where it is not a whole-run failure -- that path keeps its existing result-count corroboration instead, now commented to say so. Both guards are covered by tests that fail when the guard is removed. Co-Authored-By: Claude <[email protected]>
Stale per-issue worktrees under .worktrees/ were being walked by the meson path linter, producing 4 phantom PathNormJoinChecker violations against copies of files that no longer exist in the tree. Co-Authored-By: Claude <[email protected]>
|
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 (4)
📝 WalkthroughWalkthroughThe fbuild runner detects line-start ChangesFbuild error handling
Repository hygiene
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
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.
Problem
fbuild's daemon formats build failures as a bare
build error: <msg>log line, and the CLI exits with the response'sexit_codeverbatim. fbuild already guards against a zeroexit_codearriving alongsidesuccess=false— but only on thetest-emupath (cli/deploy.rs:485-498, referencing fbuild issue #130):The two paths FastLED actually uses have no such clamp —
cli/build.rs:141-146and the maincli/deploy.rs:241-247bothexit(resp.exit_code)raw, anddaemon_client.rs:386reads that code out of untyped JSON (unwrap_or(1)). A zero arriving there silently reads as a green build.Change
Corroborate the return code against the stdout marker in the two affected entry points:
ci/util/fbuild_runner.pyrun_fbuild_compilerun_fbuild_deploy_run_fbuild_batch_commandcompile-manyembeds the samebuild errortext mid-line in its per-sketch summary (compile_many.rs:171-179), where it does not indicate whole-run failure — hence the^\s*anchor, and hence that path keeps its existing result-count corroboration instead.False-positive review
process.stdout— never enters the matched text.file:line:col: error:, neverbuild error:at column 0.Testing
Two tests, one per guarded path. Both were mutation-checked — removing the guards fails exactly these two and nothing else:
bash lintclean.Upstream follow-up
The real fix belongs in fbuild: apply the same clamp already present in
cli/deploy.rs:485-498tocli/build.rs:145andcli/deploy.rs:246. That would make this guard belt-and-braces rather than load-bearing.Also included
chore(gitignore): ignore.worktrees/andTASK.md. Stale per-issue worktrees were being walked by the build-file path linter, producing 4 phantomPathNormJoinCheckerviolations against copies of files that no longer exist in the tree.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests