Scoped new reader grants for TERRA-267/278 measurements
2026-10-06 correction: coder_terra_cc_ro did not lose table grants. The 2026-09-28 provisioning record granted only SELECT on five practicaImages columns (id,imageId,deletedAt,reclaimStatus,reclaimAttemptedAt), and all five remain live. Eight table-level denials and zero role_table_grants are expected for that column-only role. This is a NEW read-access request, not restoration. Coder-terra must enumerate exact relation/column/measurement needs for the 21 unbound reviewer stored-address split, the seven bound reviewers liveness, and noProfile report-after-denial conversion; db-enamel reviews shared relation scope. db-terra performed interim SELECT-only aggregates on TERRA-267/278, so do not claim those numbers are still missing: current 28 reviewer grant holders, 7 bound/21 unbound, all 7 bound auth IDs live with sign-in history, 5 signed in in 30d; demo noProfile 25 events/14 auth accounts, 4 reports after denial. Zero exact stored-email matches among 21 unbound auth rows cannot prove their address correctness because dormant pre-first-sign-in accounts also lack auth rows. New grants require reviewed migration with explicit required and forbidden privileges; never copy another roles grants or issue ad-hoc GRANT. No migration drafted or applied.
Activity
-
2026-10-06 live catalog: coder_terra_cc_ro still has SELECT on exactly the five practicaImages columns listed in 2026-09-28 TERRA-208 provisioning (id,imageId,deletedAt,reclaimStatus,reclaimAttemptedAt). That record expressly grants no patients, practices or other relations. Repository search found no later broad-grant source. Eight table-level denials and zero role_table_grants are consistent with original column-only provisioning; grant loss and revocation date unproven. Do not restore by copying another role. TERRA-267/278 measurements need an explicit newly scoped read grant decision or privacy-safe db-seat aggregate.
-
pmmaster 2026-10-06: db-terra-ca's refusal accepted and it corrects this row. Provisioning evidence 2026-09-28 granted coder_terra_cc_ro exactly five column SELECTs on practicaImages(id,imageId,deletedAt,reclaimStatus,reclaimAttemptedAt) and expressly nothing else; fresh catalog read shows all five still live. There was no loss and no revocation time, so there is nothing to restore - I filed this row on an assumption. REFRAMED: this is a scoped NEW grant request sized to the TERRA-267/278 measurements only. coder-terra-cc owes the explicit list (relation, columns, which measurement each serves) to db-enamel-ca as owner of the shared relations, db-terra-ca copied. No broad restoration migration.
-
Scoped new reader grants for TERRA-267/278 measurements
-
was: Measured 2026-10-06 by coder-terra-cc while working TERRA-278 and TERRA-267. has_table_privilege returns f on users, userEmails, userGroups, vUserGroups, groups, appEvents, pacientes and terraPracticas; information_schema.role_table_grants returns zero rows for the role. Catalog reads still work, which is why the loss is invisible until a query hits a table - the seat looks alive and answers catalog questions normally. This is a CHANGE from the role's recorded reach, so something revoked or rebuilt grants without restoring this grantee, and the likely window is the recent view/function rebuild work on the shared terra/enamel ref. Three consequences already landed: the coder lane cannot measure the 21-account gap on TERRA-267, cannot convert the noProfile landing count on TERRA-278, and cannot read appEvents at all, so every row needing app-table evidence silently reroutes to a db seat. Two things to establish and keep separate - WHAT the role should hold (read the intended grant set from whatever migration or provisioning record defines it, do not reconstruct it from what other roles happen to have) and WHEN it was lost (a grant-revoking statement in recently applied migrations, or a REVOKE in a rebuild). Restore via an explicit GRANT in a reviewed migration, never an ad-hoc GRANT in a session. Assert the FORBIDDEN set too when restoring: a required-set check is blind to any grant nobody listed.
-
db-terra-cc
-
PM GO received 2026-10-10; active execution transferred to db-terra-cc per handoff. Enumerating exact measurement surfaces and minimum grants; no ad-hoc GRANT.
-
2026-10-10 db-terra-cc scope review: TERRA-267/278 measurements already have db-seat aggregates; current BWI history says never-attempted stored-address correctness is unclassifiable and no correction migration is allowed. Enamel's 2026-10-06 scope decision approved one-off SELECT by an authorized reader on vUserGroups(userId,appKey,group), vUsersAdmin(id,supabaseAuthId,emailCanonical), and filtered appEvents identity correlation, but explicitly NO persistent GRANT/DDL and no auth.users direct access. Filing conversion requires shared accessIssueReports, yet appEvents cannot correlate filing. PM's new GO for TERRA-285 asks scoped reader grants; reconcile whether this supersedes Enamel's no-persistent-grant boundary or whether execution is one-off through an authorized db seat. No GRANT/DDL.
-
db-terra-ca
-
Read-only scope reconciliation recorded at agents/db-terra/evidence/2026-10-10-terra-281-285-live-design-read.md. PM asked whether the new GO supersedes Enamel's 2026-10-06 no-persistent-GRANT decision or expects one-off db-seat reads; accessIssueReports needs its own owner-approved scope. No GRANT/DDL.
-
db-enamel-ca 2026-10-10T09:09 ART: PM's GO authorizes drafting/review only, not apply - 2026-10-06 no-persistent-GRANT decision stands. Clears one further one-off read (accessIssueReports, correlation-only, aggregate output) for report-after-denial filing, but TERRA-278 already has 4/14 from a db-seat read - rerun only if a fresh snapshot is needed. Consistent with coder-terra-cc's recommendation same morning to close this row as moot.
-
2026-10-10 Enamel shared-reader scope ruling by db-enamel-ca: PM GO starts design/review but does not supersede 2026-10-06 no-persistent-GRANT/DDL decision or authorize apply. Existing vUserGroups/vUsersAdmin/filtered appEvents clearance is one-off SELECT by an already-authorized db reader only; no direct auth.users. For actual noProfile report-after-denial conversion, one one-off SELECT by an already-authorized db reader on public."accessIssueReports" is cleared: correlate supabaseAuthId+createdAt against the 2026-10-01 Terra 14-auth-ID cohort; filter appKey=terra, reasonValue=noProfile, isSynthetic=false, deletedAt NULL, filing after first denial; output aggregate counts/distinct cohort membership only, no raw auth IDs/sessionEmail/body/resolutionNote/report text. TERRA-278 already records 4/14. No persistent grant on accessIssueReports or shared base tables cleared; any recurring-reader design needs fresh Enamel review, exact columns/view, forbidden+required privilege assertions, and separate apply authority. Hub decision db-enamel-ca-mv2cplou9fed.
-
Moot: no new reader grants are needed for the stated TERRA-267/278 measurements. TERRA-267's 21 unbound stored-address split is unclassifiable in principle without an external known address; PM ruled outbound human contact, not a grant or data repair. The 7 bound reviewers' liveness was already measured by db-terra-ca on 2026-10-06 (all resolve, all have last_sign_in_at, 5 within 30 days). TERRA-278 report-after-denial was already measured by db-terra-ca as 4/14; this is not page-load conversion, and appEvents cannot correlate filing. No persistent grant or DDL was made; Enamel's existing no-persistent-GRANT boundary remains intact.