[S3] Adversarial red-test batch — blocked-path, conformance-negatives, mode-corners, frozen result (closes C-65, #182)#189
Merged
Conversation
) Add the direct adversarial tests the 100%-coverage suite masked (coverage ≠ contract-failure testing); no src/ change, 100% line+branch coverage held: - C-65: non-finite (NaN / ±inf) fail-loud in exceedance/expected_shortfall is now pinned on the BLOCKED (multi-block) path — the bad draw forced into a non-first block via block_rows with block 0 all-finite, so a guard that inspected only the first block would regress silently. Mutation-tested: neutering the guard fails all six cases. - Conformance-suite negatives: assert_reconcile_contract and assert_summarizer_contract are shown to REJECT a deliberately non-conforming implementation (monkeypatched), the leaf's C-51 envelope-negative pattern extended to the sibling packages. - Reconcile mode-corners: reconcile_result.mode for both-points and pre-tiled-cm (both ALIGNED_DRAWS); ReconciliationResult frozen-ness (FrozenInstanceError). Resolves register C-65 (relocated to Resolved; open 12→11). Epic #179 / S3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Epic #179 · Story S3 · closes #182 · resolves register C-65
Adds the direct adversarial (red) tests the 100%-coverage suite masked — coverage ≠
contract-failure testing. No
src/change; 100% line+branch coverage held.Changes
exceedance/expected_shortfallnow have aparametrized red test (NaN / +inf / −inf) that forces
>1block viablock_rowswith the bad drawin a non-first block and block 0 all-finite — so a guard hoisted to inspect only the first
block would regress silently. Mutation-tested: neutering the
np.isfiniteguard fails all 6 cases.assert_reconcile_contract+assert_summarizer_contractare shownto reject a deliberately non-conforming implementation (monkeypatched broken impl →
AssertionError),the leaf's C-51 envelope-negative pattern extended to the sibling packages.
reconcile_result.modefor both-points and pre-tiled-cm (bothALIGNED_DRAWS);ReconciliationResultfrozen-ness (FrozenInstanceError).Validation
uv run pytest --cov --cov-fail-under=100✅ (line + branch) ·ruff✅ ·validate_docs✅/review-diffCLEAN; the blocked-path test was mutation-verified to catch guard removal.🤖 Generated with Claude Code