gnomonlearn
Docs/RFC-0053/Design Q&A

RFC-0053 · 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: Which principal’s RLS policies run through generated views?

Status: Open

Source: RFC-0053 §§3.2, 5.1–5.2; PostgreSQL CREATE VIEW documentation Issue: security_barrier controls predicate evaluation order, but PostgreSQL applies the view owner’s base-table policies by default. Generated views omit security_invoker: true, so the claim that each caller automatically gets their own graph.resource RLS policy is unsupported and may expose rows through an owner role. Recommendation: Specify security_invoker: true where supported, role grants and owner behavior, and test two principals with different graph permissions through the generated view.

Q: How are Phase-1 views kept read-only without write privileges or triggers?

Status: Open

Source: RFC-0053 §§3.2, 6.1, 7; PostgreSQL CREATE VIEW documentation Issue: The RFC assumes a view without an INSTEAD OF trigger rejects all writes. PostgreSQL can automatically update simple views, while this generated view exposes some directly mapped base columns. The RFC does not revoke view DML privileges or prove that its specific definition is non-updatable. Recommendation: Explicitly revoke INSERT/UPDATE/DELETE/MERGE on Phase-1 views from caller roles and verify rejection against the exact generated SQL.

Q: Can a materialized view carry the proposed RLS policy on the target PostgreSQL version?

Status: Open

Source: RFC-0053 §5.3; PostgreSQL ALTER MATERIALIZED VIEW documentation Issue: The RFC shows ALTER TABLE ... ENABLE ROW LEVEL SECURITY and CREATE POLICY against a materialized view but does not establish that the target PostgreSQL release supports those operations on that relation kind. It also does not specify whether a privileged refresh populates rows from all tenants and how callers are isolated afterward. Recommendation: Prove the DDL and per-principal behavior in the target PG integration test; if unsupported, use an RLS-enabled table maintained by the projection pipeline or a security-invoker wrapper with explicit filtering.

Q: How does the join SQL resolve a statement predicate?

A: RFC-0053 §8 now compares graph.statement.predicate_id with RFC-0051’s graph.get_predicate_id('team.assigned-to') lookup in both SQL examples. The Lean example sources were updated with the same expression. The predicate-path lookup and statement FK are already part of the published adapter contract; no new predicate identity is introduced.

Source: RFC-0053 §8.1–8.2; RFC-0051 §5 Issue: The earlier sample tested a nonexistent s.predicate column.

Q: How are dependent views rebuilt after an entity-type change?

Status: Open

Source: RFC-0053 §9.1 Issue: The RFC says DROP VIEW cascades to dependent views, but the shown command has no CASCADE; dropping a referenced view fails under ordinary PostgreSQL behavior. A cascading drop would also remove dependent objects that must be rebuilt before commit. Recommendation: Build an explicit dependency graph and perform transactional replacement or ordered drop/recreate with a complete dependent-object inventory and rollback plan.

Q: Where does CREATE INDEX CONCURRENTLY run if installation is one transaction?

Status: Open

Source: RFC-0053 §9.3; RFC-0041 §§3, 6.1; PostgreSQL CREATE INDEX documentation Issue: Production installation is one backend transaction per module, while CREATE INDEX CONCURRENTLY cannot run inside a transaction block. The plan cannot satisfy both rules without an out-of-transaction phase. Recommendation: Define a staged index operation with explicit recovery and readiness gates, or use ordinary transactional index creation with documented locking limits.