Skip to content

Commit f11ea36

Browse files
committed
docs(changeset): narrow the #17778 entry to what it delivers alone
Main shipped the identical /`expression` return-type narrowing to EvaluatedExpression first, under #18638 (card #15811) -- confirmed by the merge: both sides made the same change independently, and ADR-0137's own status line says its PR carries no schema change. Re-announcing that narrowing here would duplicate #18638's own changeset entry in the same release. Drop the redundant paragraphs and keep only what #17778 alone ships: the ADR-0137 predicate fault-semantics contract and its ADR-0089 addendum.
1 parent 28ebef3 commit f11ea36

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎.changeset/17778-field-rule-predicate-fault-semantics.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"@objectstack/spec": patch
33
---
44

5-
**`cel` / `expression` (and the `F` / `P` aliases) now declare the `EvaluatedExpression` they have always emitted.** Both helpers always write a non-blank `source`, but both were declared as returning `Expression`, whose `source` is optional — a declaration of a shape neither function can produce. Fixed at the producer (#17778).
5+
**ADR-0137 makes field-rule predicate fault semantics part of the contract** (#17778): what SUBMIT and RENDER do when a predicate cannot run.
66

77
Clause-②: no
88

9-
**Not a narrowing of anything an author can write.** No zod schema moves in this release entry: the accept set of every slot is unchanged, `api-surface/` is unchanged, and no export is added, removed or renamed. What changes is the return type in the published `.d.ts` of two existing exports, and narrowing a return type removes nothing from a caller — `EvaluatedExpression` is assignable to `Expression`, so every existing consumer still compiles and no call site needs editing.
9+
**The predicate fault-semantics contract is recorded, not enforced, by this release.** ADR-0137 states what a field-rule predicate does when it cannot RUN: at SUBMIT a faulting predicate refuses the write and names the field and the rule (D2); at RENDER visibility stays fail-OPEN, so a rule that could not run never hides a control and lets the form write `null` over a column the user never saw (D3); a blank or faulting GATE predicate is diagnosed, never a silent `true` (D4); and the evaluation helper's fallback stays freely specifiable (D5), because fault-to-flag and fault-to-throw both exist only because it is a parameter. Those are consequences CONSUMERS deliver — `packages/spec` carries no business logic — and they land in the ObjectUI half. D1's authoring refusal (an `ast`-only envelope and a blank `source` are refused at authoring) is ruled by decision batch #122 item 2 and ships with the evaluated-slot narrowing that owns it, under that change's own ADR-0087 entry.
1010

11-
**Why it is worth a release entry anyway.** Every slot that composes `EvaluatedExpressionInputSchema` requires a non-blank `source`, so a ``P`record.status == 'paid'` `` assigned straight into one was a TS2322 against a value the schema accepts at runtime — the recommended authoring form failing to type-check in exactly the place it is recommended. The over-wide declaration was the cause, and the producer is where it is fixed rather than at the call sites (Prime Directive #12).
11+
**ADR-0089 gains an addendum, not a reopening.** It unified the `visibleWhen` / `visibleOn` / `visibility` family under one name; ADR-0137 owns what that family does when a predicate cannot run, and ADR-0089 itself is unchanged by this release.
1212

13-
**The predicate fault-semantics contract is recorded, not enforced, by this release.** ADR-0137 states what a field-rule predicate does when it cannot RUN: at SUBMIT a faulting predicate refuses the write and names the field and the rule (D2); at RENDER visibility stays fail-OPEN, so a rule that could not run never hides a control and lets the form write `null` over a column the user never saw (D3); a blank or faulting GATE predicate is diagnosed, never a silent `true` (D4); and the evaluation helper's fallback stays freely specifiable (D5), because fault-to-flag and fault-to-throw both exist only because it is a parameter. Those are consequences CONSUMERS deliver — `packages/spec` carries no business logic — and they land in the ObjectUI half. D1's authoring refusal (an `ast`-only envelope and a blank `source` are refused at authoring) is ruled by decision batch #122 item 2 and ships with the evaluated-slot narrowing that owns it, under that change's own ADR-0087 entry.
13+
**Not carried by this entry: the `cel` / `expression` return-type narrowing to `EvaluatedExpression`.** This card touched that signature too, but main shipped the identical narrowing first, under #18638 (card #15811) — see that release's own changeset for the `EvaluatedExpression` story and the TS2322 it fixes. Restating it here would announce, a second time, a fact this release has already shipped under a different entry.

0 commit comments

Comments
 (0)