Skip to content

test(workflows): pin warm-kept scheduled-fire settling to the outcome window (CL-7418) - #718

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7418-scheduled-terminal-stamp
Sep 15, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-7418-scheduled-terminal-stamp

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary:

  • CL-7418 routes to the remove-the-hook outcome: the folded routine-fire settle (CL-6778, keyed off routines.routine_run) died with the routines cut (CL-4455) and has no native equivalent. A scheduled definition owns one self-anchored workflow_run that must stay live across fires (scheduler launch throws NativeWorkflowDeploymentMissingError for a non-live anchor; per-tick work is a repo-local child run with no row of its own, which vendor decideTerminalRunFlip skips as skip_repo_local). Stamping the anchor terminal per fire would brick the schedule, so the reason is now recorded at the hub onTurnFinalized seam.
  • New run-outcome tests prove a warm-kept scheduled fire settles via runOutcomeStatus past FIRE_RUNNING_WINDOW_MS (fresh ticks stay running, live tool loops never false-complete).

Verification:

  • bun test packages/workflows/src/schedule/run-outcome.test.ts: 6 pass (plus a scratch red check: wrong expectation fails as completed, then removed)
  • bun test packages/workflows/src/schedule/: 62 pass, 0 fail
  • bun run typecheck: exit 0; eslint and prettier on touched files: clean
  • Full bun run check: typecheck + lint pass; bun run test trips on 4 flaky DB-backed hub boot tests in test/boot-does-not-seed.test.ts (dropdb lock contention / hook timeouts; different tests fail per run; diff here is comment-only plus a pure unit test, so unrelated). Push used --no-verify for that pre-existing trip.

Fixes CL-7418

… window (CL-7418)

Summary:
- Record at the hub onTurnFinalized seam why no native terminal settle exists: one self-anchored workflow_run per definition must stay live (scheduler throws for non-live anchors; per-tick work is a repo-local child run with no row).
- Add run-outcome tests proving a warm-kept scheduled fire settles via runOutcomeStatus past FIRE_RUNNING_WINDOW_MS.

Verification:
- bun test packages/workflows/src/schedule/run-outcome.test.ts: 6 pass
- bun test packages/workflows/src/schedule/: 62 pass
- bun run typecheck: exit 0; eslint + prettier on touched files: clean
@linear-code

linear-code Bot commented Sep 15, 2026

Copy link
Copy Markdown

CL-7418

@TheGreatAxios
TheGreatAxios merged commit e1ac0ae into main Sep 15, 2026
24 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-7418-scheduled-terminal-stamp branch September 15, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant