Repository navigation
Plain memory writes emit hash-only audit receipts - #922
Merged
Merged
Conversation
Signed-off-by: zlareb1 <[email protected]>
Reuse the point-write hash-only receipt after a ClickHouse plain row lands. Postgres already commits AUDIT_ROW with the row; audit failures remain best effort. Signed-off-by: zlareb1 <[email protected]>
Read the stored value back and compare its hash with the scoped audit receipt for episodic, profile and high-sensitivity writes. Signed-off-by: zlareb1 <[email protected]>
…t-receipts Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Memory writes without embeddings leave a hash-only audit receipt after a confirmed ClickHouse insert, including episodic, profile and high-sensitivity writes.
Why
The plain-write branch returned before the searchable-write audit tail. Reuse the same receipt helper after the plain row lands so both branches record the key, id, content hash, source class, verdict and pin state without the value.
Scope and risk
The ClickHouse plain-write branch attempts one receipt before later cleanup. Cancelling an audit attempt still runs the committed write announcement and the high-sensitivity fence. Audit failures remain best effort. The Postgres branch retains its transactional revision receipt and emits no additional point-write receipt. Searchable writes use the extracted helper with the same payload.
Compatibility, rollout and rollback
Tests
python -m pytest tests/unit/test_plain_memory_audit.py tests/unit/test_memory_set_verdict.py tests/unit/test_write_audit_and_checkpoint_lag.py 'tests/unit/test_doc_links.py::test_relative_links_resolve[docs/architecture/memory-architecture.md]' -q: 35 passed, including actual task cancellation for ordinary and high-sensitivity plain writes.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex wrote the change and checked the receipt payload, authority boundary and regression results.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.main; no migration changes.frontend/changed; no frontend changes.