Skip to content

Fix monitor unhandled rejection and add agent-lifecycle-runtime tests#747

Merged
selfcontained merged 1 commit into
mainfrom
agt_1ed6b45c8edf/job-test-enforcer-0f8db463
Jul 10, 2026
Merged

Fix monitor unhandled rejection and add agent-lifecycle-runtime tests#747
selfcontained merged 1 commit into
mainfrom
agt_1ed6b45c8edf/job-test-enforcer-0f8db463

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Remove re-throw in job monitor catch handler when a run disappears from the DB — the warning is already logged and the re-throw created an unhandled rejection since nobody awaits the monitor at that point. This was causing Vitest to report an error on the jobs-webhook-route.test.ts suite and was also observed in CI.
  • Add 28 unit tests for createAgentLifecycleRuntime covering archive dedup guard, reconcile loop idempotency, archive resume from reconciliation, activity monitor integration, and waitForActiveArchives timeout behavior.

Test plan

  • pnpm run check — type checking passes
  • pnpm run test — 2264 tests pass, 0 errors (up from 2236)
  • pnpm run test:e2e — 178 passed, 12 skipped (tmux-dependent, expected)
  • Verified the jobs-webhook-route.test.ts no longer produces unhandled rejections
  • Verified the same unhandled rejection was appearing in recent CI runs

🤖 Generated with Claude Code

Remove re-throw in job monitor catch handler when a run disappears
from the DB — the warning is already logged and the re-throw creates
an unhandled rejection since nobody awaits the monitor at that point.

Add 28 unit tests for createAgentLifecycleRuntime covering archive
dedup guard, reconcile loop idempotency, archive resume, activity
monitor integration, and waitForActiveArchives timeout.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@selfcontained
selfcontained merged commit 113a905 into main Jul 10, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_1ed6b45c8edf/job-test-enforcer-0f8db463 branch July 10, 2026 02:24
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