Context
CodeStory’s retrieval generalization lint prevents benchmark names, holdout paths, and expected-answer shapes from entering production retrieval behavior. Its production scan is sub-minute, but crates/codestory-runtime/tests/retrieval_generalization_guard.rs wraps the lint in 48 Rust tests that mostly start a new Node process.
Those tests share checkout mutations behind a cross-process file lock. cargo-nextest starts them concurrently, so they occupy workers while waiting for the lock and starve unrelated workspace tests. Existing CI evidence shows the Rust wrapper taking 10m25s in the dedicated retrieval job and dominating a 38m33s workspace test phase, while the production lint itself took 39s and the existing Node contract tests took 19s.
This issue owns the first release-blocking repair to that test architecture. It starts from dev/codestory-next at 10344e9b3e871ce0a5b4c0b2a70201aede5dfa28 and must not modify the frozen calibration branch.
Refs #1179
Outcome
Run the full hostile generalization fixture matrix once in an isolated Node process without checkout mutation or global serialization, while retaining one read-only smoke against the real repository.
Scope
- Extract the lint implementation behind an importable Node module and keep the command-line entry point thin.
- Load the benchmark corpus and derive policy once per Node test process.
- Move every hostile fixture into temporary synthetic trees and execute the matrix in one Node test suite.
- Keep one read-only production-repository smoke.
- Remove the Rust subprocess wrapper from the workspace
nextest graph.
- Run the Node matrix as a separate source-proof lane in parallel with Rust workspace tests.
- Update workflow policy and its mutation tests for every workflow change; update
release-claims.json only if the job or claim graph changes.
Acceptance criteria
Verification
- Focused Node contract and hostile-fixture suite with measured wall time.
- Production lint once against the real repository.
- Workflow-policy script and mutation tests.
- Retrieval smoke on the exact head.
- One full exact-head source proof after independent review; do not repeat it for an unchanged commit.
Non-goals
- Do not weaken or delete any generalization ban to gain speed.
- Do not add runners, caches, or test sharding as a substitute for removing serialization.
- Do not redesign reverse-dependency CI selection, package/hardware proof reuse, or repository-wide duration reporting in this PR.
- Do not touch product retrieval behavior or the active calibration source.
Context
CodeStory’s retrieval generalization lint prevents benchmark names, holdout paths, and expected-answer shapes from entering production retrieval behavior. Its production scan is sub-minute, but
crates/codestory-runtime/tests/retrieval_generalization_guard.rswraps the lint in 48 Rust tests that mostly start a new Node process.Those tests share checkout mutations behind a cross-process file lock.
cargo-nexteststarts them concurrently, so they occupy workers while waiting for the lock and starve unrelated workspace tests. Existing CI evidence shows the Rust wrapper taking 10m25s in the dedicated retrieval job and dominating a 38m33s workspace test phase, while the production lint itself took 39s and the existing Node contract tests took 19s.This issue owns the first release-blocking repair to that test architecture. It starts from
dev/codestory-nextat10344e9b3e871ce0a5b4c0b2a70201aede5dfa28and must not modify the frozen calibration branch.Refs #1179
Outcome
Run the full hostile generalization fixture matrix once in an isolated Node process without checkout mutation or global serialization, while retaining one read-only smoke against the real repository.
Scope
nextestgraph.release-claims.jsononly if the job or claim graph changes.Acceptance criteria
retrieval_generalization_guard.rs, including environment inheritance, scan-root containment, task-root policy, non-Rust surfaces, benchmark self-exemption, and stale-fixture recovery without touching the checkout.cargo nextest run --workspace --all-targets --all-featuresno longer builds or executes the Rust generalization wrapper.Verification
Non-goals