Skip to content

security(certification): stop the witness comparer coercing types (#462, #459) - #473

Merged
IanFrelinger merged 3 commits into
masterfrom
claude/fix-certification-correctness
Sep 1, 2026
Merged

security(certification): stop the witness comparer coercing types (#462, #459)#473
IanFrelinger merged 3 commits into
masterfrom
claude/fix-certification-correctness

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

#462 (white-box lab, reviewed clean): the correctness gate's value comparer coerced across kinds — a double rounded into an int (2.4==2), and an int equated with its decimal string or a bool — so a wrong-by-<0.5 or wrong-typed brick output passed the exact-behavior proof. Both comparers now match type-first (integral↔integral, bool↔bool, else unequal); same-type values still match. Tests pin every hole and every preserved case.

#459: mutant ids disambiguated (#2/#3) so the signed ledger is unambiguous; Status XML docs corrected to the PASS/FAIL the gate writes.

Gates: cert-gate 402/402 (no witness regressed); certification suites 35/35. Opus review: clean.

[coordinated-integration]

🤖 Generated with Claude Code

IanFrelingerand others added 3 commits September 1, 2026 11:58
Lab finding #462 (white-box), adversarially reviewed clean. The correctness
gate proves EXACT witnessed behavior, but its value comparer coerced across
kinds: Convert.ToInt64 rounded a double into an int (2.4 == 2, 1.5 == 2 by
banker's rounding) and the string fallback equated an int with its decimal
string or a bool. A brick whose real output was wrong-by-<0.5 or wrong-typed
passed the proof the gate exists to make. Both comparers (WitnessValueComparer
and the duplicated WitnessRunner.ValuesEqual) now match type-first: if either
side is integral (resp. boolean), BOTH must be, else unequal; strings and
floats keep the invariant-string compare. Same-type values still match
(int 42 == long 42, "hi" == "hi", 3.14 == 3.14). New unit tests pin every
closed hole and every preserved case.
Also from #459:
- Mutant ids are disambiguated (#2/#3 on a repeated {kind}-{line}) so the
SIGNED survivor/killed ledger is unambiguous — two mutations on one line no
longer share an id.
- Certification record Status XML docs corrected from "ADMIT/REJECT" to the
PASS/FAIL the gate actually writes (3 model files), so a consumer matching
the documented labels stops misclassifying every record.
Gates: cert-gate 402/402 (the comparer change broke no existing witness);
certification suites 35/35. Adversarial review (Opus): clean.
[coordinated-integration]
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@IanFrelinger
IanFrelinger merged commit 7135ae5 into masterSep 1, 2026
15 of 16 checks passed
@IanFrelinger
IanFrelinger deleted the claude/fix-certification-correctness branch September 1, 2026 16:45
Sign up for freeto 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

@IanFrelinger