Uh oh!
There was an error while loading. Please reload this page.
feat(automation): re-arm suspended wait timers after cold boot + log cleanup - #1687
Merged
Conversation
…cleanup A timer-`wait` node schedules its auto-resume as a one-shot job that lives in the job service's process memory — a restart lost the wake-up while the suspended run survived in sys_automation_run, leaving the run paused forever unless resumed externally (ADR-0019 follow-up). - wait node: persist the wake deadline as node output (`<nodeId>.waitUntil`), written to variables before the suspend snapshot, on both the scheduled and the degraded (no job service) paths - new `rearmSuspendedWaitTimers()`: walks the durable store on boot — overdue deadlines resume immediately, future ones re-schedule the same `flow-wait:<runId>:<nodeId>` one-shot; non-timer pauses untouched; double fires absorbed by resume() idempotency - AutomationServicePlugin.start(): run the re-arm pass after the flow pull (resume() needs flows registered) - replace leftover console.warn debug statements in start() with ctx.logger Tests: 4 new cross-"restart" cases (two engines sharing one store) + suite green (166). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
waitnode's auto-resume one-shot job lives in the job service's process memory — a restart lost the wake-up while the suspended run survived insys_automation_run, leaving the run paused forever unless resumed externally.<nodeId>.waitUntil), written to flow variables before the suspend snapshot (both the scheduled and the degraded no-job-service paths)rearmSuspendedWaitTimers()walks the durable store on boot: overdue deadlines resume immediately; future ones re-schedule the sameflow-wait:<runId>:<nodeId>one-shot; approval/screen/signal pauses untouched; double fires absorbed byresume()idempotencyAutomationServicePlugin.start()runs the re-arm pass after the flow pull (resume needs flow definitions registered)console.warndebug statements instart()replaced withctx.logger.debug/warnNo
engine.tscore-traversal changes (per ADR-0031 multi-agent discipline).Test plan
InMemorySuspendedRunStore): future-timer re-arm fires on the new engine; overdue timer resumes inline; signal pauses skipped; no-job-service future timer left suspendedpnpm vitest runin service-automation: 10 files / 166 tests green on top of latest main🤖 Generated with Claude Code