Repository navigation
fix(rust): a file no Cargo target compiles contributes no related test (#8999) - #10207
Conversation
#8999) Files outside src/tests/benches/examples that no manifest, #[path], include! or mod names are marked outside the module tree and their tests are withheld; fail closed on any doubt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 44 minutes. View limit details
Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Verification questions
- Confirm test-fact removal is intended to preserve index consistency, but the safety of indexing test_facts by retained test_order IDs depends on an upstream invariant that this diff does not prove.
- Confirm the documented contract says any doubt keeps the file as before, but the implementation can classify a file as never compiled when a relevant Cargo manifest is not included in manifest_dirs.
- Confirm cargo target discovery is inferred only from literal
.rsnames andmodstems; inferred target roots or generated paths can compile a candidate without matching either set. - Confirm never_compiled scans Cargo.toml files but does not model Cargo target declarations whose path is absent from the scanned text, such as workspace or package metadata generated or omitted from the index.
- Confirm the sibling scan did not cover workspace Cargo metadata or Cargo target auto-discovery across every target kind; verification is needed for custom/default target paths.
- Confirm the new withholding route removes test facts after composition, while fresh/reuse parity is covered only for a manifest-linked leaf addition.
Refuted
- The parser-refused haystack assertion is inconsistent with the disclosed static_unknown limitation.; refuted because: The test explicitly scopes its claim to related-test absence and absence of a lexical-fallback limitation; it does not require classification to change, matching the spec's known limits.
- The changed active-view region could be resized, detached, transferred, or compared against a stale backing-store length.; refuted because: No active-view region, ArrayBuffer, TypedArray, resize, detach, transfer, backing store, or length snapshot exists in the changed Rust paths; the implementation classifies indexed files and removes test facts from deterministic ordered collections.
- The change should require a full Cargo target resolver or additional architecture rather than using conservative textual evidence.; refuted because: The stated acceptance delta is limited to removing credit for positively uncompiled files. Textual ambiguity is handled by retaining files, while explicit Cargo metadata and a general module resolver are declared non-goals.
- The Rust analysis changes introduce or cross a JavaScript-backed worker, async, GC, detach, or transfer memory boundary.; refuted because: No JavaScript, worker, asynchronous callback, runtime object, GC handle, detached buffer, or ownership-transfer API appears in the changed Rust paths or tests; the patch only analyzes Cargo/module reachability and withholds Rust test facts.
Evidence gaps
- Automated execution of the new Rust tests is not yet visible because cargo-test is scheduled late and the ripr sensor failed.
- Model proof intent was rejected by deterministic validation.
…dule tree (#8999) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
|
Independent exact-head review: REPAIR_REQUIRED (source/contract defect). [P2] Macro trivia turns an unknown module into a proven-excluded file Location: The guard recognizes only literal // benchmarks/entry.rs
macro_rules! m { ($n:ident) => { mod
$n; } }
m!(hay);
fn main() {}Cargo compiles and runs This violates SPEC-0356's “any doubt keeps the file as before”: generated module membership is unknown here, not proven excluded. Identity and ownership
Observed proof
Not established: complete Cargo/generated-root coverage, unindexed custom roots, cross-platform behavior, full qualification, or hosted merge readiness. PR-body unit/reuse/mutation claims remain reported evidence. Existing hosted qualification run 40163202822 was in progress when inspected; no hosted work was requested here. Next: canonical writer repairs the macro-trivia exclusion on this same candidate, retains the passing controls, then requests review of the changed head. |
…luded file (#8999) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
|
Repaired the REPAIR_REQUIRED finding on head 8ec3f07. Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
…raw idents, mod.rs and computed includes (#8999) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
…s escaped .rs literals (#8999) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
#8999) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
…s names case-insensitively (#8999) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
|
Independent review of head 1c02fba: CLEAR (index-level probes on a scratch copy; hosted proof still pending). Earlier rounds found and I repaired, each with regressions: Named residual (exotic, not fixed here): an external directory-to-module macro such as Generated by Claude Code |
|
Required check on 1c02fba failed only at Golden output contracts, on drift this PR does not touch: 13 Python human-full fixtures plus Generated by Claude Code |
…tside-tree verdict (#8999) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuJ5J2vLze4cRJra3suroQ
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMEkYAqTh9LZtLbF2mzCYW
Governing issue or accepted claim: #8999
Acceptance delta (one sentence): A Rust file that no Cargo target can compile (a benchmark/corpus haystack outside
src/,tests/,benches/,examples/that no manifest,#[path],include!ormodnames) is no longer listed as a related test and no longer adds a lexical-fallback limitation.What
facts/stray_files.rsdecides which unlinked, non-root files are positively never compiled;role_compositionmarks themoutside_module_treeand withholds their executable tests.mod <stem>, macro-builtmod/include!operands, an unreadable manifest, an unresolved include, a linked/root lexical-fallback file, or an unindexed crate root keeps the file as before.outside_target_haystack.rs).Proof
cargo test -p ripr --lib stray_files(12),--test outside_target_haystack(4),--lib analysis::facts(383), reuse and lexical_test_grip filters;cargo xtask precommitpassed locally.complete_with_findings;#[path]/[[bench]]controls keep the test and the limitation.Not covered
assert_eq!still makes the workspace macro-binding scan ambiguous, so the class may staystatic_unknown(disclosed, fail closed); follow-up.goldens check, hosted CI, real memchr repro, Windows/macOS.Generated by Claude Code