Uh oh!
There was an error while loading. Please reload this page.
docs(spec): FlowSchema terminal messages are every-terminal-run, not screen-flow-only (#9512) - #9548
Conversation
…screen-flow-only (#9512) Since #9414, AutomationResult.successMessage/errorMessage are carried on EVERY terminal flow run — execute()'s exit, both retryExecution() exits, and the resume exit — not only screen-flow runs. Rewrite the JSDoc and describe() text above FlowSchema.successMessage/errorMessage to say so explicitly and to kill the screen-flow-only reading, which was the premise of a route considered and rejected at #9414's triage (narrowing the contract to screen-flow-only). Regenerate the two mirrored reference pages. Text-only: authorable-surface.base.json is unchanged (re-verified via check:generated, not inherited from the filer's claim). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fs18A2DdXLVN2h8PaaFBcP
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not seeCoarse fallback — 113 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 5684952d448919fcae0bbcd8e75f4e0882355fcd && git checkout 5684952d448919fcae0bbcd8e75f4e0882355fcd
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b348ac2c24100e26bf88486f704e3064a2e1fee6 e89d5c48bcd64df726da7a74164a4d4297ac2697 && git checkout -B drift-repro b348ac2c24100e26bf88486f704e3064a2e1fee6 && git merge --no-ff e89d5c48bcd64df726da7a74164a4d4297ac2697
node scripts/docs-audit/affected-docs.mjs --json b348ac2c24100e26bf88486f704e3064a2e1fee6
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9512
What
FlowSchema.successMessage/errorMessage(packages/spec/src/automation/flow.zod.ts)still described themselves as screen-flow-only text, but #9414 (merged as PR #9514,
5aadce374) made the engine carry the pair on every terminal flow run, not just resumedscreen flows. This PR rewrites the JSDoc and both
describe()strings to state thatreality and to explicitly kill the screen-flow-only reading — that reading is the exact
premise of a route considered and rejected at #9414's triage ("narrow the contract
text to say these are screen-flow / resume-only"), and leaving the text phrased that way
kept the rejected route's premise alive and reachable.
Before / after
packages/spec/src/automation/flow.zod.ts:618-635Wording mirrors the general phrasing
contracts/automation-service.ts'sAutomationResulthas always used ("
successMessageis set on terminal success,errorMessageonfailure") — that file is untouched by this PR.
The two mirrored reference pages were regenerated via
pnpm --filter @objectstack/spec gen:docsand committed as the generator produced them, no hand edits:content/docs/references/automation/flow.mdxcontent/docs/references/api/automation-api.mdxBoth diffs are the identical two-line
describe()text swap (table row forsuccessMessage/errorMessage), nothing else moved.Engine-site verification (re-verified on current
main, not inherited)git rev-parse HEADat worktree creation:02ebb6f5b(currentmain, ancestor of theunlock comment's
5aadce374).grep -n successMessage packages/services/service-automation/src/engine.ts→ 5 sites, matching the unlock comment's measurement:
engine.ts:3245— explanatory comment (execute()'s terminal-success exit)engine.ts:3263—execute()'s terminal-success return:successMessage: flow.successMessage,engine.ts:4104— the resume/bubble-up terminal exit:successMessage: flow.successMessage,engine.ts:6350— explanatory comment (retryExecution()'s success exit)engine.ts:6352—retryExecution()'s success return:successMessage: flow.successMessage, …Three real assignment sites (
execute(), the resume exit,retryExecution()'s successexit) plus two explanatory comments = the 5 grep hits. Confirms the pair is carried on
every terminal exit, not only the two
resumeInternalsites that existed pre-#9414.authorable-surface re-verification (measured here, not inherited)
Re-ran
pnpm --filter @objectstack/spec check:generatedafter the edit:git status --porcelainshows no change underpackages/spec/authorable-surface/orpackages/spec/authorable-surface.base.json— the filer's claim holds: thedescribe()text is not part of that generated artifact. This stays a text change, not a spec-surface
change.
Tests / gates
Head verified:
e89d5c48b(this PR's tip; the gate run below is on this exact tree).pnpm --filter @objectstack/spec build— clean.pnpm --filter @objectstack/spec check:generated— 13/13 green (docs regenerated once,then clean; authorable-surface untouched — see above).
pnpm --filter @objectstack/spec test— 409 test files / 10937 tests passed.pnpm --filter @objectstack/spec typecheck— clean (tsc --noEmit,check:scripts-typecheck,check:test-typecheck).node scripts/check-nul-bytes.mjs— OK, 6150 files scanned.node scripts/pm/dispatch-gates.mjs packages/spec/src/automation/flow.zod.ts,all green:
check:cross-package-test-inputs,check:doc-formula-expressions,check:empty-state,check:liveness,check:merge-driver,check:spec-parsed-alias,check:strictness-ledger,check:type-source-resolution,check:variant-docs,scripts/check-cross-package-test-inputs.mjs,scripts/docs-audit/check-affected-docs.mjs.node scripts/check-dev-prereqs.mjs— not run to green: it requires the fullmonorepo
dist/(64 of 67 packages unbuilt in this fresh worktree), which is unrelatedto this text-only diff and out of scope for targeted local verification. CI's lint.yml
pipeline builds the full workspace before this step runs.
Scope
Text only:
packages/spec/src/automation/flow.zod.ts's JSDoc + twodescribe()strings,the two generated reference pages, and a patch changeset for
@objectstack/spec. Noengine edits, no
contracts/automation-service.tsedits, no schema/shape change, nocontent/docs/releases/edit.Generated by Claude Code