Repository navigation
fix(rig-cli): a Ctrl-C'd trial build is not rejected, and running the previous build instead of a rejected one is said - #3139
Merged
Conversation
… previous build instead of a rejected one is said
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.
fix(rig-cli): a Ctrl-C'd trial build is not rejected, and running the previous build instead of a rejected one is said
Description
Two launcher fixes from the 2026-11-07 architecture audit (K3-A, d-2).
crates/rig-cli/src/run.rsignoredstop::heard(), but the reload check just above it uses it. A user who pressed Ctrl-C during a new build's startup got that build recorded inbin/rejected. From then on every start silently ran the previous build, which no longer matchessettings.toml. The check now leaves out a trial the launcher heard a signal for. The unclaimed trial file is removed by the next start's sweep, and the next start stages the build again.rebuild, where the launcher decides the previous build runs. That is also where it already says so for a failed build. The newbuild::passed_overreturns true when the build cargo just made is the one inbin/rejected, is not the good build (a rejected build that later started is not passed over), and nothing staged replaces it. The launcher then prints one line on stderr:The new build stopped during startup before, so the previous build is running;rig buildtries it again.What users see change
rigtries the new build again instead of quietly running the old one.rigstarts the previous build because the new build crashed during startup on an earlier run, it prints on stderr: "The new build stopped during startup before, so the previous build is running;rig buildtries it again."rig-clirun::tests::a_trial_stopped_by_a_heard_ctrl_c_is_not_rejectedthe interrupted trial is recorded in bin/rejectedrig-clibuild::tests::a_rebuilt_rejected_build_is_passed_over_out_loudpassed_over, so it does not compile on base)The first test's fake trial build sends SIGINT to the test process by its pid (
std::process::id()), not$PPID, so it cannot reach any other process. Nextest runs each test in its own process, which the existingrun::stop::testssignal tests already rely on.Changelog
Migration
None.
Type of change
Testing
cargo nextest run --locked --profile local -p rig-clion box2: 56 of 56 passedcargo clippy --locked -p rig-cli --all-targets -- -D warningson box2: cleancargo xtask verify --affected --base origin/mainon box2: "All 7 checks passed"Checklist:
CHANGELOG.mdorMIGRATING.md(they are generated at release)Notes
run.rs,build.rs). Test lines: +50.passed_overalso requires the good build to differ from the one just built. Without that, a rejected build retried withrig buildthat then started (so becamebin/good) was still said to be passed over. The second test now covers that step; it failed on the previous head with(false, Ok(()), true, true, false).d-2.diff): the fake trial signals the test process by its explicit pid instead of$PPID.rigstart with a real agent build and Ctrl-C at a terminal. The stderr line itself is not asserted by a test (it is a plaineprintln!on the predicate the second test covers).Follow-ups