test(server): E2E HTTP coverage for P2-1 — current_task_id auto-sync on transition#231
Merged
test(server): E2E HTTP coverage for P2-1 — current_task_id auto-sync on transition#231
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Problem
Task transitions to
in_progresswith anagent_idmust automatically setagents.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 planed6ceb9b):Without an E2E test, a future refactor of the durability layer or the axum
route could silently break the linkage.
What changed
crates/convergio-server/tests/e2e_task_transition_syncs_agent.rswith four tests:
claim_sets_current_task_id_and_working_status— transition toin_progresssetscurrent_task_idandstatus=workingon the agent.submit_clears_current_task_id_and_marks_idle— transition tosubmittedclearscurrent_task_idand flips agent toidle.unregistered_agent_transition_does_not_error— ghost agents (neverregistered) must not cause 5xx.
second_claim_overwrites_current_task_pointer— claiming a second taskoverwrites the pointer to the first.
Validation
Impact
No production code changed. Tests only. Closes the E2E coverage gap for P2-1.
Tracks: Ta1f47c57-fe1d-4cd2-8bbb-beb177818958