Skip to content

test(e2e): drive submitqueue request Land→landed with runway in the stack#297

Open
behinddwalls wants to merge 1 commit into
mainfrom
e2e-tests
Open

test(e2e): drive submitqueue request Land→landed with runway in the stack#297
behinddwalls wants to merge 1 commit into
mainfrom
e2e-tests

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The e2e suite barely validated anything: pings, a Land that only checked a non-empty sqid, one test that stopped at status started, and a thin cancel smoke test with a standing TODO. It also could not exercise the full pipeline, because service/submitqueue/docker-compose.yml did not include runway — the orchestrator blocks on runway's merge-conflict-check and merge signals, so every request stalled at started.

What?

Add runway-service to service/submitqueue/docker-compose.yml, sharing the existing mysql-queue (no app DB). Runway already publishes SUCCEEDED signals via its Merger extension (the noop merger wired in service/runway/server), so with it in the stack a request now flows all the way to landed.

Add a reusable e2e harness (test/e2e/submitqueue/harness_test.go): land, awaitStatus, awaitTerminal, timeline + assertStatusesInOrder (white-box ordered request_log status history, tolerant subsequence), terminalState (white-box internal RequestState from the operating store), and lastError — so new per-stage and error-path tests drop in as a few lines.

Rewrite the suite: TestLand_HappyPath_ReachesLanded drives a request to terminal success and asserts three views — the black-box landed Status, the ordered status history accepted → started → batched → scored → landed, and the operating store's internal RequestStateLanded (this also covers the request-log ownership invariant: every status but the synchronous accepted reaches storage only via the orchestrator-publishes / gateway-persists log path). The pings and graceful-shutdown checks are kept. The cancel test asserts the deterministic half (Cancel returns OK and the gateway synchronously records the cancelling intent). Asserting terminal cancelled is racy — a cancel processed before the orchestrator's start controller creates the request is rejected to the DLQ and reconciled to error — and needs a pipeline-pause lever, deferred to the next per-stage increment.

Test Plan

make e2e-test — full Docker stack (gateway + orchestrator + runway + 2 MySQL) passes; a request reaches landed end to end.
make fmt; make check-gazelle / make check-tidy verified clean (only intended edits).

@behinddwalls behinddwalls changed the title test(e2e): drive submitqueue request Land→landed via hermetic runway test(e2e): drive submitqueue request Land→landed with runway in the stack Jul 6, 2026
@behinddwalls behinddwalls marked this pull request as ready for review July 6, 2026 20:32
@behinddwalls behinddwalls requested review from a team and sbalabanov as code owners July 6, 2026 20:32
…tack

## Summary

### Why?

The e2e suite barely validated anything: pings, a Land that only checked a non-empty sqid, one test that stopped at status `started`, and a thin cancel smoke test with a standing TODO. It also could not exercise the full pipeline, because `service/submitqueue/docker-compose.yml` did not include runway — the orchestrator blocks on runway's merge-conflict-check and merge signals, so every request stalled at `started`.

### What?

Add `runway-service` to `service/submitqueue/docker-compose.yml`, sharing the existing `mysql-queue` (no app DB). Runway already publishes SUCCEEDED signals via its Merger extension (the noop merger wired in `service/runway/server`), so with it in the stack a request now flows all the way to `landed`.

Add a reusable e2e harness (`test/e2e/submitqueue/harness_test.go`): `land`, `awaitStatus`, `awaitTerminal`, `timeline` + `assertStatusesInOrder` (white-box ordered `request_log` status history, tolerant subsequence), `terminalState` (white-box internal `RequestState` from the operating store), and `lastError` — so new per-stage and error-path tests drop in as a few lines.

Rewrite the suite: `TestLand_HappyPath_ReachesLanded` drives a request to terminal success and asserts three views — the black-box `landed` Status, the ordered status history `accepted → started → batched → scored → landed`, and the operating store's internal `RequestStateLanded` (this also covers the request-log ownership invariant: every status but the synchronous `accepted` reaches storage only via the orchestrator-publishes / gateway-persists log path). The pings and graceful-shutdown checks are kept. The cancel test asserts the deterministic half (Cancel returns OK and the gateway synchronously records the `cancelling` intent). Asserting terminal `cancelled` is racy — a cancel processed before the orchestrator's start controller creates the request is rejected to the DLQ and reconciled to `error` — and needs a pipeline-pause lever, deferred to the next per-stage increment.

## Test Plan

✅ `make e2e-test` — full Docker stack (gateway + orchestrator + runway + 2 MySQL) passes; a request reaches `landed` end to end.
✅ `make fmt`; `make check-gazelle` / `make check-tidy` verified clean (only intended edits).
@behinddwalls behinddwalls marked this pull request as draft July 6, 2026 20:37
@behinddwalls behinddwalls marked this pull request as ready for review July 6, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant