symfonic.memory.backends.postgres_graph_runtime¶
postgres_graph_runtime ¶
Opt-in graph runtime without bootstrap DDL; no deployment or index swap.
Import the adapter through the public backends facade. Owner bootstrap remains PostgresGraphBackend; this adapter only validates and serves an already installed graph schema. The graph role contract does not cover vectors, journals, leases or app tables. It covers the CORE-199 erase job table when one exists: SELECT only, and nothing on its receipts, which only the separate eraser principal writes. And the CORE-199 memory erase generations when installed: read and advance, never DELETE or TRUNCATE; the table's trigger refuses a lowering UPDATE.
GraphRuntimeNotReady ¶
Bases: RuntimeError
The graph runtime role or installed schema violates the contract.
PostgresGraphRuntime ¶
PostgresGraphRuntime(pool: Any, *, owner_login: str, edge_upsert_mode: str = 'tenant_guarded', eraser: Any = None)
Bases: PostgresGraphBackend
Explicit nonowner graph adapter; ensure_schema performs read-only checks.
Source code in src/symfonic/memory/backends/postgres_graph_runtime.py
attest_eraser
async
¶
The runtime role contract, then the eraser's proof for this runtime.
One runtime connection proves the role contract and resolves the
session_user and memory_nodes the eraser must match
(CORE-194). Read-only. Any refusal withdraws the standing attestation.
Source code in src/symfonic/memory/backends/postgres_graph_runtime.py
ensure_schema
async
¶
Read-only startup; with an eraser composed, also attest_eraser.
Source code in src/symfonic/memory/backends/postgres_graph_runtime.py
require_runtime
async
¶
Reject owner, elevated or role-switch-capable logins before startup.
Source code in src/symfonic/memory/backends/postgres_graph_runtime.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |