test(conformance): let accepted_rejection disposition an empty-projection Err (#903)#904
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a ChangesEmpty-projection opt-in disposition
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai resume |
|
@coderabbitai review |
✅ Action performedReview finished.
|
✅ Action performedReviews resumed. |
|
@coderabbitai resume |
|
@coderabbitai review |
✅ Action performedReviews resumed. |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/it/mutalyzer_normalize_tests.rs`:
- Around line 573-590: The contract comment for record() is outdated because it
still says accepted_rejection only buckets non-empty-projection Errs and that
the empty-projection sentinel always hard-fails, which no longer matches the
logic in the accepted_rejection check. Update the comment near record() to
reflect the opt-in exception via disposition_empty_projection(), using the
accepted_rejection, EMPTY_PROJECTION_SENTINEL, and
disposition_empty_projection() symbols so the documented behavior matches the
implemented branch.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 30adc43a-427b-479f-a6db-a2af54dfe956
📒 Files selected for processing (2)
src/conformance/mutalyzer.rstests/it/mutalyzer_normalize_tests.rs
fb66d2e to
b275cb1
Compare
…tion Err (#903) An empty-projection Err (ferro produces no output on an axis) could get no typed disposition: accepted_divergence/known_bug/spec_citation are gated behind actual.is_ok(), and accepted_rejection explicitly excluded the EMPTY_PROJECTION_SENTINEL — so a row where ferro spec-correctly declines but the comparator emits a value (e.g. #891's c.-1_1insCAT: ferro declines protein per the #857 non-CDS policy, mutalyzer emits p.(=)) could only land in the raw baseline-failures ledger, never a typed bucket. This is why ~18 protein_description rows can't leave that ledger, blocking #326's close condition. An empty projection is a *decline*, and accepted_rejection is already the Err-on-projection-axis disposition — its only blocker was the sentinel exclusion. So: add a RejectionReason::NonCdsNoProjection857 variant + a closed disposition_empty_projection() predicate, and relax the record() exclusion to admit the sentinel only for an opt-in reason. This reuses the existing decline home rather than adding a second Err-exception to accepted_divergence. Safety: the empty_got increment is unconditional at the top of record() (above all returns), so the #764-pinned empty-projection COUNT gate still catches any rise regardless of bucketing; the XPASS guard still fires if ferro starts matching; a genuine panic still hard-FAILs; a non-opt-in reason keeps the pre-#903 hard-FAIL (disjoint by construction). Mechanism + hermetic tests only — no src production code, no corpus/ledger change. Converting the real rows (#891 + the ~17 init-codon rows) to this typed disposition is a follow-up re-bless (#861 / amend #900). Full suite 7683 passed; clippy -D warnings + fmt clean.
b275cb1 to
a26f367
Compare
Closes #903.
Problem
AxisTally::recordcould give no typed disposition to an empty-projectionErr(ferro produced no output on an axis):accepted_divergence/known_bug/spec_citationare gated behindactual.is_ok(), andaccepted_rejectionexplicitly excluded theEMPTY_PROJECTION_SENTINEL. So a row where ferro spec-correctly declines but the comparator emits a value — e.g. #891'sNM_000143.3:c.-1_1insCAT(ferro declines protein per the #857 non-CDS policy; mutalyzer emitsp.(=)) — could only land in the rawbaseline-failures/<axis>.txtledger, never a typed bucket. This is why ~18protein_descriptionrows can't leave that ledger, blocking #326's "every ledger empty" close condition.Fix
An empty projection is a decline, and
accepted_rejectionis already the Err-on-projection-axis disposition — its only blocker was the sentinel exclusion. So (adversarial review picked this home over grafting a second Err-exception ontoaccepted_divergence):RejectionReason::NonCdsNoProjection857+ a closedRejectionReason::disposition_empty_projection()predicate (_ => false, so opting in is a deliberate reviewed choice, never an ad-hoc flag).record()accepted_rejection condition to admit the sentinel only when the reason opts in.Safety — no masked regressions (verified)
empty_gotincrement is unconditional at the top ofrecord(), above every disposition/return, so the#764-pinned empty-projection count gate infinishstill catches any rise regardless of bucketing.accepted_rejectionbuckets onlyErr, so if ferro starts emitting a value it is not masked — anOkthat matches XPASS-FAILs (stale annotation caught), anOkthat mismatches hard-FAILs (ferro stopped declining).Payoff
Gives the ~18 empty-projection
protein_descriptionrows a typed, XPASS-guarded disposition instead of raw ledger entries — advancing #326's close-path (option (b) in the #326 close-condition caveat) and unblocking their conversion in the #861 sweep.Scope
Mechanism + hermetic tests only — no
src/production code (projector/normalizer), no corpus/ledger change. Converting the real rows (#891's row + the ~17NG_init-codon rows) to this typed disposition is a follow-up re-bless (#861 / an amend to #900), kept out here so the mechanism lands conflict-free with the in-flightcases.jsonPRs.Verification
Full suite 7683 passed; new hermetic tests cover: opt-in buckets an empty
Err(+ count still increments), non-opt-in still FAILs, opt-in still buckets a non-emptyErr,Ok-mismatch still FAILs, and the predicate/serde round-trip.clippy -D warnings+fmtclean.Summary by CodeRabbit
New Features
Bug Fixes