Repository navigation
fix(batch-anchor): leaf scheduled envelopes over final signed R - #116
Merged
imran-siddique merged 1 commit intoOct 5, 2026
Merged
Conversation
imran-siddique
approved these changes
Oct 5, 2026
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.
Implements the ruling in #102: new scheduled envelopes are anchored over the final signed record R instead of the producer envelope E, in both modes.
Classification. A staged file is an envelope only when its top-level keys are exactly
producer,trace,signatureandtraceis either a string or an object carrying its ownsignature. Everything else keeps whole-file anchoring in both modes, including direct TRACE records with a top-leveltracemember such assamples/example-trust-record.json.Carrier.
tracemay carry R as its exact JSON text, the wayaggregator/server.pytakesas-transmittedclaims. The producer signature over E covers that string, so the exact text is signed.tracesorted-keyas-transmittedsignatureNo fallback to re-serialized R or to E. Text must parse to an object with unique member names and pass the existing anchor profile. A malformed R text fails the producer's group before anything is written, the same whole-group rule as a failed signature.
Unchanged. Flat and direct records, batch IDs (still over E), signature verification, and historical E-leaf entries, which remain evidence of E inclusion only. No inner-R signature verification is added.
Known non-goal. Entries do not record whether their leaf subject is E or R;
canonicalization_idnames the byte construction only. This change does not add such a marker.Tests. 22 new tests pass; the complete batch module passes 53 tests. Selected repository regression: 377 passed; seven commit-producing tests were excluded. Four targeted mutants were killed: restoring E as subject, reserializing object-valued R, ignoring exact R text, and bypassing outer verification. Ruff passes.
Out of scope: agentrust-io/trace-spec#448 (finding 21).
Closes #102