Skip to content

test: add behavioral test coverage for cataractae dispatch paths - #517

Merged
MichielDean merged 1 commit into
mainfrom
test/behavioral-coverage
Jul 26, 2026
Merged

test: add behavioral test coverage for cataractae dispatch paths#517
MichielDean merged 1 commit into
mainfrom
test/behavioral-coverage

Conversation

@MichielDean

Copy link
Copy Markdown
Owner

Summary

Adds behavioral tests for recently-shipped features with low Go-level coverage:

  • Recirculation routing with explicit target (recirculate:<step>): verify the observe cycle routes to the agent-named step, overriding the step's on_recirculate route. Covers review→implement, implement→security, and unknown-target pass-through.
  • Fork-mode dispatch integration: verify the full dispatch tick (dispatchRepoDeliveryModeFork check → prepareDropletWorktree) creates the per-droplet worktree from upstream/main, not origin/main. Complements the unit-level prepareDropletWorktree fork tests.
  • Liveness exit-no-outcome detection: verify a dead tmux session with no outcome triggers an exit_no_outcome event, releases the pool slot, and resets the droplet for re-dispatch. Also verifies the guard: a dead session WITH an outcome is not reset (observe owns that).
  • Pool-reason dashboard display: verify fetchDashboardData populates the PoolReasons map for pooled droplets (single, multiple, none) and the GET /api/droplets/{id} endpoint includes pool_reason in the JSON response for pooled droplets, omits it for non-pooled, and omits it when no reason is recorded.
  • Fork-mode delivery outcome routing: verify a fork-delivery step's pass outcome routes to terminal (done) — routing is delivery-mode agnostic.

Why

These paths had only unit-level or smoke-test coverage. The behavioral tests verify the actual dispatch and routing logic end-to-end through the scheduler tick, catching integration regressions that unit tests miss (e.g. the DeliveryModeForkbaseRemote selection in dispatchRepo was untested before this PR).

Test Impact

13 new tests. 2223 → 2236 passing. No production code changes.

Add behavioral tests for recently-shipped features with low Go-level
coverage:

- Recirculation routing with explicit target (recirculate:<step>):
  verify the observe cycle routes to the agent-named step, overriding
  the step's on_recirculate route. Covers review→implement, implement
  →security, and unknown-target pass-through.

- Fork-mode dispatch integration: verify the full dispatch tick
  (dispatchRepo → DeliveryModeFork check → prepareDropletWorktree)
  creates the per-droplet worktree from upstream/main, not origin/main.
  Complements the unit-level prepareDropletWorktree fork tests.

- Liveness exit-no-outcome detection: verify a dead tmux session with
  no outcome triggers an exit_no_outcome event, releases the pool slot,
  and resets the droplet for re-dispatch. Also verifies the guard: a
  dead session WITH an outcome is not reset (observe owns that).

- Pool-reason dashboard display: verify fetchDashboardData populates
  the PoolReasons map for pooled droplets (single, multiple, none) and
  the GET /api/droplets/{id} endpoint includes pool_reason in the JSON
  response for pooled droplets, omits it for non-pooled, and omits it
  when no reason is recorded.

- Fork-mode delivery outcome routing: verify a fork-delivery step's
  pass outcome routes to terminal (done) — routing is delivery-mode
  agnostic.

13 new tests, 2223 → 2236 passing.
@MichielDean
MichielDean merged commit caf5ea0 into main Jul 26, 2026
3 checks passed
@MichielDean
MichielDean deleted the test/behavioral-coverage branch July 26, 2026 00:16
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