Repository navigation
fix(verify): drop cached crates a run did not rebuild when their sources changed - #4419
Open
richiemcilroy wants to merge 2 commits into
Open
richiemcilroy wants to merge 2 commits into
richiemcilroy wants to merge 2 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Member
Author
|
@greptileai review |
Member
Author
|
@greptileai review |
richiemcilroy
marked this pull request as ready for review
November 20, 2026 00:54
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · Review details |
This branch has not been deployed
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.

Pull requests that don't touch
crates/enc-ffmpegfail to compile in Engine verify on macOS, even when they are level withmain:mainhaspub mod decode_limit;incrates/enc-ffmpeg/src/lib.rs. The cached build ofcap-enc-ffmpegthat cargo reused does not.Why
sequenceDiagram participant S1 as Saving run, day N participant S2 as Saving run, day N+1 (main) participant PR as Pull request run S1->>S1: builds a, and a with feature x S1->>S1: record: every file = its blob S2->>S2: a/src/lib.rs changed, apply leaves it new S2->>S2: builds only the suites it needs (a without x) S2->>S2: record: a/src/lib.rs = new blob Note over S2: a with feature x is still the day-N build PR->>PR: apply: a/src/lib.rs matches manifest, gets the old mtime PR->>PR: cargo trusts a with feature x as fresh PR-->>PR: compiles against day-N codescripts/verify/plan.py), but saves the wholetarget/ci-verify, including units earlier runs built with other feature sets.mtime.py recordstamped every tracked file with its current blob id. Units the saving run never rebuilt then looked up to date to the next run.Fix (
scripts/verify/mtime.py)applywrites a stamp (<manifest>.applied) before the build.recordreads every rustc dep-info file under the target (deps/*.dandbuild/*/build_script_build-*.d). If a unit's dep-info predates the stamp, the run did not rebuild it. If it also lists a file whose blob changed since the restored manifest,recorddeletes the unit's.fingerprint/<pkg>-<hash>directory. The next run that needs that unit rebuilds it.# mtime manifest v2header. A manifest without it is not trusted (every file keeps the checkout time). This flushes the units that are already stale in today's caches. Pull requests rebuild workspace crates until the firstmainrun of a UTC day saves a v2 manifest.recordwithout a stamp writes an untrusted manifest.On a 21 GB local target with 4,656 dep-info files, the extra
recordwork takes about 3 s.scripts/verify/test_mtime.pybuilds real three-crate workspaces through the same apply → build → record cycle CI runs:cannot find function added in crate acannot find function added in crate aThe new test runs next to
test_perf_build.pyin Engine verify's planner checks.

Confidence Score: 5/5
The PR appears safe to merge.Summary
The PR prevents later verification runs from reusing cached crates built from older sources.
No new actionable issues found. The previous build-script input finding is addressed. The tests could not run here because Cargo is not installed.
Reviews (3) · Last reviewed commit: "fix(verify): drop build script runs whos..." · Reviewed by Greptile