test: add behavioral test coverage for cataractae dispatch paths - #517
Merged
Conversation
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.
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 free
to 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
Adds behavioral tests for recently-shipped features with low Go-level coverage:
recirculate:<step>): verify the observe cycle routes to the agent-named step, overriding the step'son_recirculateroute. Covers review→implement, implement→security, and unknown-target pass-through.dispatchRepo→DeliveryModeForkcheck →prepareDropletWorktree) creates the per-droplet worktree fromupstream/main, notorigin/main. Complements the unit-levelprepareDropletWorktreefork tests.exit_no_outcomeevent, 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).fetchDashboardDatapopulates thePoolReasonsmap for pooled droplets (single, multiple, none) and theGET /api/droplets/{id}endpoint includespool_reasonin the JSON response for pooled droplets, omits it for non-pooled, and omits it when no reason is recorded.passoutcome 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
DeliveryModeFork→baseRemoteselection indispatchRepowas untested before this PR).Test Impact
13 new tests. 2223 → 2236 passing. No production code changes.