Pin why an inclusion receipt was refused - #354
Open
jasonodoom wants to merge 1 commit into
Open
Conversation
All 33 reject vectors on this surface asserted a verdict and nothing else, so a verifier that refused for an unrelated reason satisfied every one of them. Each now names the check that must refuse it, both runners assert it, and the generator will not emit a reject vector without one. Two gate defects surfaced while doing it. The Go test cache does not track the corpus files the tests read, so a mutated expectation reported ok in 0.004 seconds and caught nothing, where the same run with -count=1 caught it. And a reject vector whose input the Go parser refused at the boundary skipped every assertion, so a parser that refused everything satisfied it. Three cases refuse at the boundary in Go and at a later step in the reference, because the raw-text checks required before the parse run there and not in the reference, which is handed an already-parsed object. They are listed by name rather than hidden. Signed-off-by: Jason Odoom <jason@adastracomputing.com>
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.
First slice of the gates stream. It resets no soak window: no runtime decision
changes, only what the corpus asserts and what the runners check.
The problem
The pre-1.0 audit measured 397 of 655 reject vectors asserting a verdict and
nothing else. A vector that pins only "reject" is satisfied by a refusal from
any check, so a verifier that never reaches the proof walk passes every proof
case. That is the same weakness that let
schema-invalid-non-array-signing-rejectsit green while a real authentication bypass was live in #352: it rejected, for
an unrelated reason.
This does one surface end to end as the pattern for the rest.
What changed
All 33 inclusion-receipt reject vectors now name the check that must refuse
them: structure 13, signature 8, proof 8, checkpoint 4. Both runners assert it.
The step was derived from the reference and reviewed case by case against the
vector names, then confirmed against Go.
Go gained
VerifyInclusionReceiptStepbeside the existing verdict, using thereference's step vocabulary.
VerifyInclusionReceiptkeeps its signature.The generator throws if a reject vector has no declared step, so this cannot
regress by adding a vector.
Two gate defects found while doing it
The Go test cache does not track the corpus files the tests read. Mutating an
expected step and re-running reported ok in 0.004 seconds with nothing caught;
the same run with
-count=1caught it. Every conformance invocation now passes-count=1, andcheck:factsfails any that does not, so a corpus edit cannotbe validated against a cached pass.
A reject vector whose input the Go parser refused at the boundary skipped every
assertion, verdict included, so a parser that refused everything satisfied it.
A boundary refusal is a structural rejection and is asserted as one now.
A divergence this surfaced
Three cases refuse at the parse boundary in Go and at a later step in the
reference:
surrogate-in-event-rejectsandnull-event-rejectsreach proof,and
surrogate-in-event-id-rejectsreaches signature. The enforcement order inink-signed-string-safety.mdrequires the raw-text checks, unpaired surrogatesamong them, to run before the JSON is parsed. The Go runner hands its verifier
raw bytes so they do; the reference verifier takes an already-parsed object, so
the same input travels further before being refused. Both reject, so this is a
question of where rather than whether, and it is independent evidence for the
existing raw-gate finding. The three are listed by name in the runner so the
set cannot widen quietly.
Verification
Mutating one expected step fails both runners. 2405 TypeScript tests, the Go
suite with
-count=1, typecheck andcheck:factsall pass.Not in this change
The other surfaces the audit names, fetch, encryption and key-rotation, need a
reason from the library before their vectors can assert one. Same pattern,
separate changes.