Skip to content

Watchdog#371

Merged
rmcdaniel merged 19 commits intomasterfrom
codex/watchdog-recovery-hardening
Apr 3, 2026
Merged

Watchdog#371
rmcdaniel merged 19 commits intomasterfrom
codex/watchdog-recovery-hardening

Conversation

@rmcdaniel
Copy link
Copy Markdown
Member

@rmcdaniel rmcdaniel commented Apr 2, 2026

The Watchdog acts as a lightweight recovery loop for the workflow engine. If a workflow is left in pending long enough that it looks stranded, the Watchdog notices it from the worker loop and safely kicks it back onto the normal resume path instead of leaving it stuck indefinitely.

Copilot AI and others added 4 commits April 1, 2026 22:45
- Add Watchdog job that scans for stale pending workflows and recovers them
- Fix Workflow re-release loop: redelivered jobs now proceed when status is Running
- WorkflowStub::start() kicks watchdog as fast path
- WorkflowServiceProvider registers Queue Looping listener for worker liveness
- Add watchdog_timeout config option (default 300s)

Agent-Logs-Url: https://github.com/durable-workflow/workflow/sessions/4624e0c2-61c6-402b-bc64-bbfbf59a9d7c

Co-authored-by: rmcdaniel <1130888+rmcdaniel@users.noreply.github.com>
…eorder kick

- Watchdog now refreshes workflow from DB before recovery (prevents duplicates)
- Watchdog touches updated_at before re-dispatch (prevents re-scan)
- Uses Cache::lock()->forceRelease() matching Laravel's UniqueLock pattern
- Uses Carbon::now() instead of now() to avoid Workflow\now() namespace collision
- Kick watchdog before workflow dispatch in start() (covers producer crash)
- Add redelivery test, Looping listener tests, comprehensive watchdog tests

Agent-Logs-Url: https://github.com/durable-workflow/workflow/sessions/3276cfde-9a62-4b33-abd7-2d821e4c8203

Co-authored-by: rmcdaniel <1130888+rmcdaniel@users.noreply.github.com>

This comment was marked as resolved.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0f4b774) to head (d935162).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #371   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       578       597   +19     
===========================================
  Files             62        63    +1     
  Lines           2005      2077   +72     
===========================================
+ Hits            2005      2077   +72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This comment was marked as outdated.

@rmcdaniel rmcdaniel changed the title Harden watchdog recovery bootstrap Watchdog Apr 2, 2026

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@rmcdaniel rmcdaniel merged commit 85ee8ed into master Apr 3, 2026
7 checks passed
@rmcdaniel rmcdaniel deleted the codex/watchdog-recovery-hardening branch April 3, 2026 16:32
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.

4 participants