Repository navigation
id-gate: run batch evaluations inside pkgs/id's nix dev shell - #12516
Conversation
…12229) Batch 1 died in the wayland-sys build script under `fleet shell --build`: that shell lacks the wayland client libraries pkgs/id's workspace needs. pkgs/id's own flake wires them (nix-common.nix), and the manual re-evaluation of batch 1's candidate in that shell went green. The default runner seam now enters `nix develop` of the candidate's pkgs/id and passes the batch command through verbatim, so the JSONL log keeps recording the exact command that ran. Planner, bisect, merge and kill-switch semantics are unchanged; the 21 pre-existing tests pass as written, plus 3 new runner-oracle tests.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3912ab03d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "develop", str(root / "pkgs" / "id"), | ||
| "--command", "bash", "-c", command, | ||
| ] | ||
| result = subprocess.run(argv, cwd=root) |
There was a problem hiding this comment.
Preserve the build lock around the nix dev-shell invocation
When the gate runs on the laptop, this direct invocation bypasses the concurrency lock and Cargo target-broker lease previously supplied by fleet shell --build. The command's documented --build behavior is to “take a fleet-build-lock slot” (pkgs/fleet/crates/fleet-agent/src/shell.rs, implemented by local_build_line and under_build_lock). Without it, batch checks and tests compete with other fleet builds outside the shared limit and, absent an inherited target override, rebuild into each disposable candidate's target directory rather than reusing the broker's warm cache. Keep the new nix environment, but execute it through the build-lock wrapper as required by the repository's laptop build discipline.
AGENTS.md reference: AGENTS.md:L30-L32
Useful? React with 👍 / 👎.
What
The id gate's default runner (
scripts/id/gate.py) ran batch commands underfleet shell --build. Batch 1 (#12229) died in thewayland-sysbuild script there — that shell lacks the wayland client libraries, so the batch was infrastructure-red and PR #12470's code was never evaluated. The manual re-evaluation of the same candidate insidenix developin pkgs/id went green (cargo check passed, 58/59 suites).This changes the runner seam (renamed
_run_fleet→_run_devshell) to enternix developof the candidate'spkgs/id— the flake that wires wayland/X11 viapkgs/id/nix-common.nix— and passes the batch command through verbatim from the candidate root, so the JSONL gate log keeps recording the exact command that ran.Unchanged semantics
Planner, affected-crate selection, bisect, merge-green via
gh pr merge --merge, JSONL log format, and theID_GATE_OFFkill switch (gate_enabled()) are untouched.Tests (oracle: the batch-1 failure record)
DevShellRunnerTests: the runner invokesnix developagainst<candidate>/pkgs/id; the batch command reachesbash -cbyte-for-byte; the exit code propagates. Written failing-first (3 errors before the fix).test_gate_off_plans_nothing,test_gate_off_runs_nothing) and the bisect suite, which cover the paths this change must not affect.Total: 24 tests, all passing locally (
python3 -m unittest discover -s scripts/id).Refs #12229 — this is the driver fix the issue's manual-evaluation comment names as still owed. It does not itself count toward criterion 2; counting starts with batches run through the fixed driver in production cadence.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit