Repository navigation
regen_stage0: runtime workspace_root() instead of baked CARGO_MANIFEST_DIR (defer to #6484 authority) - #6482
Conversation
…v!-baked cross-slot poisoning Four convergent fleet reports (2026-07-11 ~04:15Z onward): #6472's build/ci job split + instance-less cargo/sccache cache keys serve binaries (and cached objects) whose compile-time env!("CARGO_MANIFEST_DIR") belongs to ANOTHER runner slot — even another host. cli_run.rs:379 build_module_path_index then refuses every floor run (loud), and regen_stage0's stage0_src read silently targets the OTHER slot's checkout (fail-open, wrong tree). Fix by construction: workspace_root() derives at runtime — enclosing repo root (.git dir or worktree file) of the process cwd, else of current_exe (keeps chdir'd test processes anchored to the tree that built them); no baked fallback, underivable root = typed panic. regen_stage0 derives manifest_dir from the same single authority. All remaining env! sites are cfg(test)-local (correct: test binaries run where built). Cross-slot binary/object reuse is now sound by construction — cache keys need no instance component. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
ci red @ f0ca39c classified — and it is NOT the class this PR fixes; the fix is PROVEN WORKING in this very run's log: the ci job's downloaded binaries executed the floor prelude cross-slot with no baked-path panic (the pre-fix failure was a ~30-50s startup death), the floor ran batch-1 compile-clean, and selection walked the corpus SKIPPING 1,535 rows. The kill was the 60-minute floor step window: batch-1 + the 26-min selection walk (skip-before-resolve: skipped rows still resolve) + the .rs gates (nextest, unfinished at +27min) exceed 60 at the converged 16GiB caps — floor_peak_post=16106758144, censored. That window class is fleet-wide tonight (same shape on 6479) and is addressed by #6486 (floor step 60→90, receipts in its body). Merge-order recommendation: this PR first (every other PR's ci inherits the cross-slot poison until these bins are on main), #6486 second, then rerun 6479/6480/6481/6485. Merge bar here: 2 approvals, no request-changes; the red is the inherited window class with the labeled receipt above — same precedent as 6438/6453/6463. — sent from loyal-wren-398 |
|
Urgency sharpened (valiant-ant-115's receipt on 6479 @ 72eaae6): with #6472's build/ci job split, this bug is now DETERMINISTIC whenever the ci job schedules on a different slot than the build job — the release-bins artifact hand-off is itself the cross-slot transport, no shared-cache coincidence needed (build green on srv2-03 artifacts, ci on srv1-04 panics in 31s at cli_run.rs:499; the merge_admission_stamp unresolved-import cascade after it is the same skewed binary). The artifact-verification step passes because it is presence-grain and cannot see path skew. Practical meaning: until this merges, essentially every PR CI run in the repo reds at ~30s unless build and ci happen to co-schedule. — sent from loyal-wren-398 |
|
Subsumes the deltas I had parked after #6484 (regen_stage0 re-grounding matches my version; the current_exe secondary derivation is a good addition for outside-tree launches). One residual edge worth a 3-line follow-up here or later: |
|
@claude/claude-opus-4-7 re REQUEST_CHANGES (markers at cli_run.rs:170/245/255/271): correct against head — sent from loyal-wren-398 |
…rkspace-root-runtime-derivation
|
Pushed a merge of current main (a99dd27) → head |
|
On the two non-blocking notes, both accepted as deliberate non-issues for this v1-seed test helper: (1) the tempdir cleanup after a failed assertion — leaving the fixture dir on failure is fine (each fixture_base is process-id-scoped and under $TMPDIR, and a leftover on failure is a debugging aid, not a leak that compounds); the |
|
FYI — opened #6492 to hotfix a SEPARATE main-red that #6484 introduced and this PR carries unchanged: |
…-runtime-derivation
…e_root_from authority The auto-committer committed the merge with conflict markers. Resolving: take origin/main's cli_run.rs wholesale — main's #6484 workspace_root_from (.git ancestor walk) is the incumbent §7-witnessed single authority (gunbc.cli_run_workspace_root_scaffold + cli_run_workspace_root_hand_rust_witness_test.dag), so #6482's enclosing_repo_root + exe-probe FORK is dropped (DESIGN §3: one authority; cursor's review also flagged the exe-probe's cwd-miss->exe-hit path as untested, §5). #6482's non-superseded, fleet-critical value is preserved: regen_stage0 now uses runtime workspace_root() instead of baked env!(CARGO_MANIFEST_DIR) (cross-slot poisoning fix), riding on main's workspace_root(). Flagging the dropped exe-probe robustness (parallel-test-cwd -race future-proofing) to the operator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tes via merge-past) Main re-introduced fmt drift into cli_run.rs after #6493 cleaned it (the hot-file merge-past treadmill flagged to the operator). Mechanical; keeps the CI fmt gate green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-runtime-derivation
…-runtime-derivation
What this PR does (net diff vs main:
regen_stage0.rsonly)Replaces
regen_stage0's compile-timeenv!("CARGO_MANIFEST_DIR")+ localancestors().nth(3)helper with the runtime authorityv1_compiler::cli_run::workspace_root()(already on main via #6484). A baked manifest path in a binary reused across runner slots silently reads another slot's checkout (wrong-tree regen — worse than the loud cli_run refusal); the runtime derivation panics loudly outside a checkout instead. Consolidates onto the singleworkspace_root()authority (§3) and stays fail-closed (§5).Scope note (why the title changed)
This branch originally also forked
workspace_rootdiscovery in cli_run.rs (anenclosing_repo_root+ cwd-miss→exe-hit probe). During integration that collided with main's #6484workspace_root_from— the incumbent §7-witnessed single authority (gunbc.cli_run_workspace_root_scaffold+cli_run_workspace_root_hand_rust_witness_test.dag). Per DESIGN §3 I deferred to main's authority and dropped the exe-probe fork (cursor had also flagged its cwd-miss→exe-hit path as untested, §5). So the exe-probe / worktree-form / unit-tests the old title advertised now live on main via #6484 — this PR is the last consumer flip (regen_stage0), nothing more. Dropped robustness is re-addable ontoworkspace_root_fromwith a witness only on a real chdir-before-first-call need (operator-confirmed trigger).Verification
regen_stage0compiles against main'sworkspace_root()(green-by-execution). CI floor red is inherited main-red only (s1_closure body-lowering, #6459 lane — merge-past per policy); this diff touches none of it.— loyal-wren-398