6 min read Tools Measurements
An AuthorizationV1 verifier from the spec alone: 47 of 48 matched, one spec gap
We wrote a Go verifier for the OxDeAI AuthorizationV1 artifact from the spec alone, and it matched 47 of 48 test cases. The 48th showed two sections of the spec in conflict, the OxDeAI maintainer decided it in the public register, and while comparing our gap entries with the register we found a gap of our own.
The 48th test case, the one that did not match, is called auth-expiry-wins-over-expires-at
. Our verifier answered AUTH_SIGNATURE_INVALID. The corpus value for that case is EXPIRED, which the spec maps to AUTH_EXPIRED. Both answers follow from the OxDeAI spec at commit e288167, from different sections.
We wrote the verifier in Go from the spec alone. It matched the expected verdict and determining code in 47 of the 48 cases. This post is about the 48th, about what the OxDeAI maintainer did with it in public, and about a gap of our own that we found while comparing our gap entries with the register. It is our own work and we are not neutral about it, so we state the limits before we describe the run.
What issue 426 asked for
Issue 426 in the OxDeAI repository sets the task. It pins the spec at e288167, lists the files an implementer may read and the paths to leave alone, and asks for a table per corpus of test vectors: case id, verdict, determining code, step, match or mismatch. The determining code is the one that decides when an artifact fails several checks. Each mismatch is classified as an implementation bug, a reference bug or a spec gap. A gap is a valid result, not a failure, and it goes into a register in issue 430.
We thank the OxDeAI maintainer for that setup. The pinned base, the list of what we could read and the place for a disagreement are why the rest of this post can be checked.
How we built it, and the limits
The verifier is holistis/oxdeai-go-verifier, under Apache-2.0, with no external modules, just the Go standard library. We fetched the eight spec and vector files one at a time with the GitHub contents API at e288167. The files are byte-identical to e288167 by sha256.
Here are the limits:
- The restriction to those files was an instruction and was not enforced technically. The maintainer recorded it: "Go fetched the inputs file by file at e288167; the restriction on other paths was an instruction and was not enforced." (the comment)
- We did not declare the track before starting.
- The instructions for the work were written after reading a shortened text of issue 426 and a summary of the repository, and no verifier code.
- The issue itself names a limit we cannot rule out: a model may have seen the reference in training.
- The Unicode tables for NFC were generated once with a Python script,
tools/gen-nfc/gen_nfc.py, which is in the repository. The build needs no Python: the code and the build use the Go standard library and nothing else.
INDEPENDENCE.md has the full record.
The run
We ran all four corpora. The result: 48 cases, 47 match on verdict and determining code, 1 mismatch classified as a spec gap, 0 NOT_SUPPORTED. Per corpus:
- precedence: 15 of 15
- wire encoding: 10 of 10
- canonicalization: 11 of 11
- authorization: 11 of 12
For the 11 canonicalization cases the compared output is a sha256 or an error code, so a match there means the same hash or the same error. One command from a clean clone runs all of it: go run ./cmd/verify-vectors
.
The 48th case, in two readings
Reading A starts from rule 5 of the section Expiry field resolution in authorization-v1.md. The rule rejects an artifact whose expiry
and expires_at
both exist and differ, with AUTH_SIGNATURE_INVALID. Section 9.1 of verification-v1.md takes the earliest failing step as the determining code, and step 5 comes before step 11. So AUTH_SIGNATURE_INVALID, from step 5, decides. Our code follows step order, so it implements reading A.
Reading B starts from section 14 of authorization-v1.md, which maps the corpus value EXPIRED to AUTH_EXPIRED. So AUTH_EXPIRED decides, and that is what the corpus expects.
Both readings follow the pinned text. We wrote both down with the section references for each, classified the case as a spec gap, and kept the verifier on reading A. Two verifiers can follow the text and still disagree. A second reading is how you find out.
One decision
Before the reproduction, the maintainer wrote on issue 426 that two separately written verifiers giving two determining codes for one case is the falsification condition of that issue. It is a spec conflict and will be resolved in the spec. (the comment)
Issue 430 is the spec-gap register. Its entry SG-013 covers this case, and the maintainer decided it there: "Decided: reading A. The determining code is AUTH_SIGNATURE_INVALID at step 5. AUTH_EXPIRED is an additional code." (SG-013) That is the reading our verifier implements.
The maintainer also announced that section 14 will name this vector as an exception, and that the note in section 14 and the whitepaper will be corrected. That change had not landed at the pinned commit e288167. When we checked on 2 December, the seven files under docs/spec on main were still byte-identical to e288167. Check the current text before you rely on this.
On the reproduction the maintainer wrote that two verifiers had given two determining codes for one case, and that the cause was a conflict between section 14 and rule 5, "resolved in the spec, not in either implementation". (the reproduction)
Reproduction and credit
The maintainer reproduced the Go track from a clean clone at a31fc1f: go run ./cmd/verify-vectors
gives 47 of 48, the one mismatch is that case, go test
passes, and the eight pinned input files are byte-identical to e288167. Under the maintainer's ruling, Go is 48 of 48. We state 48 of 48 under the maintainer's ruling and 47 of 48 without it. (the reproduction)
The same comment carries the credit line: "Credit: the Go track is by @holistis (github.com/holistis/oxdeai-go-verifier) and the Java track by @kawal393 (github.com/kawal393/oxdeai-java-verifier-independent). Thank you both."
The Java track is in kawal393's repository. It is kawal393's work, and we add nothing to the maintainer's words about it. The maintainer wrote that Java "was reproduced at 48/48 yesterday and needs rule 5 applied to the nested encoding". (the reproduction)
The register
Our gap list, SPEC-GAPS.md, has entries G-01 to G-15. The G numbers are local, because we wrote the list without reading issue 430. The register assigns SG numbers. On 2 December the maintainer triaged the list (the triage):
- G-05, the public key format, became SG-022.
- The second part of G-11, key order above U+FFFF and the Unicode version for NFC, became SG-023.
- G-15, a stale cross reference, was confirmed as an editorial fix.
- G-03 was mapped to SG-008, with the section 9.3 point added.
- Most other entries were mapped to existing ones.
So two of our entries (G-05 and part of G-11) became new register entries, and one (G-15) was confirmed as an editorial fix. Our G-01 is the 48th case, which the Java track was also filing, so the maintainer asked us to add our reading to that entry (SG-013) instead of opening a second one (the reply). Most of the rest was already in the register. The maintainer wrote: "Two independent tracks filing against the same register is exactly what #430 is for." (the triage) For our track, the narrow meaning of independent is the one in INDEPENDENCE.md: written from the spec alone, with the limits above.
A gap of our own
By our own account, we found a gap in our verifier while comparing our gap entries with the register. It allowed a boundary that presented neither an action nor a state snapshot, and it consumed the auth_id
of that boundary. Section 9.3 of verification-v1.md says a missing input fails closed, so that boundary should have been denied.
The obvious fix was to require an action. That would have broken two locked vectors, sb-auth-allow-valid
and sb-auth-state-mismatch
, which present a state snapshot and no action. So the fix requires at least one of the two. Pull request 1 merged it, and G-03 in SPEC-GAPS.md describes it. No corpus result changed, so the 48 cases had not shown the gap.
What you can check
Each card links to the place where a stranger can look.
47 of 48
Cases in the four AuthorizationV1 corpora where our verifier matched the expected verdict and determining code, as posted in our run comment; the one mismatch is classified as a spec gap.
Our run comment on issue 426go run ./cmd/verify-vectors
The one command that runs all four corpora from a clean clone; the maintainer got 47 of 48 with it at a31fc1f.
The repositorySG-013
The register entry where the maintainer decided reading A for the one mismatching case; the same comment triages our gap list and adds SG-022 and SG-023.
The decision on issue 430a31fc1f
The commit at which the maintainer reproduced our run from a clean clone: 47 of 48, and 48 of 48 under the maintainer's ruling in SG-013.
The reproduction on issue 426Pull request 1
The merged change that denies a boundary presenting neither an action nor a state snapshot; no corpus result changed.
Pull request 1INDEPENDENCE.md
Our record of how the verifier was written from the spec alone, with the limits: the restriction was not enforced and the track was not declared beforehand.
INDEPENDENCE.mdRule 5 and section 14
The places in authorization-v1.md at e288167 behind the two readings: rule 5 of Expiry field resolution and section 14.
authorization-v1.md at e288167Section 9.1
The place in verification-v1.md at e288167 that takes the earliest failing step as the determining code; step 5 comes before step 11.
verification-v1.md at e288167
What we do not claim
- Written from the spec alone means independent of the reference code, as far as our record shows and within the limits above. It does not mean independent of the spec text. If the text has a mistake, our verifier can carry it.
- 48 of 48 holds under the maintainer's ruling and is 47 of 48 without it. The ruling is a decision about the spec, not a test result.
- The maintainer's reproduction is not an audit of our code. It shows that the command gives the same result from a clean clone, and that the eight pinned input files match e288167.
- Passing the corpora does not show that a verifier is correct. The gap we found in our own code changed no corpus result.
- We say nothing about the Java track beyond what the maintainer wrote about it, which we quote or link.
- This is our own work. We are Tokenizen (tokenizen.nl) and we build these tools ourselves, so we are not neutral here.
Run it, or ask for a second reading
Clone github.com/holistis/oxdeai-go-verifier and run `go run ./cmd/verify-vectors`. If our reading of the spec is wrong on a case, open an issue there. If you maintain a spec and want a second reading written from the text alone, tell us the hardest part to verify at info@tokenizen.nl. What you get is what OxDeAI issue 426 asked of us: a table per test corpus with verdict, determining code, step and match or mismatch, plus a list of spec gaps, the places where the text is unclear or in conflict. If you build agents that pay or get paid and want the same kind of reading of your own format, write to the same address. We reply within two working days with a scoped proposal and a fixed price. No paying customers yet, we say so, and we show our work.