Repository navigation
Commit 68d0ce6
committed
fix(spec,service-automation)!: enforce the screen-field bound's value shape and require
Maintainer ruling A′ (decision batch #130 item 1, 2026-09-13, verbatim
「同意」), applied across the five items it names.
1. Server-side enforcement at resume STAYS — `min_value` / `max_value`,
both already in the ADR-0114 D2 catalog, no new error code.
2. The string gap closes. `validateScreenInputs` gains its own pass, BEFORE
the bound: a present value for a `type: 'number'` screen field that is not
a finite JSON number is refused with `invalid_type` — ⛔ never coerced.
The bound pass compares numbers, so before this every non-number satisfied
it by never reaching it (`"25"` under a `max` of 20 was conformant). The
pin that recorded that silence is INVERTED in place, not deleted, so a
later re-widening has to come back through it. Narrow in two directions on
purpose: it keys off `type: 'number'` and not off the presence of a bound,
and it is presence-conditioned exactly as the bound is.
3. `ScreenFieldConfigSchema` requires `reference` when `type` is `lookup`,
via a `superRefine` that leaves `.shape` enumerable and the key set
unmoved. This REVERSES the optionality the card first shipped; ADR-0078's
own example of silently-inert metadata is a `lookup` with no `reference`,
and a degraded shipped twin is not a reason to bend the contract to it.
A stored bare lookup has NO lossless conversion — nothing in the metadata
says which object the author meant — so it registers as an ADR-0087
SEMANTIC entry (`screen-field-lookup-reference-required`, protocol 18),
⛔ never a D2 conversion that would have to invent a target. The entry is
one file under `migrations/entries/semantic/`; `registry.ts` is its
GENERATED projection (`gen:migration-registry`), never hand-merged.
4. The wording items, in every carrier: the bound's "re-checked when the
submitted value is a number" qualifier is gone from the changeset, the
flows guide, the generated node-config reference, both `.describe()`
pairs, the `ScreenFieldSpec` doc block and the Studio designer form,
because the qualifier is no longer true. `reference`'s requirement is
stated wherever its optionality was.
5. `check:reference-carrier-shape` is green (exit 0): both `reference` sites
this PR introduced reach their value through a name, which is the
population the gate documents as unjudged. ⛔ No path ignore, and the
`['a']` fixture still tests what it tested — it widened to four shapes,
including the `{ object: 'x' }` carrier shape the gate exists for.
Also repaired, each falsified by the above rather than pre-existing:
- The changeset declared no break. It now carries `**BREAKING**` and the
`<!-- adr-0087: registered screen-field-lookup-reference-required -->`
disposition marker — a semantic entry with no declaration on the changeset
is exactly what `check-adr-0087-registration` exists to notice. `minor`
stays: the launch-window guard keeps breaks off `major` outside pre-mode.
- `ScreenInputIssue.code` enumerated `required` and `unknown_field` only and
spoke of "the same two conditions". This PR put three more codes through
that field.
- `ScreenFieldSpec.reference` claimed absence was "what every `lookup` screen
field did before this key existed". It now states that the authoring schema
refuses that shape, and why the WIRE type stays optional: a run suspended
before the upgrade rehydrates a `ScreenSpec` stored under the old accept set.
- `api-surface/automation.json` and `export-origins/automation.json` were
stale — the new exported refusal constant had never been propagated. Both
regenerated with the repo's own generators; one additive line each.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDHreference on a lookup screen field1 parent c6ea7ea commit 68d0ce6
14 files changed
Lines changed: 427 additions & 105 deletions
File tree
- .changeset
- content/docs
- automation
- references/automation
- packages
- services/service-automation/src
- builtin
- spec
- api-surface
- export-origins
- src
- api
- automation
- contracts
- migrations
- entries/semantic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
55 | 76 | | |
56 | 77 | | |
57 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
434 | 433 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
439 | 440 | | |
440 | 441 | | |
441 | 442 | | |
| |||
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
453 | 464 | | |
454 | 465 | | |
455 | 466 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
464 | 471 | | |
465 | 472 | | |
466 | 473 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
| 230 | + | |
| 231 | + | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
| 253 | + | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
Lines changed: 52 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| |||
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
62 | 110 | | |
63 | 111 | | |
64 | 112 | | |
| |||
0 commit comments