Skip to content

[S3] Adversarial red-test batch — blocked-path, conformance-negatives, mode-corners, frozen result (closes C-65, #182)#189

Merged
Polichinel merged 1 commit into
developmentfrom
story/s3-red-test-batch
Jun 28, 2026
Merged

[S3] Adversarial red-test batch — blocked-path, conformance-negatives, mode-corners, frozen result (closes C-65, #182)#189
Polichinel merged 1 commit into
developmentfrom
story/s3-red-test-batch

Conversation

@Polichinel

Copy link
Copy Markdown
Contributor

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

  • C-65 — non-finite fail-loud on the BLOCKED path: exceedance/expected_shortfall now have a
    parametrized red test (NaN / +inf / −inf) that forces >1 block via block_rows with the bad draw
    in 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.isfinite guard fails all 6 cases.
  • Conformance-suite negatives: assert_reconcile_contract + assert_summarizer_contract are shown
    to reject a deliberately non-conforming implementation (monkeypatched broken impl → AssertionError),
    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).

Validation

  • uv run pytest --cov --cov-fail-under=100 ✅ (line + branch) · ruff ✅ · validate_docs
  • /review-diff CLEAN; the blocked-path test was mutation-verified to catch guard removal.
  • Resolves register C-65 (relocated to Resolved; open 12→11).

🤖 Generated with Claude Code

)

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>
@Polichinel Polichinel merged commit bbfa711 into development Jun 28, 2026
7 checks passed
@Polichinel Polichinel deleted the story/s3-red-test-batch branch June 28, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[S3] Red-test batch — non-finite blocked path, conformance-negatives, mode-corners, frozen result (closes C-65)

1 participant