spec: adversarial hardening of the Assay — measured trust, not asserted - #278
Merged
Conversation
Self-review of the merged Assay found four defects; this fixes them. F1 (critical): the verifier's *conclusion* was never recorded — only its reliability. 'bad' was reachable solely via broken integrity, so a claim refuted by a calibrated verifier (clean integrity) could not project bad. Add verifier.judgment (supported|refuted|abstained); refuted+calibrated -> bad, refuted+uncalibrated -> sad (an uncalibrated judge cannot force a verdict). F2 (critical, ironic): AssayStandard.calibrated was a self-asserted boolean — the exact assert-vs-measure anti-pattern the framework exists to kill, on the one flag that gates 'ok'. Add explicit calibrationThreshold; the validator now recomputes F1 from confusionMatrix and rejects any record whose calibrated flag disagrees with (derivedF1 >= threshold). F3: declared metrics (f1/precision/recall) were never checked against the confusion matrix. Validator now recomputes and rejects contradictions. F4: agreement.effectiveVotes could exceed arms, defeating the decorrelation discount. Validator now rejects effectiveVotes > arms. F5 (documented): the projection intentionally does not consume the agreement axis for 'ok' — a deterministic computed+inline result needs no vote. Noted in schema + README rather than left silent. Adds a genuinely-uncalibrated AssayStandard fixture (deployed-nli, F1 0.26) so the sad-path references real recorded-but-weak reliability. All new gates verified biting via negative tests.
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.
Self-review of the merged Assay (#198) — I red-teamed my own work and found four defects. This fixes all four and documents a fifth as intentional.
Findings & fixes
badwas reachable only via broken integrity, so a claim refuted by a calibrated verifier (clean integrity) could not projectbad.verifier.judgment(supported/refuted/abstained).refuted+ calibrated →bad;refuted+ uncalibrated →sad(an uncalibrated judge cannot force a verdict).AssayStandard.calibratedwas a self-asserted boolean — the exact assert-vs-measure anti-pattern the framework exists to kill, on the one flag that gatesok.calibrationThreshold; the validator recomputes F1 fromconfusionMatrixand rejects any record whosecalibrateddisagrees with(derivedF1 >= threshold).metrics(f1/precision/recall) were never checked against the confusion matrix.agreement.effectiveVotescould exceedarms, defeating the decorrelation discount.effectiveVotes > arms.agreementaxis forok.Verification
tools/validate_reasoning_examples.pyis green, and every new gate was confirmed to bite via negative tests:calibrated: trueon an F1-0.26 standard → rejectedf1: 0.95contradicting the matrix → rejectedarms: 1, effectiveVotes: 99→ rejectedrefuted+ calibrated →bad;refuted+ uncalibrated →sadAdds a genuinely-uncalibrated
AssayStandardfixture (deployed-nli, F1 0.26, κ "slight") so the sad-path references real recorded-but-weak reliability instead of an absent lookup.Theme
The original framework measured a claim's trustworthiness but let the judge assert its own. This closes that loop: trust is measured and cross-checked at every level, never asserted — the principle applied to the judges themselves.
Note: sourceos-spec auto-merges on green CI, so this is expected to land automatically; flagging for post-merge visibility.