gnomonlearn
Docs/RFC-0051/Design Q&A

RFC-0051 · Design Q&A

Versioned draft snapshot

RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.

Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.

← Read the authored RFC

Q: How are multiple valid-time versions of one statement stored?

Status: Open

Source: RFC-0051 §5; RFC-0036 §§4.2, 8 Issue: graph.statement has a unique constraint on (subject_id, predicate_id, object_id). That permits only one row for a triple, while the bitemporal contract permits successive or overlapping historical assertions with distinct validity intervals and system histories. Recommendation: Define immutable statement versions or a separate history table with interval constraints, and specify how updates and as-of queries preserve prior states.

Q: How does has_permission match RFC-0042 when it grants creator access independently?

Status: Open

Source: RFC-0051 §§7.2, 13 invariant 6; RFC-0042 §4.2 Issue: RFC-0051 grants creator write/admin permissions before predicate-policy evaluation, but RFC-0042 defines effective permissions as the union of matching policy grants with no creator exception. The adapter cannot both add this grant and match the abstract algorithm exactly. Recommendation: Define creator access as an explicit policy in RFC-0042, including revocation and tenant scope, or remove the adapter-only grant.

Q: Which session settings are required and how are they isolated on pooled connections?

Status: Open

Source: RFC-0051 §§7.1, 7.3, 14.3; RFC-0038 §8.1 Issue: The five-row table was incorrectly called “three”; that count is corrected in §7.1. The table still omits app.current_tenant_id, though §§9.1 and 14.3 use it. It names app.is_admin, while the current graph substrate’s graph.is_admin_session() reads app.is_admin_claim. The graph service sets app.current_user_id with transaction-local set_config(..., true) after resolving the verified principal; its substrate does not bind a tenant GUC. The draft does not specify transaction-local binding, reset on error, or prevention of stale context when a pooled connection is reused. Thus the draft’s complete context contract is not implemented or verified by the current graph service. Evidence: graph/graph/schema/substrate/020_functions.sql and 025_session.sql; graph/graph/crates/graph-service/src/executor.rs set_rls; RFC-0051 §§7.1, 9.1, 14.3. Recommendation: Define canonical admin and tenant GUC names, authentication provenance, the full typed context set, and whether tenant isolation is per database or RLS scoped. Bind every required setting transaction-locally before each read/write. Verify fail-closed behavior and cleanup on commit, rollback, cancellation, and pooled reuse, then update both the PostgreSQL adapter contract and consumers together.

Q: Does the graph service’s database login actually enforce the RLS policies?

Status: Open

Source: RFC-0051 §7.3; graph graph/docs/RLS-FINDING.md; graph graph/crates/graph-service/tests/rls_release.rs Issue: The historical service login is a superuser and table-owner member, so it bypasses enabled RLS. A PostgreSQL 16 rehearsal with a non-superuser, nonowner login passed the focused release test and all 23 gRPC loopback tests. A narrow owner-owned SECURITY DEFINER lookup resolves an already verified identity subject before binding the session principal. Ten write-path cases remain red, mainly because URI-based operations implicitly create the reserved graph.predicate kind; another case assumes a caller can read its own identity. RLS is enabled without FORCE, so trusted owner-owned helpers can perform bounded bootstrap lookups while the ordinary login is constrained. Recommendation: Keep the service login outside the table-owner role and without BYPASSRLS. Provision canonical predicates through a separately authorized schema/install path before ordinary edge writes. Define whether and how a principal may read its own identity, without broadening the bootstrap lookup into general read permission. Pass the constrained write-path suite and authorized/denied read, write, admin, tenant, and rollback tests, then rehearse role ownership and grants in staging before claiming conformance.

Q: Who may create a canonical graph.predicate resource?

Status: Open

Source: RFC-0051 §§5, 7.3; graph graph/crates/graph-service/src/executor.rs resolve_predicate_ref; graph graph/schema/migrations/000_initial_schema/050_graph.sql resource_insert Issue: URI-based edge writes currently create a missing graph.predicate resource in the ordinary request transaction. The database reserves graph.* and core.* kinds for admin sessions, so this implicit creation fails under an effective nonadmin RLS role. Allowing every edge writer to create structural predicates would expand the schema authority of a data-plane operation. Recommendation: Make predicate registration an explicit, authorized schema/install operation with stable identity and collision handling. Ordinary edge writes should resolve an existing predicate or fail with a clear missing-predicate error. Define migration behavior for clients that relied on implicit creation, and test both authorized registration and unauthorized edge writes against the constrained database role.

Q: Which component generates UUIDv7 identifiers on PostgreSQL 16?

Status: Open

Source: RFC-0051 §3; PostgreSQL 16 uuid-ossp functions; PostgreSQL 16 built-in UUID functions; PostgreSQL 18 UUID functions Issue: The extension table previously attributed UUIDv7 generation to uuid-ossp, but the extension documents only UUIDv1, v3, v4, and v5 generators. PostgreSQL 18 has a built-in uuidv7() function; the adapter’s PostgreSQL 16 target does not. The table now states the extension’s actual capability, but the desired source and format of correlation IDs still need a contract and test. Recommendation: Specify whether correlation IDs must be UUIDv7 and, if so, choose a PostgreSQL 16 compatible application or database generator with a version-bit test. Keep uuid-ossp required only if a named legacy consumer actually needs its functions, and update boot checks and bootstrap SQL together if it can be removed.

Q: How are module namespaces mapped to collision-free PostgreSQL schema names?

Status: Open

Source: RFC-0051 §§4.1–4.2 Issue: Replacing dots with underscores is not injective: a_b.c and a.b_c map to the same schema. PostgreSQL identifier length and case normalization create further collisions. Recommendation: Define a reversible or hashed mapping with a registry, length handling, and collision diagnostics before module DDL is emitted.

Q: Who installs required extensions: the operator or generated bootstrap SQL?

Status: Open

Source: RFC-0051 §§3, 12.2 Issue: §3 requires a privileged operator to install extensions before first boot and says the adapter cannot install them, while bootstrap.sql is required to contain CREATE EXTENSION statements. The execution role and failure behavior are ambiguous. Recommendation: Separate a privileged prerequisite script from unprivileged bootstrap, or explicitly make bootstrap an operator-run privileged phase with verified role grants.

Q: How are raw database audit snapshots redacted before storage?

Status: Open

Source: RFC-0051 §9.1–9.2; RFC-0047 §6 Issue: The row trigger stores full before_data and after_data JSONB, potentially including fields and secrets that RFC-0047 forbids in audit emissions. Its table-level trigger has no declared sensitivity schema or redaction step. Recommendation: Define a typed field-level redaction or allowlist at the trigger boundary and test that both old and new row images exclude sensitive values.

Q: How are Snowflake machine identifiers allocated without collisions?

Status: Open

Source: RFC-0051 §§6.1–6.3 Issue: A single machine ID cannot safely serve independent generators across hosts, and deriving a 10-bit ID from a manifest hash can collide across modules. The RFC does not specify leasing, clock rollback handling, or per-millisecond sequence overflow. Recommendation: Specify a centrally allocated or leased generator identity with collision detection and bounded clock/sequence behavior; treat an arbitrary hash truncation as insufficient for uniqueness.