feat(wire): S2/#107 — §2 contract header builder (pinned order, closed sub-objects)#116
Merged
Merged
Conversation
…venance build_header emits the 13 §2 keys in the contract-pinned order so independently written headers byte-match the §10 fixture (proven: byte parity with the Track-A metadata.json AND equality with the arrow shard's embedded header). The closed provenance sub-object rejects extra/missing keys naming them; provenance key order is re-pinned regardless of caller dict order. Mirrors the fixture generator without importing it — the fixture stays canonical. Part of epic #105. Closes #107. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Second story of epic #105.
What
unfao/wire/header.py:build_header(...)— the 13 §2 keys in the pinned contract order;CONTRACT_VERSION="1.5"; the closedprovenancesub-object enforced (extra/missing keys raise, named);id_semanticsandshardingconstructed internally (closure inherent). No clock/id minting — everything declared by the caller (§10.2 pass-through).AC (all met)
json.dumps(build_header(...), indent=2)byte-equals the fixture Track-Ametadata.json.vf_arrow.load → state['metadata']).Closes #107. Epic #105 · Tracking #114.
🤖 Generated with Claude Code