Skip to content

docs(spec): screen-input refusal fields carry one entry per finding - #38814

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-37659-screen-input-fields-wording
Dec 1, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-37659-screen-input-fields-wording

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

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:

Local runs
  • 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.

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

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/service-automation, @objectstack/spec, touching 5 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/spec/docs/references/api/automation-api.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via AutomationResult (symbol, a top-level interface))
  • content/docs/api/declarative-endpoints.mdx (via /api/v1/automation/:name/trigger (route, bridged from symbol TriggerFlowResponseSchema — its route source's handler names it))
  • content/docs/automation/flows.mdx (via AutomationResult (symbol, a top-level interface), /api/v1/automation/:name/trigger (route, bridged from symbol TriggerFlowResponseSchema — its route source's handler names it))
  • content/docs/protocol/kernel/http-protocol.mdx (via /api/v1/automation/:name/trigger (route, bridged from symbol TriggerFlowResponseSchema — its route source's handler names it))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-1.mdx (via AutomationResult (symbol, a top-level interface))
  • content/docs/releases/v17/17-3.mdx (via AutomationResult (symbol, a top-level interface))
  • content/docs/releases/v17/17-6.mdx (via AutomationResult (symbol, a top-level interface))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/docs/references/api/automation-api.md) — pages documenting those are invisible to this run
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 182 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json d97aaaea9a1e4298f7db799879709fe365c2df3e → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 514631de77885ac30e35f203f1aceb9ec6240e23 — the merge of head 7ec661d9380ef1eb02b7bacd00a8563fcca751e2 into base d97aaaea9a1e4298f7db799879709fe365c2df3e, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 514631de77885ac30e35f203f1aceb9ec6240e23 && git checkout 514631de77885ac30e35f203f1aceb9ec6240e23
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d97aaaea9a1e4298f7db799879709fe365c2df3e 7ec661d9380ef1eb02b7bacd00a8563fcca751e2 && git checkout -B drift-repro d97aaaea9a1e4298f7db799879709fe365c2df3e && git merge --no-ff 7ec661d9380ef1eb02b7bacd00a8563fcca751e2

node scripts/docs-audit/affected-docs.mjs --json d97aaaea9a1e4298f7db799879709fe365c2df3e

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs d97aaaea9a1e4298f7db799879709fe365c2df3e → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 19efb34bd43ff4e2301dc6c73da35fab728f1d79
Local-runs: none
Scope: packages/spec/src/api/automation-api.zod.ts, packages/spec/src/contracts/automation-service.ts + packages/services/service-automation/src/screen-input-contract.ts, packages/spec/docs/references/api/automation-api.md
Security-touching: no
Rule-change-verified: none

Read-only: the card, the PR body, the diff origin/main...19efb34bd4 (merge-base d97aaaea9a, 6 files, +32/-8), the cited code at the head, and the head's check-runs (01:42Z: 24 success, 12 skipped, 35 in progress, 0 failed). All file:line below are at the head.

① Derived judgments

  • "one entry per finding" — TRUE. refuseInvalidScreenInput maps the validator's issues one to one, with no merge or dedupe: packages/services/service-automation/src/engine.ts:9738 (the call) and :9766 (an issues.map over { field, code, message }). The REST transport passes the array through unchanged as details.fields: packages/runtime/src/domains/automation.ts:3693-3699.
  • "unknown_field: field is the key the caller sent" — TRUE. packages/services/service-automation/src/screen-input-contract.ts:328-335 pushes field: key for each bag key not declared.
  • "a value above a field's max but below its larger min breaks both bounds" — TRUE, and reachable. The bound pass has two independent ifs, :312-318 (min_value) and :319-325 (max_value). With min above max, a value between them trips both; a value at or under max trips min_value alone, one at or over min trips max_value alone. The wording says exactly the two-entry case. No authoring rule refuses min above max (packages/spec/src/automation/builtin-node-config.zod.ts:1140-1141, and no check in the refinement at :1174-1225), so an authored flow can serve this.
  • "a required record_link field sent null breaks both required and invalid_value" — FALSE for any screen the platform serves (F1, must-fix). Read in isolation the validator does emit both: required at screen-input-contract.ts:247-261 (isPresent(null) is false, :59-61) and invalid_value at :290-298 (judged on the key, :292). But no screen node can serve that field. The published authoring schema refuses required on a record_link field: SCREEN_FIELD_RECORD_LINK_REFUSED_KEYS = ['required', 'options', 'placeholder', 'min', 'max'] at packages/spec/src/automation/builtin-node-config.zod.ts:941, enforced at :1201-1212, required: false included. The screen executor parses its config against ScreenConfigSchema before it serves anything and returns a guard refusal on failure (packages/services/service-automation/src/builtin/screen-nodes.ts:375-376), and it serves required: f.required === true (:552). The head's own tests pin both halves: packages/spec/src/automation/screen-field-record-link.test.ts:75-103 (refused, through the node config too) and packages/services/service-automation/src/builtin/screen-record-link-resume.test.ts:97 (every served link field has required === false). On authored metadata a record_link field sent null yields ONE entry, invalid_value. The only way to reach two is an executor other than the built-in screen node returning a ScreenSpec that the authoring schema would refuse (engine.ts:480 lets any executor return screen); none of the four passages says that, and the guide describes the built-in node. The sentence sits at packages/spec/src/api/automation-api.zod.ts:438-439, packages/spec/src/contracts/automation-service.ts:702-703, the regenerated packages/spec/docs/references/api/automation-api.md:1226, content/docs/automation/flows.mdx:1528-1529 and .changeset/37659-screen-input-fields-wording.md:10. The card states this case as fact (from nit N1 of the earlier review); that statement is a colleague's reading of the validator alone and does not hold against the head.
  • "One field can carry two entries" — true as an existence claim, not a ceiling (nit, folded into the F1 fix). By reading, not run: the bound pass does not read type (screen-input-contract.ts:306-311), so a string-kind or file field that declares a bound and is sent a number outside it gets invalid_type (:270-286) plus a bound code, and with min above max as well, three entries. The parenthesised pair in the describe reads as the full list; it is neither complete nor, after F1, half reachable.
  • ScreenInputIssue.code jsdoc (N2) — TRUE. The codes ride AutomationResult.fields, one entry per issue (engine.ts:9766), served as error.details.fields (automation.ts:3699); the old "ride inside the refusal's message" was stale, since error carries the messages only (engine.ts:9742, :9760-9762).

② Semver level

  • @objectstack/spec patch — correct. The two spec hunks change a .describe() string argument (automation-api.zod.ts:436-441) and a jsdoc block (automation-service.ts:697-706). No Zod shape, key, enum member, export or type changes. The describe ships in the package (runtime description and the generated reference), so a changeset is owed; Metadata-protocol: none takes patch (AGENTS.md, Post-Task Checklist step 3). The changeset carries both declaration lines line-initial.
  • @objectstack/service-automation left out — correct. ScreenInputIssue is not reachable from the package's published entry types: package.json exports has the single entry ., src/index.ts re-exports nothing from screen-input-contract.ts, and the type appears only inside that file (:32, :242-243). engine.ts:17-22 imports the validator and ScreenFieldVisibility, not the issue type, and uses the result inside the private refuseInvalidScreenInput (:9697), whose declared return type is AutomationResult | null. The edit is a comment on a type-only declaration that is erased from the JavaScript and absent from the entry type graph, so the diff publishes nothing from that package. Reasoned from source; no built dist was read.

③ Boundary flags

  • Clause-②: no — holds. Nothing widens or narrows an accept set or the public surface; no export added or removed.
  • Metadata-protocol: none — holds. Nothing a metadata author can write changes.
  • Generated output — regenerated, not hand-edited, by reading. The fields cell at packages/spec/docs/references/api/automation-api.md:1226 equals the concatenated describe at automation-api.zod.ts:436-441 word for word, and it is the only generated file on the head that embeds this describe (the stem "field-addressed findings behind an" appears in that page, the Zod file and the contract only). The mechanical check is CI's check:generated, still in progress at read time. Once F1 changes the describe, the page is regenerated again.
  • Dev flag "changeset bumps spec only" — answered in ②: correct.
  • Dev flag "I do not judge it owes a contract review" — not upheld. Both spec files sit under packages/spec/src/** (non-test), the published-schema face; reviewFace returns both as hits. This record is that review.
  • Dev flag "local gates narrowed, rest to CI" — CI is not yet green on this head (35 runs in progress, none failed). The all-green landing check stays with the seat.
  • Dev out-of-scope list of leftover copies — answered in ④.
  • open_questions: none filed.
  • SQL push-down check: no query, id materialisation or join in the diff. No finding.
  • Author: the PR's user.login is objectstack-fleet[bot]; no off-relay author to name.
  • Untrusted text: no instruction-shaped text in the card, the PR body or their comments.
  • Auto-merge is not armed (draft PR), so no disarm is owed for this FAIL.

④ Design judgment

  • packages/spec/src/api/automation-api.zod.ts — F1, must-fix. The change to "one entry per finding" and the unknown_field sentence hold against the code and meet the card. The required record_link example does not: the reference page built from this describe now names, as a case a response carries, a field that ScreenFieldConfigSchema in the same package refuses. A reader who authors from the response reference is told required is a key a record_link field can carry, and is then refused at publish. That is a new contradiction between two published sentences on the head, on the surface this card exists to correct.
  • packages/spec/src/contracts/automation-service.ts — F1, must-fix, same sentence. The same file says of record_link that "the server refuses any value sent under its name" (:394-398) and points at ScreenFieldConfigSchema for the authoring side. The added guidance "a runner groups by field rather than counting one entry per field" is sound and should stay.
  • packages/services/service-automation/src/screen-input-contract.ts (implementing file). The code agrees with the contract on one entry per issue and on the unknown_field key. The N2 jsdoc is correct.
  • Prose faces carrying F1 (not L2 faces, fixed in the same edit). content/docs/automation/flows.mdx:1528-1529 now contradicts the same page at :1022-1023 ("required, options, placeholder, min and max are refused on it at publish"). .changeset/37659-screen-input-fields-wording.md:10 would compile the false example into the release notes.
  • Remaining "per violated field" copies on the head — none on a published surface this PR should have fixed. git grep on the head finds: .changeset/pre/37526-screen-required-whitespace.md:18 and five package CHANGELOG.md files (release-owned, shipped prerelease notes; correctly left, and the new changeset corrects the record); ui/packages/app-shell/src/views/FlowRunner.tsx:283 (source comment); packages/services/service-automation/src/builtin/screen-input-whitespace-fields-37526.test.ts:89 (test title); packages/runtime/src/domains/automation-resume-screen-input-fields-37526.test.ts:7 (test header). packages/spec/src, packages/spec/docs and content/docs are clean, the line-wrapped guide copy included.
  • F2, nit. The PR's list of copies left behind misses three: packages/services/service-automation/src/engine.ts:9763 ("The same findings, one per field", on the very line that maps issues onto fields, in the package this PR already edits a comment in), the runtime test header above, and screen-input-whitespace-fields-37526.test.ts:5. No effect on the contract; fix engine.ts:9763 here or name all three in the follow-up note.

Items to fix:

  1. F1 (must-fix). Remove the required record_link example from all five places (automation-api.zod.ts:438-439, automation-service.ts:702-703, flows.mdx:1528-1529, the changeset body, and the reference page by gen:docs, not by hand). Name only cases a screen served from authored metadata can produce. The min above max case qualifies as written. If a second example is wanted, measure it in a test or probe first; the string-kind or file field with a bound, sent an out-of-bound number, is a candidate by reading only. Prefer "more than one entry" to "two entries", since two is not a ceiling.
  2. F2 (nit, optional here). engine.ts:9763 and the two test comments, as above.

The changed head owes a delta read by this reviewer.

Implemented-by: claude/issue-37659-screen-input-fields-wording
Reviewed-by: session_01QSeKYnrQ7UMtHofKQVjcH2

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7ec661d9380ef1eb02b7bacd00a8563fcca751e2
Local-runs: none
Scope: packages/spec/src/api/automation-api.zod.ts, packages/spec/src/contracts/automation-service.ts + packages/services/service-automation/src/engine.ts, packages/spec/docs/references/api/automation-api.md
Security-touching: no
Rule-change-verified: none

Delta read of 19efb34bd4..7ec661d938 (two commits, 6 files, +10/-12; merge-base with main unchanged at d97aaaea9a), by the reviewer of the FAIL record on 19efb34bd4 (comment 7297846570). Read-only: the delta, the cited code at the new head, the updated PR body and the head's check-runs (01:55Z: 15 success, 13 skipped, 27 in progress, 0 failed). The validator, the authoring schema, the screen executor and the transport did not change between the two heads (git diff --stat over those paths is empty), so the ①–④ judgments of the first record that this delta does not touch stand. All file:line below are at the new head.

① Derived judgments

  • F1 (must-fix) — closed. The required record_link example is gone from all five places: packages/spec/src/api/automation-api.zod.ts:438-439, packages/spec/src/contracts/automation-service.ts:702-704, packages/spec/docs/references/api/automation-api.md:1226, content/docs/automation/flows.mdx:1528-1530 and .changeset/37659-screen-input-fields-wording.md:10. A grep of the head for the removed wording finds no copy.
  • "One field can carry more than one entry" — TRUE. It no longer states a count that the code can exceed.
  • "a value above a field's max but below its larger min breaks both bounds" — TRUE and reachable, as judged before. The two independent bound checks are at packages/services/service-automation/src/screen-input-contract.ts:312-318 and :319-325; no authoring rule refuses min above max (packages/spec/src/automation/builtin-node-config.zod.ts:1140-1141). It is now offered as an instance ("for instance"), not as a closed list.
  • engine.ts:9763 comment, "The same findings, one entry per finding" — TRUE (F2 closed). It sits above :9766, which maps each validator issue onto one fields entry with no merge.
  • The "one entry per finding" and unknown_field sentences are unchanged by the delta and hold as recorded.

② Semver level

  • @objectstack/spec patch — still correct. The delta changes the same .describe() string and jsdoc block only; no shape, key, export or type moves. The changeset keeps both declaration lines line-initial.
  • @objectstack/service-automation still correctly left out. The delta adds one more edit to that package, a line comment inside a method body at engine.ts:9763. It changes no declaration and no behaviour, so the diff still publishes nothing from the package.

③ Boundary flags

  • Clause-②: no and Metadata-protocol: none — still hold. No accept set or public surface moves.
  • Generated output — regenerated, in its own commit (7ec661d938). The fields cell at automation-api.md:1226 contains the concatenated describe from automation-api.zod.ts:436-441 exactly (matched with a fixed-string grep of the whole sentence against the page: one hit). CI's check:generated is the mechanical check and was in progress at read time.
  • Dev flags of the first round — answered there; the PR body now carries the corrected reasoning for the example and the reason for "more than one".
  • CI is not yet green on this head (27 in progress, none failed). The all-green landing check stays with the seat.
  • SQL push-down check: no query code in the delta. No finding.
  • Author: objectstack-fleet[bot]. Auto-merge is not armed (draft PR).
  • Untrusted text: nothing instruction-shaped in the updated PR body or the new comments.

④ Design judgment

  • packages/spec/src/api/automation-api.zod.ts. The describe now holds against the code it cites and against ScreenFieldConfigSchema in the same package: the contradiction F1 named is gone, and the reference page built from it says nothing an author would be refused for.
  • packages/spec/src/contracts/automation-service.ts. Same sentence, same result. The guidance that a runner groups by field is kept and is consistent with "more than one entry".
  • packages/services/service-automation/src/engine.ts (implementing file). The comment agrees with the line it annotates.
  • Prose faces. flows.mdx:1528-1530 no longer contradicts :1022-1023 on the same page; the changeset body matches the describe.
  • Remaining "per violated field" copies on the head — none on a published surface. ui/packages/app-shell/src/views/FlowRunner.tsx:283, packages/services/service-automation/src/builtin/screen-input-whitespace-fields-37526.test.ts:5 and :89, packages/runtime/src/domains/automation-resume-screen-input-fields-37526.test.ts:7, and the release-owned .changeset/pre/ and CHANGELOG.md text. The PR's Acceptance notes now name every one of them. Accepted as left: source comments and test titles outside the card's file surface, no effect on the contract.

No must-fix or should-fix is open. This is the final round for this head.

Implemented-by: claude/issue-37659-screen-input-fields-wording
Reviewed-by: session_01QSeKYnrQ7UMtHofKQVjcH2

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

L1 ACCEPT · PR #38814 (#37659) · head 7ec661d9380ef1eb02b7bacd00a8563fcca751e2 · read 2026-12-01T02:32Z

席位核对

  1. Shape. Draft, base main, first line Fixes #37659 (the signature line precedes it; the parser reads Fixes #37659 as the first line). No closing keyword binds another card. The PR delivers both card items (N1, N2), so Fixes is right.
  2. Premise measured. The card's N1 premise was half wrong: its "required record_link sent null gives two entries" example cannot occur on a served screen (SCREEN_FIELD_RECORD_LINK_REFUSED_KEYS, builtin-node-config.zod.ts:941). L2 7297846570 found it and round 2 removed it from all five places; the corrected statement stands on this PR.
  3. Gates (check-runs at this head). 64 success · 14 expected skip · 0 failed · 0 pending; Lint & Repo Gates success, TypeScript Type Check success. L2 at CONTRACT_REVIEW_TIER: FAIL 7297846570 on 19efb34bd4 → delta PASS 7298069176 on this head.
  4. Accepted deviations. (a) @objectstack/service-automation carries no changeset entry: its two edits are a comment on a type-only declaration not reachable from the package's entry types, and a line comment inside a method body; nothing it publishes changes (L2 ② concurs; l1-face's changeset flag read and cleared on that basis). (b) Local gates narrowed (21/111 families); CI ran the rest, all green. (c) PR body opens with the seat signature line (the relay's issue_patch requires it).
  5. Out of scope. Leftover "per violated field" copies off any published surface — ui/packages/app-shell/src/views/FlowRunner.tsx:283 (source comment), two test comments and a test title, and release-owned .changeset/pre/CHANGELOG text — are named in the PR's Acceptance notes and not filed: none is a published-surface defect, so none meets the filing gate. Docs-drift advisory pages (client-sdk, declarative-endpoints, http-protocol) re-read by the seat across line wraps: no stale copy. Skills-docs: not owed (Metadata-protocol: none, no narrowing arm).
  6. Landing. Not governed (check-governed-merges --pr 38814: 40 lines, ordinary queue landing). K = 2 (landing-k). main moved to ea6e312a (feat(objectql)!: a record in a closed state, and its lines, are closed to change and held for its whole approval (closedStates, ADR-0162) #38810, Version Packages): git merge-tree clean; of this PR's files only engine.ts changed on main and it merges without conflict; the regenerated automation-api.md's inputs are untouched on main, so generated drift is zero. Ready + auto-merge now; the queue builds on the merged result.

Clause-②: no · Metadata-protocol: none

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 1, 2026 02:32
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 1, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Queue kick, 2026-12-01T03:35Z · PR #38814 dequeued with CI_FAILURE from group gh-readonly-queue/main/pr-38814-7625001f9b.

Signature (new; no ledger row matches it — the nearest, #26288, is a tsc OOM with exit 134, a different form):

  • Workflow Lint & Type Check, run 46561945212, job Type Check · workspace (142351347416): started 02:33:18Z, cancelled at 03:33:18Z by the 60-minute job timeout. The log's last line is the spec tsup build output at 02:41:51Z; there is no error line at all after it, and no error TS. Every other lane of the run is success. The aggregate TypeScript Type Check failed only on that cancelled lane.

Initial judgement: a hang in the runner, not this PR's diff. The three facts for one re-enqueue:

  1. Not this diff: the same job passed on a queue group that CONTAINS this PR's commit — group pr-38820 (run 46565885903, Type Check · workspace success 03:05→03:17Z), built on the base with docs(spec): screen-input refusal fields carry one entry per finding #38814 ahead of it. (No test file failed, so there is no import closure to compare; this direct reading stands in for it.)
  2. Queue base, same lane, green: as in 1, and the five other groups queued after it passed the same lane in the 02:33–02:37 window.
  3. First error is a timeout, not an assertion: yes — no error line before the cancellation.

Action: one re-enqueue, as is. If the same signature kicks it again, this seat stops and hands it to the next seat for re-diagnosis.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 7d6742a Dec 1, 2026
79 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37659-screen-input-fields-wording branch December 1, 2026 04:06
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… the body the run ran, so it survives restarts (objectstack-ai#38825)

repo:objectstack@os-justin · os-justin ·
session_01QSeKYnrQ7UMtHofKQVjcH2

Fixes objectstack-ai#37218

Clause-②: yes (widening: AutomationEngine gains getRunFlowChecksum and
getFlowBodyChecksum; RunRecord gains optional flowChecksum; the exported
ApprovalResumeSurface drops the optional getFlowVersionHistory and gains
optional getRunFlowChecksum and getFlowBodyChecksum)
Metadata-protocol: none

## 维护者速读

-
用户能看到什么变化:审批人和提交人在记录的审批面板上看已决定的请求时,"审批在此结束"这一行在每次重启或流程重新加载后不再消失;只有流程确实被改过时才不显示。
- 为什么做:这是"审批去向"功能(告诉大家一条审批走到哪一步、是否结束)的后续修补,之前它对历史请求在每次部署后就悄悄失效。
- 出错会怎样:最坏情况是某条已决定请求少显示"审批在此结束"(与改动前相同的保守方向),不会显示错误的结论;改动可直接撤回。
- 要你做什么:无

## What changes

A decided request's `flow_route.outcome.ended` ("The approval ended
here") is served only when the run ran the flow body armed now. That
proof used to read this process's registration history (newest
registration, registered before the run started), so every restart and
every re-registration of the flow dropped the line, and two narrow cases
(a rollback undone after the run started; a replica that registered an
edit before another replica started the run on the older body) served it
for a body the run did not run.

The witness is now the body's **content**:

- **service-automation (the producer).** A run's context carries a stamp
naming the run and the content checksum of its body (`$flowChecksum`,
`run-flow-checksum.ts`), written where the run starts beside `$rootRun`
and carried through every pause and resume. The terminal record carries
it (`RunRecord.flowChecksum`), and the `sys_automation_run` terminal row
now writes `flow_checksum` on every run that paused (it was NULL on
every finished run). A strand's row keeps its snapshot's pin first, as
before. A run whose pinned body could no longer be found, and that
resumed on another body, records none. Two reads:
`AutomationEngine.getRunFlowChecksum(runId)` (memory, terminal row,
paused row, in `getRun`'s order) and
`AutomationEngine.getFlowBodyChecksum(flow)`.
- **plugin-approvals.** `ranArmedBody` delegates to the new
`run-body-witness.ts`: the run's recorded checksum equals the armed
body's, else "not known". It no longer reads `getFlowVersionHistory`.
The in-memory registration-time check is dropped rather than kept as a
fast path: its only extra answers are the N7 cases, which it gets wrong.
- **spec.** The `ended` sentence on
`ApprovalRequestRow.flow_route.outcome` says this (doc text only).
- **N2.** "Later" stays a later `created_at`: a pin shows the sibling
case unreachable (an approval in a `parallel` branch, a `loop` body or a
`try_catch` body is refused at parse; a `subflow` or `map` child files
its requests under its own run id), and the `attachFlowRoute` docblock
says so.

Why the producer is in service-automation, not a read-side accessor
only: measured on d97aaae, the terminal row of a run that paused and
then finished wrote `flow_checksum = NULL`
(`serializeConsumedSuspension(undefined)`), so no durable identity of a
finished run existed to read.

## Tests

-
`packages/plugins/plugin-approvals/src/flow-route.integration.test.ts`,
new top-level describe over a shared durable store: restart and
same-content re-registration keep `ended: true`; rollback-undone and
two-replica cases serve no `ended`; a control for two replicas holding
the same body serves it.
- `packages/plugins/plugin-approvals/src/approval-route.test.ts`: the N2
sibling pin, with a green control.
-
`packages/services/service-automation/src/flow-version-pinning.test.ts`:
terminal record carries the run's body checksum; a restart reads it
back; resumed after an edit names the started body; a lost pinned body
records none; a run parked before the stamp gets its pin; a context
carrying another run's stamp is not this run's identity.
-
`packages/services/service-automation/src/suspended-run-store.test.ts`:
the object store writes, clears and reads back `flow_checksum` on
terminal rows, and a strand keeps its snapshot's pin.

Ablation (reverted in the tree only, then restored from HEAD): the
plugin's `approval-service.ts` at the base turns the 4 new plugin pins
red (restart, re-registration, rollback undone, two replicas);
`run-history.ts` at the base turns 5 of the engine pins red.

## Acceptance notes

- A run that finished before this release has no checksum on its row, so
its decided requests do not serve `ended` (they already lost it at the
restart an upgrade makes). A run paused before the release and finished
after gets the pin its suspension recorded.
- A run that never paused records no checksum on its terminal row: the
execute-path record reads the caller's context, not the run's. No
approval request exists for such a run, so `ended` is unaffected.
- Residual: a run parked before this release that had already resumed
once on a lost or unrecorded body was re-pinned to the armed body by the
existing resume; the resume here takes that pin. Narrow, and
pre-existing in what the pin means.
- ADR-0162's table row citing `approval-service.ts#ranArmedBody`
("cannot always prove which flow body a run ran ... after an edit of the
flow, or the registration a restart makes") is now partly stale: a
restart no longer defeats the proof. The declaration is kept so the
anchor resolves; the ADR text is left for its owner.
- Clause-②: the diff adds public members to `AutomationEngine`
(`getRunFlowChecksum`, `getFlowBodyChecksum`) and an optional
`RunRecord.flowChecksum`. By the objectstack-ai#28405 precedent that reads `yes
(widening)`; the claim's `no` is copied as dispatched and flagged in the
report.
- A contract review is owed for the `ended` sentence in
`packages/spec/src/contracts/approval-service.ts`.

Read first (by risk):
1. `packages/services/service-automation/src/run-flow-checksum.ts`: the
stamp rules (own run only, `null` never re-derived, unrecovered resume
clears).
2. `packages/services/service-automation/src/suspended-run-store.ts`
`writeTerminal`: `flow_checksum` now written on every terminal row,
snapshot pin first.
3. `packages/services/service-automation/src/run-resume.ts` at the
segment context: `resumeRunFlowChecksum`.

Two-minute check: `pnpm --filter @objectstack/plugin-approvals exec
vitest run src/flow-route.integration.test.ts` shows the describe "the
approval-ended witness is the content of the body the run ran" with 5
passing tests.

## Verification

All readings on head b21c5e1 (after merging origin/main 440574f
once).

<details><summary>Builds and typecheck</summary>

- `pnpm --filter '@objectstack/plugin-approvals...' build
--concurrency=2` under the verify lock: VERDICT command-exit 0.
- `pnpm --filter @objectstack/spec check:generated`: "All 14 generated
artifacts are up to date".
- `pnpm --filter @objectstack/service-automation typecheck` and `pnpm
--filter @objectstack/plugin-approvals typecheck`: VERDICT command-exit
0, both test layers OK.

</details>

<details><summary>Tests</summary>

- `@objectstack/plugin-approvals` vitest: Test Files 142 passed (142),
Tests 2255 passed (2255).
- `@objectstack/service-automation` vitest: Test Files 301 passed (301),
Tests 4467 passed (4467).

</details>

<details><summary>Derived gates</summary>

- `dispatch-gates --ran`: 99 derived, 99 run, reconciled.
- 95 exit 0. Not measured locally (CI owns):
`check:dual-build-cjs-loads` and `check:i18n` (exit 3, PREREQUISITE NOT
MET: need the full build), `check:query-options-erasure` and
`check:type-check-debt` (timed out at 200 s on the shared box).
- Re-run on the final head: `check:adr-symbol-anchors`,
`check:durability-log-level`, `check:startup-registry-verdict`,
`check:nul-bytes`, `check:issue-citations`, `check:doc-authoring`, the
three changeset gates, `check:closing-keyword-parity`,
`check:cross-package-test-inputs`, `check:test-source-alias`,
`check:engine-double-contract`, all exit 0; `check-platform-checklist
--changed-from origin/main`: OK, 44 anchors judged, 0 lost.
- `node scripts/pm/overlap-check.mjs`: VERDICT clean (origin/main and
objectstack-ai#38814 merge cleanly).

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review follow-ups of PR #37643: screen-input refusal fields wording (one entry per finding, stale code jsdoc)

2 participants