insigz docs
Engineering

Pre-Build Punch-List (tracked)

Prioritized review findings, each with an owner role and the milestone by which it must close; the gate checklist before and during M0.

The prioritized review findings, each with an owner role + the milestone by which it must be closed. This is the gate checklist before and during M0. Items map to the file where the fix lives. Status legend: [x] closed in docs (the spec now reflects the fix — code still to be written) · [ ] decision pending (needs the owner).

Must fix before M0 (load-bearing for the regulated/sovereign positioning)

#ItemFixFileOwnerMilestoneStatus
P1RLS enforces neither clearance nor cellAdded app.clearance GUC; classification gated by ordered dominance (class_rank), fails closed to OPEN; cell predicate cell_id IS NULL OR = app.cell OR is_faculty so "no cell" ≠ "see everything". One combined policy.82 (D15)EngM0[x] closed in docs
P2Break-glass principal not modeledThird principal type operator-in-tenant (read-only, no tenant role, hard write/export deny); dual-issuer JWT so a control-plane token can never get the normal-user path.41,60,83 (D16)EngM0[x] closed in docs
P3App DB role could bypass RLSDedicated insigz_app role NOBYPASSRLS NOSUPERUSER; separate owner/migration role; startup assertion.82 (D17)Eng/InfraM0[x] closed in docs

Fix before the layer that depends on it

#ItemFixFileOwnerMilestoneStatus
P4Citation validator under-scansValidator walks all text-bearing fields (report sections[].body_markdown, timeline[].text, claims[].text) + structured arrays (citations[], claims[].citations, grounding.observations); claims[].citations given the {kind,id} shape.80Engbefore agent layer (M0 chat / M2 reports)[x] closed in docs
P5Realtime channel grammar inconsistent; session-only NOTIFY won't fit live-opsOne canonical grammar t:<tid>:{entity|aoi|case|session}:<id>; live-ops NOTIFYs entity/aoi (not session); coarse channels + client-side filtering; realtime min-instances ≥ 1 noted as a cost floor.61,10Engbefore realtime layer (M0)[x] closed in docs

Cheap cleanups

#ItemFixFileOwnerMilestoneStatus
P6name_norm wrongly implied a unique aliasentity_aliases holds deterministic keys only; name_norm is a Stage-2 similarity feature, not a unique alias.20,21EngM1[x] closed in docs
P7Doc 10 used SET not SET LOCALNow SET LOCAL (canonical per 82), and lists app.clearance.10EngM0[x] closed in docs
P8WebSocket outlives short JWTSilent re-auth handshake (refresh → new JWT → re-subscribe); server closes expired sockets.61,40EngM0[x] closed in docs

Decisions (one-way doors — decide now)

#DecisionResolutionFileOwnerStatus
D-aDefer Mongo → single-store pgvector for M0–M1Decided: yes, single-store pgvector first (D1 updated). Polyglot is the documented migration target.00,11Owner/Eng[x] decided
D-bPin embedding model + dimensions before any indexPin on day one (D5 default Voyage voyage-3/1024-d).00,32Owner[ ] confirm provider
D-cConnection poolingPgBouncer transaction-mode (D18).60Eng[x] decided
D-dTier isolation + cost honestySilo for regulated/enterprise; pooled tier for cheap trials; drop "scales to zero" for silo (D19).50,61Owner[x] decided

Owner-only open questions (carried from 00)

  1. Embeddings provider to pin (D-b).
  2. Per-tenant IdP strategy (SSO from day one vs. one IdP).
  3. Launch regions / residency commitments.
  4. The M0 customer/use case that drives the first vertical slice (01).

Net

Architecture is coherent; the build sequence (01) is sound; none of this is a redesign. P1–P3 are the gate before M0 (load-bearing for classified-capable positioning). P4–P5 are cheap and best done before the agent and realtime layers are written against the contracts. All documentation fixes are applied; what remains is the owner confirmations above and writing the code to match.