Repository navigation
CI: self-hosted jobs run the aft binary their own build produced - #1497
Merged
Merged
Conversation
Cargo reports the final target path even for fresh artifacts. Keep the existing target as the shared intermediate build directory and isolate each job’s final outputs before staging the reported executable and any matching MSVC PDB. The workflow contracts now assert that job-local source instead of the shared path; release artifact names and debug-symbol identity checks remain unchanged. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
On Cargo 1.99 the shared deps/aft.exe is also an unhashed slot: changing rustc metadata by commit does not change that filename. Remove just the affected target/profile exe and PDB before linking. Keep both private final outputs and the shared dependency cache. Update the workflow contracts to verify the scoped relink instead of accepting a plain build. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.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.
Main's Tests run 45211694839 failed "E2E (Windows native)" with no code at fault. Self-hosted runners (
narli,mac-mini) share one Cargo target folder. Arelease/0.67run had built 0.67.1 into it; main's build of 0.67.0 found its unit fresh ("Finished ... in 0.63s") and left the 0.67.1aft.exein place; the plugin then refused it ("reports 0.67.1, expected 0.67.0"). With two commits of the same version, these jobs could test another commit's binary without any error.Changes:
CARGO_TARGET_DIR. The shared folder stays asCARGO_BUILD_BUILD_DIR, so dependencies stay warm.scripts/ci-stage-aft.pytakes the executable (and, for release, the PDB) from Cargo's JSON record and copies it into the job folder. Theaftbin is keyed with-C metadata=aft-<commit>.deps/aft.exehas no per-unit name, so the script deletes only that file and its PDB before building; Cargo relinksaftand keeps every dependency. The workaround is skipped on Cargo 1.100 and later.Evidence: a native Windows A → B → A → A build staged 0.67.0 → 0.67.1 → 0.67.0 → 0.67.0 with matching PDBs; the old layout staged 0.67.1 on the return to A. A new workflow test fails on the old Windows and macOS E2E paths. All 139 workflow and native-release tests pass. A GNU-
stattest that cannot run on macOS is now Linux-only.Summary by cubic
Fixes a race where self-hosted CI jobs (
narli,mac-mini) shared one Cargo target folder and could stage a binary built from a different commit than the one under test. Each job's Windows and macOS builds now produce their finalaftexecutable (and release PDB) in a private directory, while the shared folder stays as the warm dependency cache.scripts/ci-stage-aft.pystages the executable and PDB that Cargo reports, keying theaftbin with-C metadata=aft-<commit>.deps/aft.exeand its PDB before linking to force a relink; the workaround is skipped on Cargo 1.100+.Written for commit 5472ebf. Summary will update on new commits.


Confidence Score: 5/5
The PR appears safe to merge; no actionable regression was found.Summary
Native CI now stages each job’s
aftexecutable from Cargo’s reported output while keeping shared build files warm.aftbinary built for their own run.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Shared[Shared Cargo build files] --> Build[Job build] Commit[Commit-specific binary key] --> Build Build --> Private[Private Cargo output] Private --> Record[Cargo artifact record] Record --> Stage[Copy executable and optional PDB] Stage --> Tests[Native tests] Stage --> Release[Release packaging]Reviews (1) · Last reviewed commit: "mason: relink the legacy MSVC aft output..." · Reviewed by Greptile