Skip to content

test(server): E2E HTTP coverage for P2-1 — current_task_id auto-sync on transition#231

Merged
Roberdan merged 3 commits intomainfrom
feat/p2-1-current-task-id
May 5, 2026
Merged

test(server): E2E HTTP coverage for P2-1 — current_task_id auto-sync on transition#231
Roberdan merged 3 commits intomainfrom
feat/p2-1-current-task-id

Conversation

@Roberdan
Copy link
Copy Markdown
Owner

@Roberdan Roberdan commented May 5, 2026

Problem

Task transitions to in_progress with an agent_id must automatically set
agents.current_task_id. The durability-level implementation
(sync_agent_current_task) and unit tests (agent_current_task_sync.rs)
landed in PR #224, but there was no HTTP-level integration test confirming
the observable end-to-end behaviour.

Why

Acceptance criteria for task a1f47c57 (P2-1, retro plan ed6ceb9b):

cvg task transition claimed/in_progress sets agent.current_task_id
automatically.

Without an E2E test, a future refactor of the durability layer or the axum
route could silently break the linkage.

What changed

  • Added crates/convergio-server/tests/e2e_task_transition_syncs_agent.rs
    with four tests:
    1. claim_sets_current_task_id_and_working_status — transition to
      in_progress sets current_task_id and status=working on the agent.
    2. submit_clears_current_task_id_and_marks_idle — transition to
      submitted clears current_task_id and flips agent to idle.
    3. unregistered_agent_transition_does_not_error — ghost agents (never
      registered) must not cause 5xx.
    4. second_claim_overwrites_current_task_pointer — claiming a second task
      overwrites the pointer to the first.

Validation

RUSTFLAGS="-Dwarnings" cargo test -p convergio-server --test e2e_task_transition_syncs_agent
# running 4 tests … ok. 4 passed

Impact

No production code changed. Tests only. Closes the E2E coverage gap for P2-1.

Tracks: Ta1f47c57-fe1d-4cd2-8bbb-beb177818958

POST /v1/tasks/:id/transition to in_progress must set agent.current_task_id
in the same tx. The durability-level logic and unit tests landed in PR #224;
this adds the missing HTTP-level integration layer: four tests that drive the
full register -> claim -> submit round-trip via the axum router.

Tracks: Ta1f47c57-fe1d-4cd2-8bbb-beb177818958

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Roberdan Roberdan enabled auto-merge May 5, 2026 10:05
@Roberdan Roberdan merged commit ece25d0 into main May 5, 2026
3 checks passed
@Roberdan Roberdan deleted the feat/p2-1-current-task-id branch May 5, 2026 10:09
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