Skip to content

feat(runtime): add durable Gate B memory authorization - #291

Merged
DanielJD1216 merged 2 commits into
mainfrom
feat/gate-b-durable-memory-auth
Aug 2, 2026
Merged

feat(runtime): add durable Gate B memory authorization#291
DanielJD1216 merged 2 commits into
mainfrom
feat/gate-b-durable-memory-auth

Conversation

@DanielJD1216

Copy link
Copy Markdown
Owner

Summary

  • add PostgreSQL 16-backed Gate B memory-only clients, sessions, namespace/capability grants, authorization epochs, deletion epochs, and sender-key-wide DPoP replay consumption
  • add durable authorization derived exclusively from PostgreSQL state, with bounded lock and statement waits and no process-local fallback
  • reauthorize immediately before protected-read receipt consumption using canonical prepare-lock-authorize-consume ordering, then clear protected results and serialized buffers on every denied or failed release
  • preserve replay denial for the full proof window across originating-session expiry, processes, pool teardown, and restart
  • preserve immutable historical restore receipts across schema 6 to 7 migration while new schema-7 operations remain current
  • keep the durable authority unreachable from HTTP, stdio, MCP, server, app, and runtime composition, enforced by exact changed-path and mutation gates
  • update the live owner-open-issue boundary from merged Gate B: synthetic memory-only access-plane implementation #288 to active approved Gate B: durable memory-only authorization and release recheck #290

Closes #290.

Scope boundary

This is a synthetic Gate B-M durability slice. It does not complete Gate B exit and does not authorize production testing or deployment.

Included:

  • disposable PostgreSQL 16 only
  • synthetic identities, sender-proof metadata, credentials, and trusted memory
  • durable replay, session, grant, credential, epoch, and release-time authorization state
  • successful and denied protected-read receipt paths
  • PostgreSQL role, function, ACL, migration, race, outage, restart, and cleanup proof

Not included or authorized:

  • OAuth/OIDC integration or signed access-token verification
  • cryptographic DPoP JWT parsing, signature verification, or nonce issuance
  • TLS or mTLS handshake and certificate-chain validation
  • Streamable HTTP MCP or any network listener
  • evidence mode, PostgreSQL 18, model service, or live connectors
  • deployment, private data, team access, production activation, package publication, release, or managed hosting

Verification

  • npm run alpha1:conformance (42 / 38 / 23 / 26 / 30 / 30)
  • npm run alpha1:conformance:evidence-first (32/32)
  • npm run local-runtime:candidate-conformance
  • npm run alpha1:test (186/186)
  • npm run runtime:gate-b-memory-only (31/31)
  • npm run runtime:gate-b-memory-only:scope
  • npm run runtime:gate-b-memory-only:scope:smoke
  • npm run ci:check
  • npm run publish:readiness
  • npm run package:dry-run
  • npm run owner:open-issues-status
  • npm run owner:open-issues-status:smoke
  • npm run docs:command-setup
  • git diff --check

Safety scan: 0 findings. Claims scan: 0 findings.

Review notes

  • initial independent review blocked sender-wide replay expiry at session end and schema-6 restore-receipt incompatibility
  • both blockers were fixed with real PostgreSQL conformance cases
  • additional hardening added release prelocking, fresh-time linearization, bounded DB waits, full Gate B table ACL verification, all three SECURITY DEFINER function checks, oversized bigint denial, successful durable retrieval/consumption proof, and custom-executor receipt-consumption enforcement
  • final exact-tree security and TDD review completed before commit
  • Gate B-M exit, Gate C operation, target-setup testing, deployment, and private data remain blocked

Close exact-route, revocation-fence, transaction-cleanup, and runtime reachability gaps found during PR #291 review. Add PostgreSQL race evidence and mutation-sensitive scope enforcement.
@DanielJD1216
DanielJD1216 merged commit ef06137 into main Aug 2, 2026
4 checks passed
@DanielJD1216
DanielJD1216 deleted the feat/gate-b-durable-memory-auth branch August 2, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gate B: durable memory-only authorization and release recheck

1 participant