feat: add transactional inbound policy controls and durable audit - #11
Merged
Conversation
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.
Incoming messages now pass through an owner-local policy gate with persistent configuration and metadata-only audit. This ports the functional layers of historical PRs #2–#6 onto the current authenticated DM/group runtime without replacing its transport security or reliable delivery.
Message storage, ratchet/replay state, delivery deduplication and policy audit commit together. An audit failure rolls reception back so the sender can retry; queue entries and decision events are published only after commit. Authenticated DMs count as addressed, while group mention rules remain configurable. Decisions do not execute tools or implement an approval UI.
Adds bounded private inbound-event reads and policy controls through MCP, plus local SQLite-only CLI commands. Schema 10 preserves configuration/audit when upgrading historical policy schemas 2/3 and upgrades runtime schema 9 additively. Handshake remains v3.
Validation: 679 tests across the workspace and final CLI subprocess checks; production build; workspace and dashboard-client TypeScript; five npm tarball consumer checks from an isolated source snapshot; Linux arm64/Node 22 Docker build and live publication/authentication smoke test. CI verifies the committed tree separately. No production deployment has been performed.
See docs/releases/2026-09-07-policy-port.md and docs/POLICY.md for migration, retention and runtime boundaries.