Commit 3063352
* test(spec): pin `DecisionOutputDef.required` at the schema level (#4525)
#4525 asked the spec to model `required` on `DecisionOutputDef` so the
contract declares what `ApprovalService.decide()` already enforces. The
modelling itself landed three days before the issue was filed — cd6b9f2
(`feat(approvals): decisionOutputs may be declared required`, objectui#2955)
added the Zod key, its TSDoc, the `strictUnknownKeyError` known-key entry,
the `normalizeDecisionOutputs` pass-through, the authorable-surface baseline
row and the generated docs table. The issue was recorded from objectui's
ledger burn-down, whose derived-type comment ("the spec does not model it
yet") was written against an older spec and was already stale.
What was genuinely missing is the pin. `DecisionOutputDefSchema` is
`.strict()`, so dropping the key would turn every author's `required: true`
into an unknown-key rejection — and the only thing standing in the way was
`authorable-surface.json`, a REGENERATED baseline that a `gen:schema` run
rewrites without comment. Verified by mutation: commenting the key out left
all 40 pre-existing cases green, including the `normalizeDecisionOutputs`
ones, because that normalizer is hand-written and never consults the schema.
Three cases close it — the key parses and round-trips, it stays optional
(absent must not become `required: false`; the parsed shape is what ships to
every decision UI on `decision_output_defs`), and a non-boolean is rejected
rather than coerced. That last one is the AI-authoring case: the runtime
compares `d.required === true`, so a coerced `'true'` would declare a
constraint the server then never enforces — the same declared-vs-enforced
gap #4525 exists to close, one layer down.
No behaviour change; no changeset (the feature shipped with its own in
cd6b9f2).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
* chore: empty changeset — this PR releases nothing (#4525)
The "Check Changeset" gate counts changesets ADDED by the PR relative to
base, so pointing at cd6b9f2's `.changeset/required-decision-outputs.md`
(which shipped the feature itself) does not satisfy it. An empty-frontmatter
changeset is the sanctioned form for a PR that bumps no package: the diff is
one test file pinning a spec key that already exists, so there is nothing for
a consumer to read in a CHANGELOG.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 24915d2 commit 3063352
2 files changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
399 | 431 | | |
400 | 432 | | |
401 | 433 | | |
| |||
0 commit comments