Commit fb7d75f
* fix(plugin-security): tell a read that did not answer from one that answered nothing, per site (#15840)
`reconcileOrgAdminGrant`'s `sys_member` read swallowed a fault into `[]`, and `[]`
is what that function reads as "this user is not an admin of this organization" —
the input to a DELETE. A transient read fault therefore revoked a sitting admin's
standing grant and the store kept it withdrawn after the fault cleared; only a
`debug` line separated that run from a healthy one. That read now reports at
`error` and returns `{ action: 'skipped', reason: 'membership_unreadable' }`,
performing no write at all for the pair.
`normalizeManagedByVocab` swallowed a catalog read fault into `[]` too, so an
unreadable catalog and an already-canonical one were byte-identical on both
channels while the row that needed healing stayed legacy. It now reports at
`error` and refuses the pass rather than attesting counts it could not read. The
refusal aborts at the first un-answered read — one line per refused boot, not the
four the report-and-continue shape measured — and reaches the `kernel:ready`
catch that was already declared for it.
Per-site, not a sweep (#15840 ruling, decision batch #105 item 5, option A). A
genuine EMPTY read keeps today's behaviour exactly at both seams, pinned by
positive controls. `claim-seed-ownership.ts` is untouched — zero diff: its fault
already propagates to a per-predicate handler that reports at `warn` and names
the consequence, so the card's third row is falsified. The plugin's other reads
keep their best-effort contract, where an unanswered read costs a grant that is
not created rather than one that is destroyed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* fix(plugin-security): match the platform Logger contract's error() arity at both new report sites (#15840)
`Logger.error` (packages/spec/src/contracts/logger.ts) takes the `Error` in its
OWN second argument — `(message, error?, meta?)` — unlike `info`/`warn`/`debug`,
which take `(message, meta?)`. Both new optional `error?` members were declared
with the sibling two-parameter shape, which made the real `ctx.logger`
unassignable: measured as three TS2322s in `security-plugin.ts`, at :3818, :3911
and :3937.
Fixed at the declaration rather than by widening the consumer: the producer's
spelling is the contract. Both call sites now hand the caught `Error` to the
argument built for it, so a platform logger receives a real Error object rather
than a message flattened into meta.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* docs(permissions): re-tally the isSystem declaration count the new read seam adds (#15840)
`readRows`'s `context: { isSystem: true; tenantId?: string }` parameter is a
23rd `isSystem` declaration site, so `check:system-context-census` went red on
its `[declared-count]` clause (table says 22, census says 23). Mechanical repair,
applied by the gate's own `pnpm gen:system-context-census --fix`; one number in
the decomposition table, no prose and no anchors touched.
Attribution was MEASURED, not assumed — a first reading of the census JSON
suggested the site was not mine. Reverting only this branch's three source files
on top of the same merged tree gives declaration 22 and gate exit 0; restoring
them gives 23 and exit 1. It is mine.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
* fix(plugin-security): guarantee MaybeLogger's `warn` channel now that `error` is optional (#9754)
`check:optional-error-sink` went red the moment this branch added an `error?`
member: that put `MaybeLogger` into the gate's population for the first time, and
it declared every channel optional. An optional `error` with no declared
alternative is a contract that permits silence — a value of this type could
carry no channel at all, and the durability report this module owes (a standing
capability withdrawn, or a revoke that did not land) would have nowhere to go.
The gate's own remedy, taken exactly: `warn` loses its `?`. ⛔ Not by making
`error` REQUIRED (#9754 option C, falsified — hosts inject reduced sinks), and
⛔ not by requiring `info`, which is the level AGENTS.md → "Degradation log
levels" calls the reassuring half-truth.
Narrowing the type forced NO call-site change: every existing caller already
supplied `warn`, measured by tsc over both layers (typecheck exit 0, and
check:test-typecheck 0 files / 0 errors), plus 105 files / 1977 tests green.
The sibling `normalize-managed-by.ts` sink was checked rather than assumed: its
`info`/`warn` were already non-optional, so it sits in the gate's compliant set
and is not named. Census moves 33 -> 34 sinks with a guaranteed `warn`, and
"permit silence" 2 -> 1, the remaining one being the pre-existing baseline entry.
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 6e9bee6 commit fb7d75f
5 files changed
Lines changed: 511 additions & 56 deletions
File tree
- .changeset
- content/docs/permissions
- packages/plugins/plugin-security/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
Lines changed: 111 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
103 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
104 | 128 | | |
105 | 129 | | |
106 | 130 | | |
| |||
147 | 171 | | |
148 | 172 | | |
149 | 173 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
161 | 177 | | |
162 | 178 | | |
163 | 179 | | |
164 | 180 | | |
165 | | - | |
| 181 | + | |
166 | 182 | | |
167 | | - | |
168 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
169 | 234 | | |
170 | 235 | | |
171 | 236 | | |
| |||
521 | 586 | | |
522 | 587 | | |
523 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
524 | 594 | | |
525 | 595 | | |
526 | 596 | | |
| |||
599 | 669 | | |
600 | 670 | | |
601 | 671 | | |
602 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
603 | 687 | | |
604 | 688 | | |
605 | 689 | | |
606 | 690 | | |
607 | | - | |
| 691 | + | |
608 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
609 | 704 | | |
610 | 705 | | |
611 | 706 | | |
| |||
Lines changed: 96 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
48 | 62 | | |
49 | 63 | | |
50 | 64 | | |
51 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
52 | 109 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
61 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
62 | 121 | | |
63 | 122 | | |
64 | 123 | | |
| |||
71 | 130 | | |
72 | 131 | | |
73 | 132 | | |
74 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
75 | 151 | | |
76 | 152 | | |
77 | 153 | | |
| |||
90 | 166 | | |
91 | 167 | | |
92 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
93 | 178 | | |
94 | 179 | | |
95 | 180 | | |
| |||
0 commit comments