Commit 041d9fd
fix(analytics): ask the object-level read grant before serving an inline dataset — one admission verdict on every driver (#16860)
* wip(analytics): object-level read admission at the analytics door
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* wip(analytics): tests for the read-admission gate
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* wip(analytics): two-driver dogfood acceptance table
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* fix(analytics): ask the object-level read grant at the analytics door
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* docs(permissions): record canReadObject's elevation read in the system-context census
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* test(analytics): scope the routing case's warn assertion to the degradation it is about
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* fix(service-analytics): require `warn` on the admission sink and deny the two silent bridge corners
Contract review CHANGES REQUIRED on PR #16860, findings F1, F3 and F9.
F1 — `AdmissionLogger` declared `error?` and `warn?`, which is a contract
that permits silence (#9754). `warn` is now REQUIRED, so every value of the
type carries a destination for a refusal report, and the fail-closed branch
reaches for it when `error` is absent instead of dropping the report.
F3 — the analytics -> `security` admission bridge collapsed three resolutions
into one. A `getService('security')` that THROWS, and a registered service
carrying neither `canReadObject` nor `explain`, both returned `undefined` and
were then read as "no security service" — admitting the query silently. Those
are wired-but-broken providers and `/data`'s middleware does not fall open in
either state, so both now DENY and report at `error`. An ABSENT service still
admits: that deployment has no object-level gate on `/data` either, so the two
doors still agree, which is the property being defended.
F9 — `raw-sql-object-routing.test.ts` now asserts that every warning in the
fixture IS the deliberate admission-bridge init report, rather than only
excluding the routing phrase.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* docs(permissions): re-derive the system-context census on the merged tree
The merge of #16755 is the case the census gate exists to catch and the merge
driver cannot: both sides had independently bumped the SAME declared counts
from 106 to 107, so every one of them text-merged cleanly to 107 while the
merged tree now holds 108 elevation reads — main's new
`#refuseUngrantedRunLifecycleWrite` plus this branch's `canReadObject`. Two
correct edits, one wrong sum, and no conflict marker anywhere near it.
Re-derived from the merged tree, after the merge was committed and never
during MERGE state. Seven declared counts move by one; the gate names each and
states there is no mechanical repair, so each was corrected by hand:
check-system-context-census: OK — 108 elevation read sites in 20 packages
across 45 files, living in 91 symbol(s); the page cites 105 symbol(s)
against 105 required, over 129 anchors and 8 file-level citation(s)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent cc986c9 commit 041d9fd
15 files changed
Lines changed: 1862 additions & 103 deletions
File tree
- .changeset
- content/docs/permissions
- packages
- plugins/plugin-security/src
- qa/dogfood/test
- fixtures
- services/service-analytics/src
- __tests__
- spec/src/contracts
- verify/src
- scripts
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments