Skip to content

Commit 85505b5

Browse files
committed
docs(spec,lint): the lint promotion entry and the builder test header say the parse now refuses the flagged master
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B2EeooonSXrANpkpgUSfFZ
1 parent dc3548d commit 85505b5

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎packages/lint/src/data-model-rules.master-detail-required.test.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,12 @@ describe('R2 outside controlled_by_parent — the verdict is unchanged', () => {
148148
});
149149
});
150150

151-
// What actually reaches the rule from the authoring builder. Under
151+
// What reaches the rule from the authoring builder. Under
152152
// `controlled_by_parent`, `ObjectSchema.create()` forces an omitted `required`
153-
// to `true` and refuses an explicit `false`, but never inspects `readonly` or
154-
// `system` — so the two flagged shapes leave the builder intact, and this rule
155-
// is the authoring-time refusal they meet.
153+
// to `true` and refuses an explicit `false`; the parse it ends in refuses a one
154+
// master marked `readonly` or `system` (spec shape `master-not-writable`), so
155+
// the two flagged shapes no longer leave the builder, and this rule reports
156+
// them on a stack that never went through it.
156157
describe('R2 over objects built by ObjectSchema.create()', () => {
157158
const build = (field: ReturnType<typeof Field.masterDetail>) =>
158159
ObjectSchema.create({

‎packages/spec/src/migrations/entries/semantic/18.cbp-master-detail-required-lint-error.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export const entry: SemanticMigration = {
3333
+ 'still reaches it from any object not authored through the builder. The security gate keeps '
3434
+ 'refusing these inserts. (The later step-18 entry `cbp-master-relation-tiers-retired` goes '
3535
+ 'further for the first shape: a `master_detail` without `required: true` is refused at parse, '
36-
+ 'and the runtime no longer resolves a master from it.)',
36+
+ 'and the runtime no longer resolves a master from it. The same entry now refuses the other two '
37+
+ 'at parse on the object\'s one required master, so `ObjectSchema.create` no longer lets them '
38+
+ 'through either.)',
3739
acceptanceCriteria:
3840
'`os lint` reports no `relationship/master-detail-required` finding at `error`: on every '
3941
+ 'object declaring `sharingModel: \'controlled_by_parent\'`, each `master_detail` reference '

0 commit comments

Comments
 (0)