Repository navigation
fix(rust): ignore comment and string module mentions in test discovery - #7603
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughThe Rust module-name prefilter now ignores declarations inside comments and strings. Regression tests and a new fixture cover orphaned test files, real and renamed ChangesRust module discovery
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Low Possibly related PRs
Merge Risk: ⚪ Minimal · up to
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_INCOMPLETE at 6992375. Independent exact-head candidate review found no remaining actionable findings after repairing the missing full-human oracle artifact.
Inspected surfaces: complete 19-file delta; declaration prefilter → authoritative module walk → dropped-file set → fact-cache/index → public related-test projection; shared comment/string masker; source-role spec and traceability; literal honesty assertion and JSON/compact/full human outputs.
Observed: actual public-consumer RED (phantom discount_applies), GREEN3/0, independent Cargo1.95.0 orphan and renamed nested module inventories, wrong >= control failing90vs100, and honesty-gate artifact RED/GREEN. Full-human artifact matches retained renderer output SHA-256 1464c312fc280ea92f578761bf3b436ef29cffa489efbd156f718ead2b93dd3e. Raw path hints remain unmasked and an incomplete walk retains credit. Filtering precedes cache lookup, so cached orphan facts cannot restore dropped files.
Not established yet: terminal final-head check-fast/focused compatibility results, full golden/dogfood/precommit results, hosted required checks, hosted review/thread disposition, or native Windows/macOS execution. Shell protection/ruleset reads returned Forbidden; protection is not assumed absent and no bypass is authorized. Draft→Ready qualification and complete published-head review remain required before normal protected squash merge. This author-side COMMENT is an inspection record, not an approval or merge-readiness claim.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_INCOMPLETE at 9fa309e; local acceptance supported, no remaining actionable findings.
Independent read-only exact-head review inspected the complete 18-file change and real consumer chain: shared masking → declaration prefilter → complete/incomplete module walk → file filtering before fact-cache lookup → public related-test findings. Literal Cargo inventories, actual public-consumer RED/GREEN, renamed nested cfg(test) positives, opaque-walk retention, and wrong-boundary assertion failure were challenged.
Observed local evidence on the final head: check-fast 15 gates/no skips and independently matching 18-path selector; precommit report/receipt pass at exact head/base; 24 consumer tests pass; all three affected fixture output surfaces pass; frozen CLI embeds the reviewed head and independently produces exactly one no_static_path finding with zero related tests. Executable SHA-256: cc14c2a1b7428dbd193756c394fa327d7bbfdcbe10b54c965047c4dd2f463c9b. Direct native commands exited 0; the independent reviewer inspected retained reports/logs rather than rerunning them.
The prior full golden run at source-identical 6992375 passed 385 selected/executed/compared fixtures and all 939 surface comparisons. The later change only removes a generated std-only fixture lockfile; no source, assertion, expected-output or dependency-policy bytes changed, and the affected fixture was refreshed. The first golden failure was the documented unprepared locked anyhow dependency, verified on exact base and candidate and repaired through setup only.
Remaining boundary: current-head Routed Rust Small run38340964920 and other hosted required proof/review must finish and be inspected before REVIEW_READY or normal protected squash merge. Current thread read returned zero; empty threads and provider quota messages do not establish review. No auto-merge or bypass is armed. Shell protection/ruleset reads returned Forbidden, retained as an evidence gap. Native Windows/macOS execution by this lane is not claimed; hosted Windows Advisory succeeded.
There was a problem hiding this comment.
Parked follow-ups
- Honesty-gate artifact issue referenced in PR body ('full human output' SHA-256 1464c312...) was resolved by retaining actual renderer output without changing literal assertion, per prior review summary; no overclaim.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY for published head 9fa309e.
Independent read-only review inspected the complete 18-file delta and actual consumer chain: shared masking → declaration prefilter → authoritative complete/incomplete module walk → filtering before fact-cache lookup → public related-test output. Actual consumer RED/GREEN, independent literal Cargo 1.95.0 inventories, renamed nested cfg(test) positives, opaque-walk retention and wrong >= boundary control were challenged. Raw literal path hints remain intact; incomplete walks keep credit. The orphan cannot acquire cached test facts after filtering.
Retained exact-head local proof: all 15 check-fast gates/no skips with independently matching 18-path selector; precommit passed; 24 public consumers passed; JSON/compact/full-human affected fixture comparisons passed. Frozen final CLI SHA-256 cc14c2a1b7428dbd193756c394fa327d7bbfdcbe10b54c965047c4dd2f463c9b reports exactly one no_static_path finding with zero related tests. Source-identical predecessor 6992375 passed 385/385/385 golden fixtures and 939 surface comparisons; only a generated std-only lockfile was subsequently removed.
Hosted qualification: required run38340964920 completed SUCCESS for this exact PR head. The actual checkout was d28664f (verified Git parents 6bd4e76 and 9fa309e). Native cargo nextest reported 14904 passed across81 binaries,2 skipped, including all3 new discovery tests and21 assertion-helper controls. Actual Rust gates job and required Result job succeeded; all15 gate result inputs are success, doctests succeeded. Native output and workflow exit handling were inspected, rather than accepting an aggregate alone.
Integration basis: current main eb98f33 composes without conflicts to tree92dd489736ed45a8453b35ccbbcf237b059e1cbb. The entire added/removed18-file delta matches the original candidate; all16 non-additive candidate blobs are preserved, with additive corpus/traceability changes only. New upstream inequality-oracle rules cannot affect the orphan's absent reachable oracles or the positives' discovery-name assertions. The Rust discovery/mask/module-walk source is unchanged; single-finding human rendering remains unchanged. No restack or duplicate local build was needed.
Live disposition: zero inline threads; CodeRabbit inspected exacthead18files and reported no actionable comments with successful status. UB's parked artifact follow-up is repaired; its rejected model-proof intent is a provider evidence gap, not an active source finding. Gemini quota and pending Droid review are unavailable provider output, not clean reviews; the substantive independent pass and CodeRabbit supply an adequate alternative.
Residual limits: artifact metadata identifies exacthead/run, but archive/JUnit payload access returned403; those bytes/digest were not verified and no alternate route was attempted. Native Windows/macOS proof is not claimed. Protection/ruleset reads previously returned Forbidden and were not retried; policy absence/bypass is not inferred. The API mergeable boolean is false while native composition is clean; normal protected squash must still accept the operation before any merge is claimed. Other #6979 leaves, direct Err seams, #7553 and #7563 remain outside this delivery.
This author-side COMMENT records the earned published-head disposition; it is not a human approval or protection exception.
Summary
Rust diff discovery could credit an unchanged test file that Cargo never
compiles when a comment or string contains
mod <file_stem>;. Mask commentsand literals in the existing suspect prefilter's declaration scan, preserving
literal path hints and the authoritative module walk's incomplete result.
Refs #6979, item 5's comment/string subcase only. The parent remains open for
same-package name coincidence, repo/dependent scope, ambiguous target roots
and cfg-edge follow-ups.
Swarm / Source Boundary
EffortlessMetrics/ripr-swarm.Scope and acceptance
Production delta: one existing declaration-mention scan in
analysis/language/rust/mod.rs. No new discovery authority, dependency,schema, support-tier or process/network change.
Evidence delta: three public API integration tests, one retained nested-orphan
fixture with JSON/human goldens, an independent honesty-corpus literal class
pin, RIPR-SPEC-0153 and traceability updates.
Acceptance: an unchanged orphan whose module is mentioned only inside a
comment/string contributes no related test; actual
cfg(test)and renamedliteral-path modules retain their test, and an incomplete walk retains credit.
Governing spec: RIPR-SPEC-0153.
Candidate:
9fa309e96197fbccf8068dfd3b7e42a8e3574fb0, based onbe2ad06fa86edf2cca68f9dd0ffb107b94c16484. No stack prerequisite or replacement PR.Observed proof
Rust/Cargo 1.95.0 on Linux, serial builds:
worktree doctor,check-fast(verified zero changed paths)and
cargo check --locked -p ripr --all-targets: passed.rust_discovery_comments: intended RED (2 controls passed, 1 falsediscovery assertion failed), then GREEN (3 passed, 0 failed).
test --all-targets -- --list: orphan has zero unit testsplus exactly
integration_is_collected; renamed nested#[path]controlhas exactly
tests::renamed::discount_appliesplus that integration test.These inventories are checked against independent literal names.
>with>=failsthe boundary assertion with actual
90versus literal expected100.discount_applieson both orphanshapes. The repaired fixture has exactly one
no_static_pathfinding andan empty related-test list.
git diff --check: passed.The reviewer found that the honesty gate also requires full human output.
The gate reproduced that missing-artifact RED, and passed after retaining the
actual full renderer output without changing the literal assertion.
At repaired head
9fa309e96,check-fastpassed all 15 selected gates withan independently verified 18-path selector, and precommit passed, including
dependency, process, network and strict lint policy. The focused public
compatibility suites passed 24 tests (21 existing helper controls and 3 new
discovery controls).
The preceding source-identical head
699237517passed the complete goldenrun: 385 selected/executed/compared fixtures, 939 passing surface comparisons,
zero drift. Dogfood passed. The only later change removes the new std-only
fixture's unnecessary generated lockfile; source, assertions and expected
outputs are unchanged. The current discovery fixture passed all three JSON/human/full-human
comparisons, and the frozen final CLI independently produced one
no_static_pathfinding with an empty related-test list.The first full golden run had a setup failure: this fresh Cargo home lacked
the separate locked anyhow 1.0.100 fixture dependency required by
docs/TESTING.md. Exact-base and candidate finding payloads agreed beforeand after the documented locked fetch. No source or expected output was
changed to resolve that failure. Precommit then rejected the unnecessary
new fixture lockfile; removing it preserved the dependency policy unchanged.
Required Routed Rust Small run completed SUCCESS at the exact final head. Its actual checkout was
d28664f3c7199dbd9e692b9dfeb3ecdd0120d653(verified parents: main6bd4e76cce997a216f11d7841d80a14b280f4070and candidate9fa309e96197fbccf8068dfd3b7e42a8e3574fb0). Native nextest reported 14,904 passed across 81 binaries, two skipped, including all three new tests and 21 helper controls. The actual gate job, doctests and required Result job succeeded; all 15 gate inputs reported success.Current-main integration review against
eb98f3300bc2df258db03b790276ee4d193d0cf5found a clean composition to tree92dd489736ed45a8453b35ccbbcf237b059e1cbb, preserving the complete candidate delta and upstream additive corpus/traceability entries. No restack or duplicate build was needed. Source of Truth, Printed Command Paste, Security and Windows Advisory also succeeded. Artifact metadata binds the exact head/run, but payload access returned HTTP 403; archive/JUnit bytes and their digest were not verified, and the denied route was not retried. Protection/ruleset reads remain unavailable; no bypass is authorized.Review, limits and rollback
Independent published-head review earned
REVIEW_READYafter inspecting consumer/oracle/source/output evidence, actual hosted steps and current-main composition. CodeRabbit also inspected exact-head 18 files and found no actionable comments. Live inline threads are empty. Pending Droid and quota-limited Gemini output are not claimed as clean reviews. Native Windows/macOS execution is not claimed; the path hints and case-sensitive module-walk policy are unchanged.Merged through the ordinary protected squash API at
0381f98e7ad1a8c10c2e15deda8ceed310cd0d54. GitHub confirms merged/closed at 2026-10-13T04:12:59Z. Fetched main contains that commit; its actual parent is the reviewedeb98f3300bc2df258db03b790276ee4d193d0cf5and its tree is exactly92dd489736ed45a8453b35ccbbcf237b059e1cbb. The full 18-file landed delta matches the reviewed candidate. The prior false mergeability flag did not establish a source conflict. No bypass or settings change was used.This does not repair the other #6979 leaves, general cfg evaluation, arbitrary
macro expansion, repo-mode test discovery, direct Err seams, #7553 or #7563.
Revert this single candidate to restore the prior prefilter and evidence.
Next eligible discovery work remains tracked on #6979.
Changelog disposition:
changelog.d/6979-commented-module-discovery.mdusesthe canonical
<!-- section: Fixed -->marker,-bullet and trailing(#6979)reference. No policy exceptions or gate weakening are introduced.