feat(harness): receipt chain export/import/merge for cross-system audit#85
Open
djimit wants to merge 1 commit into
Open
feat(harness): receipt chain export/import/merge for cross-system audit#85djimit wants to merge 1 commit into
djimit wants to merge 1 commit into
Conversation
…it interoperability Add portable serialization and merge capabilities to ReceiptLog: - export() - deterministic canonical JSON for signing/archival - toJSON() / fromJSON() - plain-object serialization - import() - deserialize with verification (rejects tampered chains) - merge() - combine receipt chains with re-linked hashes - length / isEmpty - chain introspection All new methods validate the hash chain before accepting data. Merge re-links hashes at boundary so combined chains verify correctly. Enables: audit archival, cross-run aggregation, DjimFlo compliance integration. Tests: 11 new test cases, 24/24 total passing.
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.
Summary
Adds portable serialization and merge capabilities to ReceiptLog — enabling cross-system audit interoperability, compliance archival, and cross-run receipt aggregation.
New API
Why
ReceiptLog currently has no way to leave the runtime. This blocks:
Safety
Tests
11 new test cases covering: deterministic export, round-trip fidelity, tamper detection on import, malformed JSON rejection, wrong-shape rejection, merge with re-linking, merge of empty/broken sources.
24/24 tests passing. No breaking changes.