Phase 2: Encode and validate strict version-4 JSONL #634
No reviewers
Labels
No labels
bug
cli
core
docs
event
experiment
figure
invariant
metrics
oracle
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
provenance
revocation
tests
workload
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erikinkinen/AES!634
Loading…
Reference in a new issue
No description provided.
Delete branch "phase2/p2-07-b-v4-codec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Closes #95 (P2-07-B).
Summary
Add strict version-4 JSONL codecs and a deterministic closed Draft 2020-12 schema. IDs and rights retain all 64 bits; malformed lexical input, duplicate keys, unknown fields and incomplete logs fail without returning partial output.
Scope
Encode all eleven actions, seven intent payloads and nineteen delta stores in canonical field order. Check unsigned numeric syntax, UTF-8, complete-log clock/cursor continuity, identity ordering, exact allocation/delta references and work conservation. Add independent Python schema validation and install its dependency in both CI configurations.
Design intent
The codec preserves typed evidence. Independently executed state transitions, resolver targets, actual measured costs and cryptographic state validation remain P2-08 responsibilities. The legacy codec regression was fixed separately in #632 / #633. The independently tracked formatter-version fix #635 / #636 passed all eight checks and is merged; its signed commit is integrated here without rewriting branch history. Its source and runtime tests are unchanged by the workflow integration. A Clang compilation failure during development was resolved by defining recursive JSON equality after the type is complete; acceptance uses the corrected source exclusively.
Phase discipline
Implements P2-07.R3; prerequisite #94 is closed. The service-origin sample is a named wire-only fixture. No scientific campaign, formal proof or independent scholarly review is claimed.
Verification
All 62 CTests pass at signed source
c6a6c5c35e80b2d72d44c69ffcbdd293640a023bin Debug, Release and Clang ASan/UBSan. The independent jsonschema 4.23.0 checker verifies 135 valid fixtures, 45 closed object shapes, 259 structural rejections, 404 classified records and 409 u64 identity boundaries. All 132 accepted transition fixtures round-trip. Legacy fixtures, all eight local hooks and the frozen protocol/scope check pass.Validation evidence, with immutable hashes and acceptance records in
artifacts/backlog/2.2.1/P2-07-B/. Final PR-head CI is required before the checklist is checked once and this PR is merged.