Repository navigation
Commit 7d6742a
docs(spec): screen-input refusal fields carry one entry per finding (#38814)
repo:objectstack@os-justin · os-justin ·
session_01QSeKYnrQ7UMtHofKQVjcH2
Fixes #37659
Clause-②: no
Metadata-protocol: none
## 维护者速读
用户无感:接口说明与流程文档里关于屏幕输入被拒时逐项错误列表的说法改准了,接口返回内容不变。
所属流程自动化,替调用方解决:按「每个字段一条」去数错误条目的客户端会看到重复行却不知原因。
只改文字,没有任何运行行为变化,可直接撤回。
无
## What changes
Text and doc comments only; the response is unchanged.
- `packages/spec/src/contracts/automation-service.ts`: the
`AutomationResult.fields` jsdoc now says one entry per finding, says one
field can carry more than one entry (with the `min`-above-`max` case as
its example), says a runner groups by `field`, and says that for
`unknown_field` the `field` is the key the caller sent (N1).
- `packages/spec/src/api/automation-api.zod.ts`: the
`TriggerFlowResponseSchema` `data.fields` describe says the same (N1);
`packages/spec/docs/references/api/automation-api.md` regenerated from
it with `gen:docs` (the generator `check:generated` named).
- `content/docs/automation/flows.mdx`: the hand-written copy of the
sentence, reworded the same way (N1).
- `packages/services/service-automation/src/screen-input-contract.ts`:
the `ScreenInputIssue.code` jsdoc points at `error.details.fields`
instead of "ride inside the refusal's message" (N2).
- `packages/services/service-automation/src/engine.ts`: the comment
above the `fields` mapping in the screen-input refusal says one entry
per finding, not one per field (comment only).
- `.changeset/37659-screen-input-fields-wording.md`: `@objectstack/spec`
patch (the describe ships in the JSON schema). The service-automation
edit is a comment only, so it takes no bump.
The example is checked against `validateScreenInputs`, and the engine
maps its issues one to one onto `fields`. For a field whose `min`
exceeds its `max`, only a value above `max` and below `min` trips both
`min_value` and `max_value`. A value at or under `max` trips `min_value`
alone, and the wording says exactly that. No authoring rule refuses
`min` above `max`, so a published flow can serve it. The first round
also named a `required` `record_link` field sent `null`. That case is
removed: the screen-field authoring schema refuses `required` on a
`record_link` field at publish, so no served screen can produce it. The
text says "more than one entry", not "two", because two is not a
ceiling.
## Tests
No behaviour changed, so no test was added or ablated. Local readings at
`7ec661d938`:
<details><summary>Local runs</summary>
- `pnpm --filter @objectstack/spec build`: VERDICT command-exit 0.
- `pnpm --filter @objectstack/spec check:generated`: first run named one
stale artifact (`content/docs/references/**`, regenerate with
`gen:docs`); after `gen:docs`, `check:docs` printed "249 generated files
in sync with packages/spec", exit 0, and a rerun of `check:generated`
exited 0.
- `pnpm --filter @objectstack/spec typecheck` plus `vitest run
src/api/automation-api.zod.test.ts`: VERDICT command-exit 0, 77 tests
passed (first round, at `19efb34bd4`; the second round changed only
describe text and comments).
- `check:api-surface` "public API surface + factory signatures
unchanged", `check:authorable-surface`, `check:nul-bytes`,
`check:doc-authoring`, `check-issue-citations` and 15 more derived
families: exit 0.
</details>
## Acceptance notes
- The dispatch order's zero-hit grep for the sentence in `flows.mdx` was
a line-wrap miss: the guide carried it across two lines ("one" ending
one line, "entry per violated field" opening the next). It is reworded
here.
- Copies left outside this card's file surface, noted, not filed: the
Console runner's doc comment in
`ui/packages/app-shell/src/views/FlowRunner.tsx` ("per violated field"),
two copies in
`packages/services/service-automation/src/builtin/screen-input-whitespace-fields-37526.test.ts`
(its header comment at line 5 and a test title at line 89), the header
comment of
`packages/runtime/src/domains/automation-resume-screen-input-fields-37526.test.ts`
(line 7), and the released changeset text in `.changeset/pre/` and the
package CHANGELOGs (shipped release notes, not rewritten).
- Local gate coverage is a declared narrowing: 21 of the 111 derived
families ran here; the rest are CI's. `check:docs-transcript-drift`,
`check:doc-security-posture` and `check:doc-formula-expressions`
reported PREREQUISITE NOT MET (the lint package is not built in this
container), so they are NOT MEASURED locally and read from CI.
## Verification
Read first: `packages/spec/src/api/automation-api.zod.ts` (the describe
text that feeds the published JSON schema and reference page), then
`packages/spec/src/contracts/automation-service.ts`.
Two-minute check: `git grep -n "per violated field" -- packages/spec/src
packages/spec/docs content/docs` prints nothing (the released CHANGELOG
text still carries it, by design); the four edited passages each say
"one entry per finding".
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 00f97b3 commit 7d6742a
7 files changed
Lines changed: 31 additions & 9 deletions
File tree
- .changeset
- content/docs/automation
- packages
- services/service-automation/src
- spec
- docs/references/api
- src
- api
- contracts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
1525 | | - | |
| 1525 | + | |
1526 | 1526 | | |
1527 | 1527 | | |
1528 | | - | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
1529 | 1533 | | |
1530 | 1534 | | |
1531 | 1535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9853 | 9853 | | |
9854 | 9854 | | |
9855 | 9855 | | |
9856 | | - | |
| 9856 | + | |
9857 | 9857 | | |
9858 | 9858 | | |
9859 | 9859 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
1226 | | - | |
| 1226 | + | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
437 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | | - | |
| 698 | + | |
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
702 | 706 | | |
703 | 707 | | |
704 | 708 | | |
| |||
0 commit comments