Skip to content

Commit 82af2c1

Browse files
committed
docs(changeset): declare Clause-② yes (narrowing); the widening lives in the BREAKING paragraph only
Claude-Session: https://claude.ai/code/session_01Bw3y2DWhT9RPnrmDsNqEVG Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7d3edf6 commit 82af2c1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎.changeset/22428-field-existence-every-spelling.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
fix(formula)!: the unknown-field check judges every spelling of a `record` / `previous` member, not only the dot, so `os build` and the object save door refuse `record['typo']`, `previous['typo']`, `record.?typo` and `record[?'typo']` (#22428)
66

7-
Clause-②: yes
7+
Clause-②: yes (narrowing)
88

99
<!-- adr-0087: not-required (no-migration-prescription) A refusal at `os build` and at the object save door of an expression that names an undeclared field in a non-dot member spelling: no authorable key, spelling, export or stored shape moves, and no stored row is read, rewritten or converted. A stored object whose expression is refused keeps loading until it is next saved, and the repair is the author's own (declare the field or fix the typo), which no ledger entry can derive. The other categories are closed on facts: the package publishes (not unpublished); no ADR-0087 id covers this verdict and this diff adds none (not registered / already-registered); and no exported TypeScript declaration changes (not runtime-interface-only / type-surface-only). -->
1010

@@ -24,7 +24,6 @@ The pass now reads members through the same AST member reader the relationship-t
2424

2525
- A computed key (`record[record.kind]`, `record[someVar]`) names no member before evaluation, so it is not judged.
2626
- A method call on a member (`record.name.startsWith('A')`) still judges the member (`name`).
27-
- Three shapes the regex misread as a member of the root are no longer refused, because none of them names one: text inside a string literal (`record.name == 'record.typo'` judges `name` only), a root name after another root (`vars.record.x`), and a method call on the root itself (`record.size()`).
2827
- Stored rows are not migrated or refused on read; an object stored before this change keeps loading until it is next saved, and that save is judged. Drafts are not gated.
2928
- Measured before crossing: the stacks this repository ships give the same expression findings before and after the change. That covers `examples/app-todo`, `examples/app-crm`, both `examples/app-multi-package` sub-stacks, the objects, actions, flows, views and pages of `examples/app-showcase`, the 51 objects `@objectstack/platform-objects` exports, and `plugin-approvals`' `sys_approval_request`, whose eight action predicates read the leaves of its declared `viewer` read attachment and pass. No in-repo producer writes a non-dot spelling of an undeclared field.
3029
- No public export or signature moves; only the doc comments of `ExprSchemaHint.fields` and `ExprSchemaHint.attachedOnRead` change. `analyzeRelationshipTraversals` answers exactly what it answered before: measured identical, set order included, on 4,528 analyses of the 2,264 `record` / `previous` expressions in this repository's TypeScript sources.

0 commit comments

Comments
 (0)