Repository navigation
test(rust): replay pinned public glob history on hosted CI - #95
Conversation
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
There was a problem hiding this comment.
@FredApps Thanks for how honest the reports are: they state zero selectivity and make no savings claim. Two notes on CI cost:
1. rust-replay.yml runs on every PR that touches src/**. Each run clones glob, builds it and runs its full suite three times, and today the result is always FULL. CI compute is limited for this project, so could it be workflow_dispatch only? If it should stay automatic, could it trigger only on changes to Rust adapter and planner files?
2. rust-execution.test.ts builds real Cargo workspaces in every ci.yml matrix job (Linux and Windows × Node 22 and 24) because of DIFFCI_REQUIRE_CARGO=1. Could one Linux job cover the executable proof, with the other matrix entries skipping it?
Resolve the DiffCI#91 squash merge: keep main's symlinked-checkout fix, grouped fallback-reason rows and maintainer line, and reapply this milestone's crate dependency analysis on top. Signed-off-by: FredApps <[email protected]>
Bring in main (including the DiffCI#91 squash merge) through the updated dependency milestone; this milestone's changes are reapplied unchanged. Signed-off-by: FredApps <[email protected]>
Bring in main (including the DiffCI#91 squash merge) through the updated command milestone. Bump the graph cache schema to 15 after main's 11-14, and keep release-files.json alphabetical. Signed-off-by: FredApps <[email protected]>
Bring in main (including the DiffCI#91 squash merge) through the updated registration milestone; the replay and execution evidence is reapplied unchanged. Signed-off-by: FredApps <[email protected]>
Review on DiffCI#92: the checks were so broad that no real crate could select fewer tests. Keep failing closed where a subset can actually differ. - Locked registry/Git dependencies (including build scripts and proc macros) no longer block; Cargo.lock changes keep the full suite. Local path dependencies outside the workspace still block. - A workspace crate with a build script depends on every workspace crate: it and its dependents run for any Rust change, other crates narrow. - Feature requests no longer block. Cargo (`cargo tree`) resolves each tested crate alone and with its dependents; the coverage is recorded for the planner to check each selected set. Missing evidence blocks. - Drop the fs/process/unsafe/extern keyword denylist. Literal paths that reach another crate, and code that runs Cargo/rustc, become crate dependencies instead of blockers. - Check only module trees for symlinks and unlisted sources (no 50k cap; linked LICENSE/README files are fine). - Read parent-directory and $CARGO_HOME Cargo config, block only build-changing keys, and include RUSTDOCFLAGS and CARGO_BUILD_TARGET. Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
… per command Review on DiffCI#93: plain `cargo test` tests only the root package of a non-virtual workspace, or `default-members`. Register test targets only for `workspace_default_members`, so a selective run stays a subset of the full one; other members remain sources that reach tested dependents. Metadata without default members (Cargo < 1.71) falls back. With DiffCI#92's feature coverage, every synthesized Cargo invocation must contain a unit Cargo resolved with the full run's features for each package a selected crate would otherwise build differently; otherwise the plan is refused. Profiles without coverage are refused. Also keep release-files.json alphabetical. Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
…ixture fallbacks Review on DiffCI#94: 1. Documentation changes follow the shared classification (no tests, no fallback) unless Rust code names a documentation path or a workspace build script exists; include_str!'d docs stay modelled assets. .github/** keeps the full suite: it is the invocation evidence. 2. Leave Maven, Python and Go behaviour as on main: the test matcher adds only Rust targets, goTestPackages only drops Rust contributions, and hydrated graphs only trust declared test identities for .rs nodes. 3. Accept ordinary CI around a plain `cargo test`: checkout, toolchain and cache actions, a matrix, output-only env, and build/clippy/fmt/doc/ rustup steps or jobs. Test flags, other runners, compiler env, conditional or relocated test steps and unknown actions stay advisory. 4. Label Rust support experimental in the docs. From DiffCI#91 (point 2): Cargo manifests outside the workspace no longer block the repository when metadata shows no member depends on them; their files stay unmodelled, so changing one keeps the full suite. Also pass Cargo feature coverage and documentation readers to the profile. Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
|
@adityankale190895 thanks, both done in 9df6ec7, after merging 1. 2. Note: the replay reports and the PR description describe the earlier, stricter checks. With #92 loosened, glob would still always be FULL, because it's a single crate and any change selects all of it. Local results: 1047 tests pass with |
Review on DiffCI#92: a test that reads another crate's files only counted as depending on it when the code held a literal path to that crate. Tests that check every crate's files usually build the path instead, through .parent(), .ancestors(), PathBuf::pop or a formatted '..' path, so a change to the other crate skipped them. Treat such code like code that runs Cargo: its crate depends on every workspace crate. It only fires where the file also works with paths, so tree parent() methods and Vec::pop keep narrowing. Crate-local paths built from CARGO_MANIFEST_DIR stay narrow; the literal pass resolves them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]> # Conflicts: # docs/using-diffci.md
Signed-off-by: adityankale190895 <[email protected]> # Conflicts: # docs/using-diffci.md # src/repo/adapters/rust.ts
Review on DiffCI#94: a test that reached docs/ through "../docs", concat!(env!("CARGO_MANIFEST_DIR"), "/../docs") or a directory walk that matched the "md" extension was not recorded as reading documentation, so a docs-only change ran no tests and kept no fallback. Match a documentation directory anywhere in a path, a Markdown name or a bare md/mdx extension, and count code that climbs out of its crate as a documentation reader too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]> # Conflicts: # docs/using-diffci.md # src/repo/adapters/rust.ts # tests/repo/rust-adapter.test.ts
Signed-off-by: adityankale190895 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]> # Conflicts: # docs/using-diffci.md
Signed-off-by: adityankale190895 <[email protected]>
Signed-off-by: adityankale190895 <[email protected]> # Conflicts: # release-files.json
|
@FredApps thanks for the quick turnaround on #92–#95. The whole stack, #92 to #95, is now merged. To get the stack in, I pushed two fixes to your branches myself, so here is what changed. #92: paths built in code that climb out of a crate (fa50d31)This is the blocking point from my 15 November review. A source file that climbs out of its crate in code now makes its crate depend on every workspace crate, the same way code that runs Cargo does. That covers The three failing cases from the review are now regression tests in #94: tests that read docs through relative paths (16a0c9f)A docs-only change runs no tests unless some Rust code is recorded as reading docs. The check only matched strings that end in
A documentation directory ( Stack updates
#95#95 is merged as c35a04d. It merged cleanly on
If either fix has a better shape, a follow-up PR is welcome. The Rust adapter is your area. |
The 0.3.48 release failed with 'Resource not accessible by integration' when creating v0.3.48 and action-v0.3.48: PR #95 had landed on main with .github/workflows changes 73 seconds earlier, and a job token cannot create a tag on a commit whose workflow files differ from main's (that needs the workflows permission, which GITHUB_TOKEN never has). npm run release:tag now creates cli-release-v, v and an annotated action-v tag on the pushed release commit and pushes them atomically. The workflow already accepts tags that exist; its two tag steps now say what to do if the token is refused. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
Part 5 of #62, stacked after #92, #93 and #94 (#91 has merged).
Linux execution proof
The complete branch stack was tested on Linux without waiting for upstream merges. See the detailed report and the machine-readable evidence.
ci.ymlsetsDIFFCI_REQUIRE_CARGO=1only forubuntu-26.04with Node 24. That job must run it and fails if Cargo, rustc or rustdoc is missing. The other three matrix jobs skip it to save CI compute, and locally it runs whenever Cargo is installed. The small real-Cargo adapter tests from feat(rust): select tests through Cargo crate dependencies #92/feat(rust): synthesize conservative cargo test commands #93 still run wherever Cargo is available. Most only callcargo metadata/cargo tree, and two compile a tiny workspace forcargo test -- --list.This is a synthetic workspace execution proof, not a timing or avoided-compute claim for a public project. It tests Core's Git-to-Cargo path, not an installed CLI containing the new adapter.
Public replay
rust-replay.ymlnow runs only throughworkflow_dispatch(started by hand), not on pull requests. The pinned official rust-lang/glob replay originally passed on hosted CI and was repeated on Linux. All three historical revisions kept FULL validation and passed the independent offline/locked Cargo baseline: at each head, 18 unit tests, 1 integration test and 5 doctests passed, and 2 doctests were ignored. No public synthesized subset was executed.Limitations:
The analyzer stays offline and read-only. The harness explicitly prepares dependencies in a disposable clone and verifies the pinned history and an unchanged checkout and lock state.
Validation and review scope
On this head, the full suite passes locally on Linux with
DIFFCI_REQUIRE_CARGO=1(1047 tests), and the CI-mode skip was checked. Typecheck, build, release-boundary audit and agent check pass. Hosted Linux/Windows Node 22/24 checks, CLI packaging, Observer Action smoke and CodeQL pass, and the CI logs confirm the execution test ran in the Linux Node 24 job and was skipped in the others.Commits for this milestone:
Earlier milestones stay in the branch until they land. The support boundary and the remaining public-repository limitations are documented. DCO signed off. Review reply: #95 (comment)