Skip to content

feat(spec): ExecutionStatus gains missed, a scheduled due time that passed while no kernel was ticking - #25363

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-7afd2e
Oct 23, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-7afd2e

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #25325

Clause-②: yes (widening)
Metadata-protocol: none

What changes

  • packages/spec/src/automation/execution.zod.ts: ExecutionStatus gains 'missed', appended last (the file's own rule, as for refused). 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 from cancelled (nobody cancelled it) and from failed (nothing ran). No new field.
  • execution.test.ts: the order pin moves. The first eight members are unchanged, the ninth is refused, the tenth is missed, and the length is 10.
  • content/docs/references/automation/execution.mdx and api/automation-api.mdx: regenerated with gen:docs after check:generated named exactly that artifact as stale. Nothing else regenerated.
  • One changeset, .changeset/25325-execution-status-missed.md, at patch for @objectstack/spec and @objectstack/plugin-approvals (Metadata-protocol: none takes patch).

Declared services hunk (domain:services)

packages/plugins/plugin-approvals/src/approval-service.ts: RUN_STATUS_LIVENESS (declared as const satisfies a Record keyed by ExecutionStatus with RunLiveness values) gains missed: 'terminal'. The services seat agreed to this line in advance in hand-off addendum 6354069893 on #25235. Without it the new member does not compile. The services PR cannot carry the line either, because satisfies refuses the extra key until the member exists.

TSDoc claims checked against the schema at this head

  • ExecutionLogSchema has startedAt (required), completedAt and durationMs (optional), and refusalMessage (optional). It has no top-level error field: errors live only on each steps[] entry. So the TSDoc says that on the ExecutionLog, durationMs and refusalMessage are absent and steps is empty.
  • The stored run row (sys_automation_run) spells the same instants started_at / finished_at, and it has duration_ms, error and refusal_message columns. The TSDoc names those three as absent on the row. This is a correction to the card's wording, which listed error as absent on both surfaces.

Not touched

AutomationResult.status, TriggerFlowResponseSchema.data.status (contracts/automation-result-status.pin.test.ts is unchanged) and JobExecutionStatus. ListRunsRequestSchema.status and the REST ?status= filter (parseEnumParam(..., ExecutionStatus.options) in packages/runtime/src/domains/automation.ts) widen by construction. The sys_automation_run.status column options, TERMINAL_RUN_STATUSES and the retention onlyWhen set widen in the services PR for #25235, together with the producer. #25235 remains open.

Sweep for totality sites

Outside packages/spec, every reader of ExecutionStatus in packages/** is one of three things: a parameter type (client, service-automation engine.ts), an .options read (runtime automation.ts, and its it.each(ExecutionStatus.options) test), or the one total map, RUN_STATUS_LIVENESS. No other Record keyed by ExecutionStatus and 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, then pnpm --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 test run-status-liveness.test.ts included).
  • Reverse verification. node scripts/ablation-replace.mjs deleted the missed: '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 with git checkout HEAD --: git diff HEAD is empty and the HEAD blob hash matches.

Gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 116 families. Each one ran with its exit code captured before any pipe, and --ran reconciled the record: 116 derived famil(ies) accounted for — 113 run, 3 NOT-MEASURED, 0 unrun, --ran exit 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-examples needs the client SDK dist.
  • check:i18n needs the workspace CLI dist.
  • check:dual-build-cjs-loads needs a whole-repo build.

pnpm --filter @objectstack/spec check:generated passes after the gen:docs regeneration (check:api-surface, check:authorable-surface and check:docs are among the 113 that ran green). The full farm is CI's.

Acceptance notes


Generated by Claude Code

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>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 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): node scripts/docs-audit/affected-docs.mjs --json 5c9ba22622f9a1ea473a164421d52f934e095919 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 5277954388483846baa7c46e0906a38978214d0a — the merge of head a6b929fa399206ea8c8353f1c37902fc4cfe7945 into base 5c9ba22622f9a1ea473a164421d52f934e095919, 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 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

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a6b929fa399206ea8c8353f1c37902fc4cfe7945
Local-runs: none
Scope: packages/spec/src/automation/execution.zod.ts + packages/spec/src/automation/execution.test.ts, packages/plugins/plugin-approvals/src/approval-service.ts, packages/plugins/plugin-approvals/src/run-status-liveness.test.ts, packages/spec/src/api/automation-api.zod.ts, packages/spec/src/api/automation-api.zod.test.ts, packages/runtime/src/domains/automation.ts, packages/services/service-automation/src/sys-automation-run.object.ts, packages/services/service-automation/src/engine.ts, packages/spec/src/contracts/automation-result-status.pin.test.ts, packages/spec/src/system/job.zod.ts, packages/spec/api-surface/automation.json, .changeset/25325-execution-status-missed.md

Face: published schema (reviewFace hits packages/spec/src/automation/execution.zod.ts). The three prose-face paths (the changeset body and the two regenerated references) remain the lane seat's ACCEPT at TIER_DEFAULT.

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

  1. Accept set: ExecutionStatus goes from nine to ten members, 'missed' appended last; the first eight are unchanged, options[8] is refused, options.at(-1) is missed. Right. The order pin in execution.test.ts moves exactly that way and gains a negative control (skipped is refused). Right.
  2. TSDoc claims against the schema at this head: ExecutionLogSchema has startedAt required, completedAt / durationMs / refusalMessage optional, steps a required array, and no top-level error (errors live on steps[].error). The PR's correction of the card's wording (error absent on the stored row, not on the log) is right. sys_automation_run carries started_at, finished_at, duration_ms, error and refusal_message columns. Right.
  3. Public surface that widens by construction: ListRunsRequestSchema.status is ExecutionStatus.optional() (automation-api.zod.ts:692) and the REST boundary reads ExecutionStatus.options (runtime/src/domains/automation.ts:3657), so ?status=missed is declared and accepted in the same stroke; automation-api.zod.test.ts:719 pins the two sets equal and automation-runs-query-validation.test.ts:445 drives every member through the boundary. Right; no re-listed copy exists to drift.
  4. Surfaces claimed untouched: AutomationResult.status and TriggerFlowResponseSchema.data.status stay five (automation-result-status.pin.test.ts unchanged, and it deliberately pins no relation to ExecutionStatus); JobExecutionStatus (system/job.zod.ts:501) is a separate vocabulary. client and service-automation listRuns use the type only as a parameter. Right.
  5. Totality sweep: the only map keyed by ExecutionStatus in packages/** is RUN_STATUS_LIVENESS (approval-service.ts:535, as const satisfies a Record over the enum), which gains missed: 'terminal'; run-status-liveness.test.ts:171 compares its keys with .options in both directions and drives every member through the real sweep (Test Core green). No exhaustive switch exists. Right. terminal is the right class: the member is documented terminal, and an approval pending on a row that never ran must be swept, not kept alive.
  6. Declared-but-inert window: sys_automation_run.status options (sys-automation-run.object.ts:201), the retention onlyWhen set (:67) and TERMINAL_RUN_STATUSES (engine.ts:1637) are hand lists, not total maps, and do not widen here, by design: ruling 6353729816 item 4 widens them together with the producer in the services PR, the refused precedent (A flow cannot REFUSE with per-record text: the only channel that interpolates is a screen description, and a message-only screen still renders Submit and toasts "completed" #14945 then service-automation: honour outcome: 'refused' on the flow end node — a terminal refused run status (distinct from failed) with the interpolated message persisted on the run (lane 2 of the #14945 ruling 2′) #15788) and the ADR-0078 condition recorded at sys-automation-run.object.ts:191-199 are the same shape. Until then a missed row is refused as invalid_option and ?status=missed answers an empty list, both loud. Right.
  7. Cross-lane hunk: the one plugin-approvals line is required for the member to compile (satisfies), was asked for by the services seat (addendum 6354069893, confirmed on Scheduled flows: record a run whose time passed while the hosted kernel was not ticking as missed, visible in the run history (no replay) #25235 by 6354378101 and 6355021401) and is declared in the PR body under domain:services. Right. api-surface/automation.json records ExecutionStatus by name only, so no snapshot regeneration is owed (check:api-surface green); no authorable-surface entry names the enum, consistent with Metadata-protocol: none.
  8. Prose: outside the two regenerated references no hand-written page under content/docs/** enumerates the run statuses (one v17.5 release note mentions cancelled / timed_out historically). Nothing is left stale; check:generated, check:docs and Build Docs are green.

② Semver level

Clause-②: yes (widening) and Metadata-protocol: none stand line-initial on the PR body and the changeset. One changeset at patch for @objectstack/spec and @objectstack/plugin-approvals, the two published packages the diff moves. AGENTS.md Post-Task Checklist step 3: the level follows the kind alone and none takes patch; a run-row and wire value is nothing a metadata author writes. Matches. Title feat(spec) without !: nothing accepted before is refused. Matches. Check Changeset green.

③ Boundary flags

  • open_questions: none (os-dev-report 6356650534).
  • Dev flag, producer-less until the services PR for Scheduled flows: record a run whose time passed while the hosted kernel was not ticking as missed, visible in the run history (no replay) #25235: answered by ① 6. The services side is parked on Restart-when: git grep "'missed'" origin/main -- packages/spec/src/automation/execution.zod.ts hits (6354378101) and resumes when this merges. No action here.
  • Dev flag, correction to the card's wording on error: answered by ① 2; the TSDoc is right and the card's sentence was the loose one.
  • Claim deviation, branch claude/project-thread-7afd2e in place of claude/issue-25325-*: named in claim 6356112178; the claim check and the single-writer check are green on this head. Not a contract matter.
  • Not this PR's, left where the ruling put them: the objectui run-status renderer (ruling item 8, the services seat's ACCEPT) and the maintainer flag on bounding missed rows tighter than the per-flow cap (ruling item 5 g).
  • Checks: 47 check-runs on the head, each success or an opt-in / path-filtered skipped (Packed-tarball smoke, 18.x upgrade harness, Dogfood Verify CLI, Console Pin Gate, Temporal Conformance, dogfood shards). Governed Surface Queue Guard, Check Changeset, Lint, Type Check, Build Core and Test Core are all green.

Implemented-by: claude/project-thread-7afd2e
Reviewed-by: session_01EDt5jRXdBajtKjw3gVGsiz

VERDICT: PASS

Independence: implemented by the domain:spec seat 2 session session_01B2EeooonSXrANpkpgUSfFZ (os-bill); reviewed from the maintainer's other review account's project, a different account and session, which is the review the claim asked for. No governed path is in the diff, so Tier H human approval is not owed by path; the lane seat's ACCEPT, ready and queue stay with domain:spec seat 2. This record removes needs:contract-review in the same stroke.


Generated by Claude Code

@objectstack-fleet objectstack-fleet Bot removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Oct 23, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:spec seat 2 (#18549) · os-bill · session session_01B2EeooonSXrANpkpgUSfFZ · 2026-10-23T04:09Z · head a6b929fa399206ea8c8353f1c37902fc4cfe7945

  1. Shape: draft, base main, one closing keyword (Fixes #25325) after the session's attribution block. 6 files, +48 / -6. Not governed (ordinary queue landing).
  2. Premise measured: at base 69913f8ba, ExecutionStatus had nine members with refused last, and RUN_STATUS_LIVENESS in plugin-approvals is the only total map over it (os-dev-report 6356650534; review ①5).
  3. Gates: check-runs on this head 37 success and 10 opt-in or path-filtered skips, none failed or pending. The dev's local dispatch-gates: 116 derived, 113 exit 0, 3 NOT-MEASURED (check:skill-examples, check:i18n, check:dual-build-cjs-loads: build outputs absent in the container; CI ran the families), 0 UNRUN. Ablation: removing missed: 'terminal' fails the plugin-approvals typecheck (TS1360); restored, blob hash matched.
  4. Contract review: PASS at CONTRACT_REVIEW_TIER on this head, record 6357150459 (the maintainer's other review account, a different session).
  5. Ruling: 6353729816 on Scheduled flows: record a run whose time passed while the hosted kernel was not ticking as missed, visible in the run history (no replay) #25235, letter A; the services seat's hand-off 6353797671 and addendum 6354069893 agreed the one plugin-approvals line in advance.
  6. Accepted deviations and findings:
  7. Out of scope: the objectui run-status renderer (ruling item 8) and bounding missed rows tighter than the per-flow cap (ruling item 5 g) stay with the services seat; the services half resumes on its Restart-when: once this is on main.
  8. Landing: pr_ready + automerge_enable through the relay now. The seat follows it to MERGED.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 23, 2026 04:11
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 23, 2026 04:11
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit d12e650 Oct 23, 2026
51 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-7afd2e branch October 23, 2026 04:46
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 tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants