fix(report): fail closed on collapsed review evidence - #347
Merged
Conversation
🗺️ StyleProof report📊 View the side-by-side visual report →Coverage, determinism, or report/diff consistency evidence is incomplete — repair the capture or reflow source; visual approval cannot clear this failure. |
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.
Why does this feature exist?
StyleProof 4.7.5 can pair path-churned elements for report presentation. A late independent QA pass found a fail-open edge case: if correspondence pairs every removed/added node in a sibling reorder or nesting bijection, presentation becomes empty even though the raw certification differ still has reviewable evidence. The generated Markdown then says “All surfaces identical” and the standalone report CLI exits
0.This must fail closed. Presentation is allowed to simplify certification evidence; it is not allowed to erase all of it and claim a clean comparison.
What changed?
report.json,ReportResult, the report CLI, and the composite Action.presentation_collapsed_while_raw_reviewablewhen raw reviewable evidence remains but correspondence removes every presentation section.styleproof-reportexit1for this contradiction.CERTIFICATION_FAILED.3.14.0and made pre-commit run the same dedicated production complexity gate as CI against the staged diff, in addition to the existing audit.Behavioural Proof (with video and screenshots)
Not applicable — this repairs report/coherence control flow and CLI exit semantics; it does not change StyleProof's product UI or crop rendering.
Deterministic proof:
reportConsistencywas{ ok: true, reason: "aligned" }.{ ok: false, reason: "presentation_collapsed_while_raw_reviewable" }, the Markdown containsReport consistency failure, and it does not contain✓ All surfaces identical.styleproof-reportexits1and never prints✓ no changes.Verification Summary
npm test— 658/658 passed.npm run typecheck— passed.npm run lint— passed.npm run format:check— passed.npm run privacy:check— passed.npm run demo:check— passed.npm audit --audit-level=high— 0 vulnerabilities.git diff --check— passed.9d98ff5a9d63e4b7e3890f8c02226bfb860489b5— PASS; 182/182 focused Action/report/CLI tests passed and live collapse reproduced as unapprovableCERTIFICATION_FAILED.0c95f0c88bedde6512a4d1b761d45a31860c3c6e— 0 findings;summaryLinescognitive complexity reduced from 19 to 9.0c95f0c88bedde6512a4d1b761d45a31860c3c6e— PASS; report prose was byte-identical across all typed consistency cases andtest/report.test.mjspassed 93/93.1before commit.4369af018af9f7bc62a65bce4e8d049a728af284— PASS; local and remote heads matched, report/Action fail-closed behavior passed, Fallow positive/negative hook probes passed, and all hosted checks were green on the same SHA.PR Proof Law
.agents/definition_of_done.mdand the proof workflow.