Repository navigation
Publish a signed line index, and ask it what is newer - #233
Merged
Merged
Conversation
REQ-INDEXAUTH-001 has been verified, implemented and tested since 2026-09-06,
and its own `no-publisher-2026-09-06` field says what was missing: "a fetch
path with no publisher is a check that cannot fire." No realm has ever
published a line index — re-measured 2026-10-01, ghcr.io/pulseengine/layers
serves 21 layer tags and zero `line-index-*`. So every consumer-side guarantee
resting on the index was reasoning about a document nobody had written, and
`varve outdated` could only ever answer "cannot answer".
This publishes one. `tools/systest/line-index.sh` deposits two layers, pushes
both into a pinned zot with oras through the recipe `varve docs attach-index`
documents, signs an index naming both, pins a project on the OLDER, and asks
`varve outdated` what is newer. It reports 2026.10.1 over the pinned
2026.10.0, carrying the digest the index signed — and the pin file and store
directory are checked AFTERWARDS to be untouched, because those are what a bad
answer would have changed (clause 4).
FOUR CONTROLS, because every failure here is quiet:
* no index, against a realm that does not declare one -> "cannot answer",
never "nothing newer". Collapsing those two is the one failure a consumer
cannot detect, and it is why a tag listing is refused outright.
* a realm that DECLARED an index and has none -> refused BY NAME. Failing
open would let an attacker simply delete the index (clause 5/6).
* an index signed by a key that is not the realm root -> refused. Without
this the document is decoration.
* an index naming a layer the registry will not serve -> refused BY NAME.
That is the hiding clause 3 exists for.
The gate was negative-controlled: `newer_than` stubbed to return nothing turned
it red on the positive assertion, with the mutation confirmed present in the
rebuilt binary before the verdict was read.
TWO THINGS THE GATE CORRECTED ABOUT ITSELF, both of which would have made it
pass for the wrong reason. The first control ran against a realm declaring
`signed-index = true`, where a missing index is correctly an ERROR rather than
"cannot answer" — the two declarations are now both exercised instead of
conflated, and the declaring case is a fifth check rather than a confusion. And
the realm's trust root was computed here as a sha256 of the public-half file,
which is a DIFFERENT number from the one `keygen` prints; a realm pinned to the
wrong root would have made the impostor control pass for the wrong reason. The
fingerprint is now read from keygen's own output.
TWO EXTRACTIONS INTO lib.sh, because a second gate needed them and a second
copy is a second thing to keep in step:
* the pinned zot/oras download-and-checksum block, whose pins are precisely
the part that must not drift;
* `systest_push_layout`, the push recipe itself — ONE copy of the jq that
`varve docs deploy` documents, now driven twice by this gate and once by
oci-roundtrip.sh.
WHAT IS STILL NOT TRUE OF PRODUCTION: no real realm publishes an index. This
proves the publish recipe and the consumer path work together; it does not make
`varve outdated` useful against the live registry. That remains
pulseengine-layers#6, whose own blocker merged 2026-09-07 — and it is now
de-risked, because the recipe has been executed rather than only written down.
REQ-LAYERDIFF-001 reaches `verified`, which makes every artifact in v0.40.0's
scope verified.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
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.
The check that could not fire
REQ-INDEXAUTH-001has been verified, implemented and tested since2026-09-06, and its own
no-publisher-2026-09-06field says what wasmissing:
No realm has ever published a line index. Re-measured today:
ghcr.io/pulseengine/layersserves 21 layer tags and zeroline-index-*.So every consumer-side guarantee resting on the index — omission detection,
rollback reporting,
varve outdated— was reasoning about a document nobodyhad written.
This publishes one, and is the first exercise of that publisher anywhere.
What the gate does
tools/systest/line-index.sh:oras, throughthe recipe
varve docs attach-indexdocuments;line-index-2026.10;varve outdatedwhat is newer.{ "answerable": true, "pinned": "2026.10.0", "newer": [{"layer": "2026.10.1", "digest": "sha256:44710f9b…", "channel": "rolling"}], "index_counter": 1, "realm": "systest" }The pin file and store directory are checked afterwards to be untouched —
those are what a bad answer would have changed (clause 4).
Four controls, because every failure here is quiet
The gate itself was negative-controlled:
newer_thanstubbed to return nothingturned it red on the positive assertion, with the mutation confirmed present in
the rebuilt binary before the verdict was read.
Two things the gate corrected about itself
Both would have made it pass for the wrong reason.
signed-index = true, wherea missing index is correctly an error rather than "cannot answer". The
two declarations are now both exercised rather than conflated — the declaring
case became a control of its own.
which is a different number from the one
keygenprints. A realm pinnedto the wrong root would have made the impostor control meaningless. The
fingerprint is now read from keygen's own output.
Two extractions into lib.sh
A second gate needed them, and a second copy is a second thing to keep in step:
the part that must not drift;
systest_push_layout— one copy of the push recipevarve docs deploydocuments, now driven twice by this gate and once by
oci-roundtrip.sh.Traceability
REQ-LAYERDIFF-001reachesverified, which makes every artifact inv0.40.0's scope verified:
REQ-LIBCSTATED-001,VER-LIBCSTATED-001,REQ-LAYERDIFF-001,VER-LAYERDIFF-001.Local gates: fmt, clippy
-D warnings,rivet validatePASS, trace-gate OK,cargo test --workspaceexit 0 — 35 suites, 0 failures. The new gate passesend to end locally against a real registry.
Still not true of production
No real realm publishes an index. This proves the publish recipe and the
consumer path work together; it does not make
varve outdateduseful againstthe live registry. That remains pulseengine-layers#6 — whose own blocker merged
2026-09-07 — and it is now de-risked, because the recipe has been executed
rather than only written down.
🤖 Generated with Claude Code
https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu