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(plugin-security): propagate engine faults from readRowById instead of flattening to null (#7697)
`readRowById` answered `null` for three different facts — the row does not
exist, the engine threw, and no engine is wired — and every gate that probes
with it read all three as "no such row". Its own contract note claimed a `null`
"always DENIES downstream"; that was true of one caller and false of the rest,
in two opposite directions:
- `assertControlledByParentWrite` reported a store outage as 404
RECORD_NOT_FOUND — terminal to an SDK, at the moment the truthful answer
was a transient fault to back off on (the leg #7474 made explicit);
- the two admin-door provenance gates (ADR-0086 two-doors, ADR-0066 asset
ownership) read `null` as "not package/platform-managed" and let the write
THROUGH — fail-OPEN for the duration of the fault, on both the by-id and
the bulk-filter branch;
- the owner-anchor echo caught the throw and answered 403 "changing record
ownership": fail-closed, but accusing the caller of something they did not
do, on an envelope a client will not retry.
Per the maintainer ruling of 2026-08-11 on #7505 the posture is fail-closed and
an outage is never a missing record. An engine fault now propagates out of the
probe and out of the gate: the write is refused before `next()`, and the error
is re-thrown exactly as the engine threw it rather than re-badged, so
objectql's DatasourceUnavailableError keeps ERR_DATASOURCE_UNAVAILABLE and
reaches the wire as 503. Wrapping it in a security code would relabel a
dependency outage as an authorization event and register a second spelling of
an existing ADR-0112 ledger entry under a package that does not own it.
`null` from the probe now means one thing: the row is genuinely absent.
Deliberately unchanged: the master-visibility probe in the same gate still
treats a throw as "not visible" and answers 403. The two probes ask different
questions — "does this row exist", which an outage leaves unanswered and which
must not be answered "no", versus "is this master visible to you under your own
write policy", whose fail-closed default genuinely is "not visible". The issue
and the ruling both name that probe as the house posture to match.
Steady-state behaviour is unchanged at every call site; only the fault path
moved. Both directions are pinned per caller, and reverse-verified: reverting
the four behaviour changes turns exactly the eight new fault-path cases red and
leaves all 36 steady-state cases green.
Fixes#7505
Claude-Session: https://claude.ai/code/session_01BVc1ekPpi6yaWywAUhfzfd
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments