Repository navigation
feat(analysis): keep production-gap accounting invariant across assertion forms (#3284, S3 of #3213) - #3308
Conversation
…tion forms (#3284) RIPR-SPEC-0154 (S3 of #3213): terminal Err-return guards in test bodies credit as their structural assert! twins through the single classifier — parity by construction, no parallel strength table, no inference from messages. Compound conditions and non-first-statement Err returns (comments, strings) stay unrecognized, fail-closed. The lexical path recognizes guards without consuming the block so assertions inside guard bodies stay visible. Repo-mode probe seeding filters evidence-role owners; cfg(all(test, ..)) module members carry the evidence role. Parity fixture pair pins identical oracle, classification, and gap accounting across the two equivalent forms; cache generations bump for the changed facts and seams at package 0.10.0.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
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 reached
Next review available in: 55 seconds Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (28)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The Linux gate caught a byte-index panic when a guard compares a multibyte operand: the twin-construction scans now iterate char_indices so no slice ever lands inside a character. Pinned by a multibyte guard test.
|
Linux-gate panic fixed in a33f375: the guard twin-construction scanned bytes and sliced inside a multibyte operand. Both scans now iterate char_indices; pinned by a multibyte guard test (the exact CI panic shape). Full smoke suite green locally. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Exact-head review record — REVIEW_READY (author self-review)
|
Production delta
Closes #3284 — S3 of #3213, governed by RIPR-SPEC-0154 (new,
proposed): production-gap accounting is invariant across equivalent harness assertion forms.if <lhs> != <rhs> { return Err(...) }in a test body constructsassert!(<lhs> == <rhs>)(and==→!=,!expr→assert!(expr)) and runs it through the existing single classifier, so the guard carries exactly the kind and strength its assert form would. No parallel strength table. Wired into both the lexical scanner and the ra parser path so both adapters agree.{returnErr(— commented-out or string-embeddedreturn Err(never credits); compound conditions with a top-level&&/||stay unrecognized (their correct negation is not a single assert twin); opaque conditions (matches!, method calls, ordering) produce nothing.#[cfg(all(test, ...))]module members carry the evidence role like plain#[cfg(test)];not(test)/any(test,..)stay production (pinned both ways).Evidence delta
assertion_form_parity_assert_msg/_err_guardfixture pair: same owner, boundary value, and observable under the two equivalent forms — identical classification distribution, identical oracle kind/strength counts, identical evidence paths (verified distribution-equal; the expected outputs differ only in names, identity hashes, and the inherent 3-line length delta).reachable_unrevealedvsweakly_exposed) — observed directly twice (pre-wiring and via a stale-cache replay of guard-blind facts, which is what motivated the cache bump).cfg(all(...))spellings) documented as out of scope.goldens check(zero drift — no existing fixture has an Err-guard in a test body, verified by grep),fixtures,dogfood,precommit, full policy battery green.Acceptance matrix (#3284)
.containscreate no obligationsif/?/map_errstay ordinary subjectsNon-claims
match-arm Err returns,assert_cmdchains, or stdout.containsintegration forms (later corpus-table slices).cfg(all(feature, test))(test-second) spellings remain production — residual documented.Candidate head:
455a0f22(baseorigin/main@b5416cd6).