Phase 2: Encode and validate strict version-4 JSONL #634

Merged
erikinkinen merged 4 commits from phase2/p2-07-b-v4-codec into main 2026-10-20 20:44:50 +02:00
Owner

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 c6a6c5c35e80b2d72d44c69ffcbdd293640a023b in 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.

## 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 `c6a6c5c35e80b2d72d44c69ffcbdd293640a023b` in 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](https://git.erikinkinen.fi/attachments/7ac1d5a7-8fb7-4afa-a166-09164f45c672), 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.
erikinkinen added this to the Phase 2 milestone 2026-10-20 20:31:15 +02:00
Record validated P2-07-B codec acceptance
Some checks failed
markdownlint / markdown-lint (pull_request) Successful in 20s
markdownlint / markdown-lint (push) Successful in 21s
clang-format / check-format (pull_request) Failing after 25s
clang-format / check-format (push) Failing after 26s
ci / sanitizers (pull_request) Successful in 5m16s
ci / sanitizers (push) Successful in 5m22s
ci / smoke (push) Has been cancelled
ci / smoke (pull_request) Has been cancelled
7cdc6a5b19
Align CI formatting with repository-pinned clang-format (fixes #635)
Some checks failed
clang-format / check-format (pull_request) Successful in 48s
markdownlint / markdown-lint (pull_request) Successful in 27s
ci / sanitizers (pull_request) Successful in 7m10s
ci / smoke (pull_request) Successful in 7m41s
markdownlint / markdown-lint (push) Successful in 25s
clang-format / check-format (push) Successful in 43s
ci / sanitizers (push) Has been cancelled
ci / smoke (push) Has been cancelled
3703750315
Integrate formatter-version fix #635 for codec CI
All checks were successful
clang-format / check-format (pull_request) Successful in 57s
markdownlint / markdown-lint (pull_request) Successful in 39s
ci / sanitizers (pull_request) Successful in 7m36s
ci / smoke (pull_request) Successful in 7m51s
markdownlint / markdown-lint (push) Successful in 15s
clang-format / check-format (push) Successful in 42s
ci / sanitizers (push) Successful in 5m49s
ci / smoke (push) Successful in 6m47s
e8ffe18101
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erikinkinen/AES!634
No description provided.