Commit 7f9a795
* feat(security/metadata-protocol): enforce OWD posture on the runtime write path (#3050)
Implements the ADR-0094-addendum registerAuthoringGate seam — an awaited,
THROWING pre-persistence hook in saveMetaItem (draft + publish-mode saves,
environment writes only; control-plane bootstrap bypasses like the ADR-0005
gate) — and registers plugin-security's object posture gate on it:
- R1 env-tighten-only (ADR-0086 D1, ADR-0049): an environment overlay of a
packaged object may not widen sharingModel/externalSharingModel beyond the
packaged declaration. Closes the OS_METADATA_WRITABLE=object hole where the
escape hatch admitted unvalidated OWD widening (private ->
public_read_write) with zero checks.
- R2 external<=internal (ADR-0090 D11): previously .describe() prose + CLI
lint only; now rejected at save time on every runtime authoring surface.
Write-path only: no zod refine, stored/grandfathered metadata keeps loading
(the ADR-0090 D1 lesson). controlled_by_parent excluded from ordering on
either side, mirroring lint's OWD_WIDTH. publishMetaItem promotes an
already-gated draft body, so no second gate. Protocols predating the seam
keep legacy behavior (feature-detected wiring).
Tests: authoring-gate seam contract (metadata-protocol, 6 new) + posture gate
unit suite (plugin-security, 18).
* docs(adr): flip 10 verified-implemented Proposed ADRs to Accepted; annotate 0057/0025
Per-decision code+test verification (2026-07-16 audit, same method as the
ADR-0086 re-evaluation): 0047, 0049, 0053, 0056, 0058, 0062, 0066, 0068,
0081 flip to Accepted with one-line landing evidence. 0057 (ERP authz)
becomes Accepted-in-part: D1-D3/D8 landed, D4-D7 sys_role/role-hierarchy
decisions superseded by ADR-0090 D3/ADR-0095 positions. 0025 stays Proposed
with an honest partial-implementation note (install flow + sys_plugin_*
registry missing). 0056's status notes its addendum's stale D6
RoleGraphService claim.
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 73da36a commit 7f9a795
19 files changed
Lines changed: 496 additions & 11 deletions
File tree
- .changeset
- docs/adr
- packages
- metadata-protocol/src
- plugins/plugin-security/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments