Skip to content

Commit e71d385

Browse files
committed
docs(spec): the tiers-retired entry scopes 'denied' to the shapes that lose their master, and states the flagged master's fate as the listing does
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B2EeooonSXrANpkpgUSfFZ
1 parent 85505b5 commit e71d385

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎.changeset/25092-cbp-master-writable.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Clause-②: no (narrowing)
99

1010
Metadata-protocol: narrowed
1111

12-
<!-- adr-0087: not-required (already-registered cbp-master-relation-tiers-retired) the parse's one-master entry already carries this narrowing; its text is updated in this change, and the stored-row listing reports it under that id -->
12+
<!-- adr-0087: not-required (already-registered cbp-master-relation-tiers-retired) registered before this change, amended in this diff: the parse's one-master entry now carries this narrowing, and the stored-row listing reports it under that id -->
1313

1414
**BREAKING** (a declaration the parse accepted is now refused), shipped as `minor` under the 18.x convention for breaking changes, with no retirement stage.
1515

‎packages/spec/src/migrations/entries/semantic/18.cbp-master-relation-tiers-retired.ts‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ export const entry: SemanticMigration = {
1818
+ 'relation the object derives its record access from',
1919
replacement: 'Exactly one `master_detail` field declared `required: true`, with a `reference` to the master '
2020
+ 'object and neither `readonly: true` nor `system: true` on it; every other parent of the object is a '
21-
+ '`lookup`. A one master marked `readonly` or `system` is refused at parse too, naming the field and the '
22-
+ 'flag: drop the flag and declare the master reference as an ordinary required field. Nothing else derives a master any more: a '
21+
+ '`lookup`. Nothing else derives a master any more: a '
2322
+ '`master_detail` without `required: true` and a required `lookup` were the security runtime\'s second '
2423
+ 'and third fallbacks and both retired, and two required `master_detail` fields are no longer resolved '
2524
+ 'by field order. `ObjectSchema` refuses each of those shapes at parse, naming the object — so '
2625
+ '`ObjectSchema.create()`, `defineStack`, `os validate` and the metadata save door refuse them — and '
2726
+ 'the runtime derives no master from them: every read of such an object is denied and every write '
28-
+ 'refused with 422 INVALID_METADATA. Data at rest whose one `master_detail` merely omits `required` '
27+
+ 'refused with 422 INVALID_METADATA. A one master marked `readonly` or `system` is refused at parse too, '
28+
+ 'by the same doors, naming the field and the flag; the runtime still resolves that field as the master, '
29+
+ 'so the object is not denied, and the fix is to drop the flag and declare the master reference as an '
30+
+ 'ordinary required field. Data at rest whose one `master_detail` merely omits `required` '
2931
+ 'is converted, not refused: the D2 conversion `cbp-master-detail-required-defaulted` gives it the '
3032
+ '`required: true` that `ObjectSchema.create()` would have given it. It runs on stored rows, built '
3133
+ 'artifacts and `os migrate meta`, never on a live authoring parse. A required `lookup` to the master becomes `type: \'master_detail\'` '
@@ -64,8 +66,12 @@ export const entry: SemanticMigration = {
6466
+ 'runtime the security plugin logs no `[security/controlled-by-parent]` "resolves no master relation" '
6567
+ 'line for the object, and a member who can read its master reads its rows. A stored row whose one '
6668
+ '`master_detail` omitted `required` is served with `required: true` (`cbp-master-detail-required-defaulted`); '
67-
+ 'a stored row in any other retired shape still registers (with its `[metadata_spec_invalid]` '
68-
+ 'diagnostic) and is denied until it is corrected and saved. `os migrate meta --stored` lists each such '
69+
+ 'a stored row in any other retired shape (two masters, none, a required `lookup` only, an explicit '
70+
+ '`required: false`) still registers (with its `[metadata_spec_invalid]` diagnostic) and is denied until '
71+
+ 'it is corrected and saved. A stored row whose one required `master_detail` is marked `readonly` or '
72+
+ '`system` also registers under that diagnostic, and the runtime still resolves its master, so it is not '
73+
+ 'denied; the metadata save door refuses it with 422 INVALID_METADATA until it is corrected. '
74+
+ '`os migrate meta --stored` lists each such '
6975
+ 'row as a TODO under this entry\'s id, before the upgrade and after it, naming the object, its shape (two '
7076
+ 'masters, none, a required `lookup` only, an explicit `required: false`, a master marked `readonly` or '
7177
+ '`system`) and the owner\'s choice, and '

0 commit comments

Comments
 (0)