Skip to content

HYDI-34: Phase 3: Tests for monitor state machine and merged-PR transition#31

Draft
kasperwelner wants to merge 2 commits intomainfrom
agent/HYDI-34
Draft

HYDI-34: Phase 3: Tests for monitor state machine and merged-PR transition#31
kasperwelner wants to merge 2 commits intomainfrom
agent/HYDI-34

Conversation

@kasperwelner
Copy link
Copy Markdown
Contributor

@kasperwelner kasperwelner commented May 11, 2026

Implements HYDI-34

Changes

  • Expanded src/orchestration/monitor.test.ts with focused branch coverage for checkRuns and merged-PR sweep behavior, including:
    • no-running-runs path, missing run_id, SUCCEEDED/FAILED/ERROR/CANCELLED/INPROGRESS/BLOCKED flows
    • In Review transition best-effort behavior and fallback error handling
    • merged-PR sweep paths for missing PR URL, done-status skip, parse failures, merge/no-merge transitions, missing Done transition, and GitHub errors
    • outer-loop resilience when Oz retrieve fails
  • Added vi.resetModules() in beforeEach to guarantee clean singleton state per test (_ozClient, _githubClient).
  • Re-indented the inner checkRuns try / else if chain in src/orchestration/monitor.ts for visual brace alignment with no behavior change (git diff -w -- src/orchestration/monitor.ts is clean).

Validation

  • npm test
  • npm run test:coverage (monitor.ts coverage: 87.45% statements, 84.81% branches)
  • npm run typecheck

Co-Authored-By: Oz oz-agent@warp.dev

Conversation: https://app.warp.dev/conversation/ac6fdc5e-7129-4208-a386-7cbaa7efa918
Run: https://oz.warp.dev/runs/019e174d-da24-79e2-97d5-1ed448eb81d9

This PR was generated with Oz.

Co-Authored-By: Oz <oz-agent@warp.dev>
@hyperbolic-coolify
Copy link
Copy Markdown

hyperbolic-coolify Bot commented May 11, 2026

The preview deployment for hyper-dispatch is ready. 🟢

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-05-11 14:00:13 CET

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