Skip to content

fix(I-24): parity_block.py — a zero or empty COMPARATOR band is a named refusal, never a ZeroDivisionError traceback; case table both polarities wired into guard-runner-labels (PMAT-972, #2887, #2735) - #3006

Open
noahgift wants to merge 7 commits into
mainfrom
agent/I-24

Conversation

@noahgift

@noahgift noahgift commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

PP-066 DAG row I-24 (issue #2887; defect #2735; epic #2873; ticket PMAT-972; owner perf-gate; receipt docs/audits/impl-PMAT-972-receipt.md, status: partial until merged).

The defect (#2735, verified on main): a zero-token SUBJECT band refused cleanly, a zero-token COMPARATOR band reached median(subject) / median(comparator) and died with a Python ZeroDivisionError traceback — a crash where a verdict belongs.

What lands: _comparator_median(values, label) in scripts/lib/parity_block.py — every median-as-divisor site goes through it; an empty comparator band refuses band <c> comparator: no samples is not a measurement, a non-positive median refuses band <c> comparator: non-positive rate is not a measurement, both through the script's existing refusal path (exit 1); the subject refusal is untouched. scripts/check_parity_block_refusals.sh --selftest (RED first at 72383a9): four generated fixtures — control rc 0; zero comparator, zero subject, empty comparator rc 1 with their texts — every row also asserting no Traceback; wired into guard-runner-labels. Contract contracts/apr-parity-block-refusals-v1.yaml (kind: pattern); README 1812 contracts. _executor_side/_executor_lane/build/main decomposed by pure code motion because the pre-commit complexity gate refused the file over debt three of them carried on main already.

Acceptance, re-run by the orchestrator

A_i rc
bash scripts/check_parity_block_refusals.sh --selftest (4 fixtures) PASS
python3 -m py_compile scripts/lib/parity_block.py · bash scripts/check_thresholds_in_matrix.sh --selftest 0 · 6 passed
pv validate · pv lint · check_contract_test_binding.sh · check_contract_enforcement.sh · check_readme_claims.sh · check_no_claim_literals.sh · check_roadmap_diff_additive.sh · check_guards_are_wired.sh · check_workflow_env_defined.sh · bashrs lint (0 errors) 0 each

Mutation — RED, then restored GREEN: the guard call and the guarded division replaced by the bare statistics.median(subject_values) / statistics.median(comparator_values) → row 2 FAILED with ZeroDivisionError: float division by zero and contains forbidden text: Traceback; restored → PASS.

Recorded: a first docstring (0 / positive == 0.0) read as a float comparison to check_thresholds_in_matrix.sh's CMP regex and broke its self-test — reworded; the card's mutation line numbers had drifted, the sites are now one helper. Receipt for this PR itself: advisory, not produced (driver A1).

…and is a ZeroDivisionError traceback, not a verdict (#2735)

Pmat-Ticket: PMAT-972
…ed refusal (band <c> comparator: non-positive rate / no samples is not a measurement), never a ZeroDivisionError; every median-as-divisor site guarded through _comparator_median; _executor_side/_executor_lane/build/main decomposed to fit the complexity gate (PMAT-972, #2887, #2735)

Pmat-Ticket: PMAT-972
…t comparison to check_thresholds_in_matrix.sh; check_parity_block_refusals.sh --selftest wired into guard-runner-labels (PMAT-972)

Pmat-Ticket: PMAT-972
…comparator band is a named refusal, never a traceback; README contract count 1812 (PMAT-972, #2887)

Pmat-Ticket: PMAT-972
@noahgift
noahgift enabled auto-merge September 6, 2026 06:12
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=3006 head=131de38a2daf34b3815e67c0e565a57f81c73dfb verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

…ork dir, not /usr/bin/apr (check_apr_bin_pinned ABS-APR, guard-runner-labels red on #3006)

Pmat-Ticket: PMAT-972
@noahgift
noahgift disabled auto-merge September 7, 2026 11:53
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.

1 participant