feat(format): apr-code-parity-v1 5-gate PARTIAL discharge#1392
Closed
noahgift wants to merge 2 commits into
Closed
feat(format): apr-code-parity-v1 5-gate PARTIAL discharge#1392noahgift wants to merge 2 commits into
noahgift wants to merge 2 commits into
Conversation
Binds FALSIFY-CODE-PARITY-001..005 from apr-code-parity-v1 at PARTIAL_ALGORITHM_LEVEL via 5 verdict functions plus pinned shipped-floor (9) / missing-ceil (4) constants. - CODE-PARITY-001: every row's cross-check passes (rows_passing == total) - CODE-PARITY-002: headline.counts == row tally (shipped/partial/missing) - CODE-PARITY-003: prose ↔ YAML rows match (category, status, ticket) - CODE-PARITY-004: P0 ticket closed → row updated AND headline incremented - CODE-PARITY-005: epic closeable iff shipped ≥ 9 AND missing ≤ 4 ## Five Whys 1. Why does apr-code-parity-v1 list 5 falsification IDs without algorithm-level discharge? PMAT lints flagged FALSIFY-CODE-PARITY-001..005 as DRAFT and unbound at PARTIAL_ALGORITHM_LEVEL. 2. Why does that block ship? Coverage % cannot move while the parity-matrix-v5.1 contract has no algorithm-level verdict module. 3. Why a 3-tuple `(category, status, ticket)` for CODE-PARITY-003? The contract specifies "every (category, status, ticket) tuple matches." Including all three fields catches the regression class "ticket renamed in YAML but markdown still shows old name" — a pure category-only check would miss that. 4. Why vacuous Pass for CODE-PARITY-004 when ticket is open? The gate predicate is "ticket_closed → row_updated AND headline_bumped." When the antecedent fails (ticket still open), the implication is vacuously true. Returning Fail would penalize every PR-time check on a still-open ticket — not what the contract specifies. 5. Why pin both AC_CODEPARITY_SHIPPED_FLOOR=9 AND AC_CODEPARITY_MISSING_CEIL=4 (per the YAML acceptance_criterion)? The matrix v5.1 epic close gate is binary on both bounds — a single threshold (e.g., shipped/total ≥ 0.5) would let "shipped=9 but missing=10" silently pass. Both bounds catch the regression class "sweep more partials into MISSING bucket without shipping anything new." Adds 22 unit tests including a 4×4 eligibility band for CODE-PARITY-005. Realistic-healthy walks the canonical 14/3/4 epic-eligible state; pre-fix walks 5 simultaneous regressions (failing cross-check, headline drift, prose drift, P0 ghost-close, premature epic close). No runtime % shift; algorithm-level coverage advances by 5 gates.
78714d5 to
12986d7
Compare
Contributor
Author
auto-merge was automatically disabled
May 12, 2026 09:21
Pull request was closed
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.
Summary
apr-code-parity-v1atPARTIAL_ALGORITHM_LEVELvia 5 verdict functions.Gates bound
rows_passing == total)headline.countsmatches actual row tally (shipped/partial/missing)(category, status, ticket)tuples matchshipped ≥ 9ANDmissing ≤ 4Pinned constants
AC_CODEPARITY_SHIPPED_FLOOR = 9AC_CODEPARITY_MISSING_CEIL = 4Five Whys
See commit message — captures vacuous-Pass for open tickets and why both shipped/missing bounds are required.
Test plan
cargo test -p aprender-core --lib codeparity_001_005— 22 passed🤖 Generated with Claude Code