Repository navigation
feat(rust): register Cargo adapter with conservative release boundary - #94
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]>
adityankale190895
left a comment
There was a problem hiding this comment.
Registration is careful: graph cache bump, mixed-language blocker, and a fallback for unmodeled changed paths. Some notes before this merges.
1. Any changed path outside Rust sources or assets forces a full run. That includes README.md, docs/** and .github/**. Docs-only changes are the easiest savings to get. Is the repo-wide fallback intended, or could non-code paths follow the same classification other adapters use?
2. Cross-adapter behavior changes. testFileMatcherForProfile now also includes mavenTestModules and pythonTests, and goTestPackages is now filtered to Go contributions. Before, Maven and Python testPackages leaked into it. The hydrateDependencyGraph matcher change affects every language too. These look like genuine fixes, but they change Maven, Python and Go behavior. Could they be a separate PR with their own regression tests, so the Rust stack stays Rust-only?
3. rustTestInvocation is practically never satisfied. Every workflow in the repo must contain only actions/checkout and a plain cargo test. A toolchain setup action, a cache step, a clippy or fmt job, a matrix or any env disqualifies it. Being conservative here is right. But combined with the dependency and feature blockers in #92, no real repository both narrows and gets runnable commands.
4. Support claim. Given points 1–3 and the #95 replay (all FULL, no qualifying public workspace found), I'd hold the README and release-boundary.md wording that lists Cargo workspaces next to the other supported languages. Either relax the #92 blockers enough that at least one real workspace narrows, or label Rust support experimental or advisory for now.
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]>
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]>
|
@adityankale190895 thanks. I merged 1. Docs force a full run. Documentation paths ( 2. Cross-adapter changes. These are reverted, so the stack is Rust-only:
Maven, Python and Go behave exactly as on 3.
Test flags, other runners, compiler env ( 4. Support claim. From #91 (point 2). Cargo manifests outside the workspace no longer block the repository when metadata shows no member depends on them. Their files stay unmodeled, so a change to one still runs the full suite. Local results: 1041 tests pass, plus typecheck, build, audit, agent check and benchmark. Hosted CI is green. |
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]> # Conflicts: # docs/using-diffci.md
* feat(rust): map Cargo packages and test targets (#58) Signed-off-by: FredApps <[email protected]> * feat(rust): select workspace tests by crate dependencies (#59) Signed-off-by: FredApps <[email protected]> * feat(rust): synthesize conservative Cargo test commands (#60) Signed-off-by: FredApps <[email protected]> * feat(rust): register conservative Cargo adapter and document boundaries Signed-off-by: FredApps <[email protected]> * test(rust): add pinned public glob replay on hosted CI Signed-off-by: FredApps <[email protected]> * docs(rust): publish measured glob replay and fallback limits Signed-off-by: FredApps <[email protected]> * test(rust): execute selections from real Git changes Signed-off-by: FredApps <[email protected]> * docs(rust): publish Linux selective execution evidence Signed-off-by: FredApps <[email protected]> * fix(rust): narrow dependency, feature and runtime-input blockers Review on #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]> * fix(rust): select only crates plain cargo test covers; check features per command Review on #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 #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]> * fix(rust): keep registration Rust-only; narrow docs, invocation and fixture fallbacks Review on #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 #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]> * ci(rust): run glob replay on demand, execution proof in one Linux job Signed-off-by: FredApps <[email protected]> * fix(rust): paths that climb out of a crate in code depend on every crate Review on #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]> * fix(rust): find documentation reads through relative and walked paths Review on #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: FredApps <[email protected]> Signed-off-by: adityankale190895 <[email protected]> Co-authored-by: adityankale190895 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Part 4 of #62, stacked after the dependency (#92) and command (#93) milestones. #91 has merged.
This integration milestone is fb6c35c plus the review fixes in 1833649. Earlier milestones stay in the branch until they land.
Register Rust. The graph cache schema is bumped to 15. Rust test targets, Cargo feature coverage and documentation readers are added to the profile.
The stack is Rust-only. Maven, Python and Go behave exactly as on
main:goTestPackageskeeps its existing routing and only drops Rust contributions,.rsnodes.The cross-adapter fixes from the earlier revision were dropped from this stack, and can follow as a separate PR with their own regression tests.
Changes to Rust unit-test roots propagate as production source, including member manifests and modeled includes.
Docs-only changes don't force a full run. Documentation paths (
README.md,docs/**and similar) follow the shared classification. They still run the full suite when Rust code names a documentation path or a workspace build script exists.include_str!'d docs stay modeled assets of their crate.These still keep full validation:
.github/**, which is the evidence for the test invocation,Out-of-workspace manifests (from feat(rust): map Cargo packages and test targets #91's review) block the repository only when metadata shows a member depends on them. Their files stay unmodeled, so changing one still runs the full suite.
Plain
cargo testinvocation evidence accepts ordinary CI:withkeys), toolchain and cache actions,env,cargo build/clippy/fmt/docandrustupsteps or jobs.Test flags, other runners, wrappers, compiler environment, conditional or relocated test steps and unknown actions keep commands advisory.
Rust support is documented as experimental in
docs/release-boundary.mdanddocs/using-diffci.md, along with the boundary from feat(rust): select tests through Cargo crate dependencies #92 and feat(rust): synthesize conservative cargo test commands #93. It hasn't yet narrowed a published project's history, so treat selections as advisory. The README doesn't list Cargo as a supported language.Known limitations
.md/.mdxor underdoc(s)/, plus any workspace build script. A runtime read of an extensionless file such as"../README"isn't recognized as a documentation read.Validation
Typecheck, build, release-boundary audit, agent packaging and the synthetic benchmark pass, and the full suite passes locally on Linux (1041 tests). New integration tests cover:
Hosted Linux/Windows Node 22/24, CLI packaging, Observer Action smoke and CodeQL checks pass on this head. The public pinned Rust replay and execution report follow in #95.
DCO signed off. Review reply: #94 (comment)