You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(store): a missing VIEW DEFINITION grant read as a missing claim proc
ADR 0114 §4 has always specified the startup gate's probe (a) as "OBJECT_ID of
both procs", but the implementation folded (a) into (b) and inferred absence from
a NULL OBJECT_DEFINITION.
MEASURED: a principal holding only EXECUTE on the proc gets a non-NULL OBJECT_ID
and a NULL OBJECT_DEFINITION, and the compat probe still passes. So a deployed,
working, correct procedure was reported as *missing* and the operator was sent to
grant CREATE PROCEDURE — neither the cause nor the cure. WITH ENCRYPTION produces
the identical NULL. This is not hypothetical: the sub-lever B design note in the
same module explicitly serves a fleet whose principal can never hold CREATE
PROCEDURE (DBA-provisioned procs + a least-privilege app principal), which is
exactly the posture that hits it.
The probe now returns OBJECT_ID beside the definition and the two conditions get
separate reasons; the actual cure, GRANT VIEW DEFINITION, is named. Both still
DEGRADE — the gate hashes the body and cannot pass on one it cannot read — so no
accept/reject behaviour changed, only the diagnosis.
The offline stub pins the probe SQL by exact match (a typo'd probe must fail
loudly rather than silently match); that pin moved with the SQL and stayed exact,
and now also asserts both placeholders bind the same object. New offline legs
cover both arms and fail without the fix. A live leg pins the premise no stub can
show — that OBJECT_ID and OBJECT_DEFINITION genuinely disagree on a real server —
using WITH ENCRYPTION, which needs no security principal; the permission half
stays deferred with AC-10's other permission scenarios.
Also adds the store-side half of AC-7's degraded gauge: a claim_proc_status()
accessor on the store protocol (None on every backend without the lever and when
the flag is off, so "not requested" stays distinguishable from "requested and
degraded"). The surfaces that read it land next.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments