Commit 2d8b92f
`saveMetaItem`'s Phase 3a-destructive gate opened on
`(singularType === 'object' || singularType === 'field')` and the `field` limb
could not produce a finding, so the condition made the gate's coverage read
wider than it is — #10886's face inventory had to chase a `field` face
population that does not exist.
Both reasons the limb was inert were re-measured through the real
`saveMetaItem` before the deletion:
1. a `field` body has no `fields` map to diff (`FieldSchema` is a
`strictObject` declaring no such key, so both sides of the detector fold
to `{}`); measured as a `text` -> `number` change saving with no 409 while
the same-shaped change on an `object` refused in the same harness;
2. `field` is code-only, so the #5086 refusal one gate up answers first —
`NOT_CREATABLE` for a runtime-only parent, `NOT_OVERRIDABLE` for an
artifact-backed one — before persistence and before the diff.
Neither reason is absolute and the trim is right because of where they stop:
reason 2 stops at the documented `OS_METADATA_WRITABLE` hatch (reason 1 then
holds the gate inert on its own), and reason 1 stops at schema-valid bodies —
a stored `field` row carrying a `fields` map did fire the gate. That double
fault is the one behaviour delta, and the refusal it removes was a false alarm:
a `field` write mints a standalone `sys_metadata` row nothing composes into its
parent object (#7893), so no driver ever materialised the named columns.
`object` behaviour is untouched. The reachable type set is now pinned by
`protocol.destructive-gate-reachable-types.test.ts`, which pairs every "no 409"
assertion with a live `object` control.
Claude-Session: https://claude.ai/code/session_01RfyXxZ2WPjcjhuXpiQQc3y
Co-authored-by: Claude <pm@objectstack.ai>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent be7262e commit 2d8b92f
5 files changed
Lines changed: 591 additions & 4 deletions
File tree
- .changeset
- packages/metadata-protocol/src
- scripts
| 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 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| |||
0 commit comments