Repository navigation
feat(spec): ExecutionStatus gains missed, a scheduled due time that passed while no kernel was ticking - #25363
Conversation
A scheduled flow's due time that passed while no kernel was ticking, recorded once and never replayed. Appended last; plugin-approvals' RUN_STATUS_LIVENESS maps it terminal. Claude-Session: https://claude.ai/code/session_01B2EeooonSXrANpkpgUSfFZ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B2EeooonSXrANpkpgUSfFZ Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check2 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 144 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 5277954388483846baa7c46e0906a38978214d0a && git checkout 5277954388483846baa7c46e0906a38978214d0a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5c9ba22622f9a1ea473a164421d52f934e095919 a6b929fa399206ea8c8353f1c37902fc4cfe7945 && git checkout -B drift-repro 5c9ba22622f9a1ea473a164421d52f934e095919 && git merge --no-ff a6b929fa399206ea8c8353f1c37902fc4cfe7945
node scripts/docs-audit/affected-docs.mjs --json 5c9ba22622f9a1ea473a164421d52f934e095919 |
Contract reviewServed-tier: Face: published schema ( Inputs: card #25325 (body, claim 6356112178, os-dev-report 6356650534); on its parent #25235 the ruling 6353729816 and the hand-off answers 6354378101 and 6355021401; PR #25363's body, file list and net diff against merge-base 69913f8 at head a6b929f; the 47 check-runs on that head. Read-only shape held: the cited files were read from the committed tree at the head, nothing was built, run or re-run. ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Independence: implemented by the Generated by Claude Code |
席位核对ACCEPT ·
Generated by Claude Code |
Requested by Bill · project thread
Fixes #25325
Clause-②: yes (widening)
Metadata-protocol: none
What changes
packages/spec/src/automation/execution.zod.ts:ExecutionStatusgains'missed', appended last (the file's own rule, as forrefused). The TSDoc says what it means: a scheduled flow's due time that passed while no kernel was ticking, recorded once by the next kernel that found it. It is terminal and is never started, resumed or replayed. It is distinct fromcancelled(nobody cancelled it) and fromfailed(nothing ran). No new field.execution.test.ts: the order pin moves. The first eight members are unchanged, the ninth isrefused, the tenth ismissed, and the length is 10.content/docs/references/automation/execution.mdxandapi/automation-api.mdx: regenerated withgen:docsaftercheck:generatednamed exactly that artifact as stale. Nothing else regenerated..changeset/25325-execution-status-missed.md, atpatchfor@objectstack/specand@objectstack/plugin-approvals(Metadata-protocol: nonetakespatch).Declared services hunk (
domain:services)packages/plugins/plugin-approvals/src/approval-service.ts:RUN_STATUS_LIVENESS(declaredas const satisfiesa Record keyed byExecutionStatuswithRunLivenessvalues) gainsmissed: 'terminal'. The services seat agreed to this line in advance in hand-off addendum6354069893on #25235. Without it the new member does not compile. The services PR cannot carry the line either, becausesatisfiesrefuses the extra key until the member exists.TSDoc claims checked against the schema at this head
ExecutionLogSchemahasstartedAt(required),completedAtanddurationMs(optional), andrefusalMessage(optional). It has no top-levelerrorfield: errors live only on eachsteps[]entry. So the TSDoc says that on theExecutionLog,durationMsandrefusalMessageare absent andstepsis empty.sys_automation_run) spells the same instantsstarted_at/finished_at, and it hasduration_ms,errorandrefusal_messagecolumns. The TSDoc names those three as absent on the row. This is a correction to the card's wording, which listederroras absent on both surfaces.Not touched
AutomationResult.status,TriggerFlowResponseSchema.data.status(contracts/automation-result-status.pin.test.tsis unchanged) andJobExecutionStatus.ListRunsRequestSchema.statusand the REST?status=filter (parseEnumParam(..., ExecutionStatus.options)inpackages/runtime/src/domains/automation.ts) widen by construction. Thesys_automation_run.statuscolumn options,TERMINAL_RUN_STATUSESand the retentiononlyWhenset widen in the services PR for #25235, together with the producer. #25235 remains open.Sweep for totality sites
Outside
packages/spec, every reader ofExecutionStatusinpackages/**is one of three things: a parameter type (client,service-automationengine.ts), an.optionsread (runtimeautomation.ts, and itsit.each(ExecutionStatus.options)test), or the one total map,RUN_STATUS_LIVENESS. No other Record keyed byExecutionStatusand no exhaustive switch exists beyond that map.Tests
At head
a6b929fa3:pnpm --filter @objectstack/spec build: lock VERDICT command-exit 0.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/automation/execution.test.ts: 1 file, 49/49 passed.pnpm --filter '@objectstack/plugin-approvals^...' build, thenpnpm --filter @objectstack/plugin-approvals typecheck && pnpm --filter @objectstack/plugin-approvals test && pnpm --filter @objectstack/spec typecheck: lock VERDICT command-exit 0, with plugin-approvals at 94 files and 1214/1214 tests passed (the totality testrun-status-liveness.test.tsincluded).node scripts/ablation-replace.mjsdeleted themissed: 'terminal'line (anchor x1 -> x0) and the plugin-approvals typecheck exited 2 with TS1360 (the map does not satisfy the Record type whose key union now includes"missed"). That shows the check read the rebuilt.d.ts. The line was then restored withgit checkout HEAD --:git diff HEADis empty and the HEAD blob hash matches.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 116 families. Each one ran with its exit code captured before any pipe, and--ranreconciled the record:116 derived famil(ies) accounted for — 113 run, 3 NOT-MEASURED, 0 unrun,--ranexit 0. The three NOT MEASURED families all exited 3 (PREREQUISITE NOT MET) because they need built output from packages outside this diff's closure. CI measures them:check:skill-examplesneeds the client SDKdist.check:i18nneeds the workspace CLIdist.check:dual-build-cjs-loadsneeds a whole-repo build.pnpm --filter @objectstack/spec check:generatedpasses after thegen:docsregeneration (check:api-surface,check:authorable-surfaceandcheck:docsare among the 113 that ran green). The full farm is CI's.Acceptance notes
refusedhad.needs:contract-review, per the claim).Generated by Claude Code