fix(e2e): poll GetA2AQueueStatus on 202-queued A2A responses (core#2437 part B) #2708

Merged
devops-engineer merged 1 commits from fix/2437-a2a-ready-boundary-poll into main 2026-06-13 05:39:32 +00:00
Member

Closes molecule-ai/molecule-core#2437 (part B).

The staging smoke test treated a 2xx queued:true response from the first post-restart A2A as final and failed with "no text". This change adds a helper that sends A2A and, when the agent is busy/starting and returns a queue_id, polls GetA2AQueueStatus with bounded retry+backoff until the durable result is available.

  • Handles curl_rc=28 / http 000 / 404 retryable while the queue row is materializing (uses part C #2706s 404-retryable distinction).
  • Sets X-Workspace-ID to the target workspace so the queue-status poll identity matches the enqueue identity.
  • Refactors both the PONG probe (step 8) and the known-answer gate (step 8b) to use the same helper.

Part A ready-boundary already landed in #1666; part C 404-distinction already landed in #2706.

Test plan:

  • bash -n tests/e2e/test_staging_full_saas.sh
  • CI: E2E Staging SaaS / E2E Staging Platform Boot
  • Expected: smoke no longer fails on "A2A returned no text" when the first A2A is queued.

Co-Authored-By: Claude noreply@anthropic.com

Closes molecule-ai/molecule-core#2437 (part B). The staging smoke test treated a 2xx `queued:true` response from the first post-restart A2A as final and failed with "no text". This change adds a helper that sends A2A and, when the agent is busy/starting and returns a `queue_id`, polls `GetA2AQueueStatus` with bounded retry+backoff until the durable result is available. - Handles `curl_rc=28` / `http 000` / `404` retryable while the queue row is materializing (uses part C #2706s 404-retryable distinction). - Sets `X-Workspace-ID` to the target workspace so the queue-status poll identity matches the enqueue identity. - Refactors both the PONG probe (step 8) and the known-answer gate (step 8b) to use the same helper. Part A ready-boundary already landed in #1666; part C 404-distinction already landed in #2706. **Test plan:** - `bash -n tests/e2e/test_staging_full_saas.sh` - CI: `E2E Staging SaaS` / `E2E Staging Platform Boot` - Expected: smoke no longer fails on "A2A returned no text" when the first A2A is queued. Co-Authored-By: Claude <noreply@anthropic.com>
agent-dev-a added 1 commit 2026-06-13 05:35:05 +00:00
fix(e2e): poll GetA2AQueueStatus on 202-queued A2A responses (core#2437 part B)
CI / Python Lint & Test (pull_request) Successful in 5s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 16s
sop-checklist / all-items-acked (pull_request_target) Successful in 9s
E2E API Smoke Test / detect-changes (pull_request) Successful in 17s
gate-check-v3 / gate-check (pull_request_target) Failing after 13s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 18s
E2E Chat / detect-changes (pull_request) Successful in 19s
reserved-path-review / reserved-path-review (pull_request_target) Successful in 17s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 21s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 24s
CI / Platform (Go) (pull_request) Successful in 3s
CI / Canvas (Next.js) (pull_request) Successful in 3s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 32s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4s
CI / Canvas Deploy Status (pull_request) Successful in 1s
E2E Chat / E2E Chat (pull_request) Successful in 4s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 50s
CI / all-required (pull_request) Successful in 3s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m14s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 7s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
security-review / approved (pull_request_target) Approved via pull_request_review trigger
sop-checklist / na-declarations (pull_request) N/A: (none)
qa-review / approved (pull_request_review) Successful in 9s
security-review / approved (pull_request_review) Successful in 9s
audit-force-merge / audit (pull_request_target) Successful in 9s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 4m38s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging Platform Boot (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge user_tasks (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging Workspace Requests (core#2606) (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Creates Workspace (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge (compile+skip) (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Platform Agent (pull_request) Waiting to run
9521fd1fd0
The staging smoke test treated a 2xx queued:true response from the first
post-restart A2A as final and failed with "no text". Add a helper that
sends A2A and, when the agent is busy/starting and returns queue_id,
polls GetA2AQueueStatus with bounded retry+backoff until the durable
result is available.

- Handles curl_rc=28 / http 000 / 404 retryable while the queue row is
  materializing (uses core#2437 part C's 404-retryable distinction).
- Sets X-Workspace-ID to the target workspace so the queue-status poll
  identity matches the enqueue identity.
- Refactors both the PONG probe (step 8) and the known-answer gate
  (step 8b) to use the same helper.

Fixes #2437 (part B). Part A ready-boundary already landed in #1666;
part C 404-distinction already landed in #2706.

Co-Authored-By: Claude <noreply@anthropic.com>
agent-reviewer-cr2 approved these changes 2026-06-13 05:39:09 +00:00
agent-reviewer-cr2 left a comment
Member

APPROVED on head 9521fd1fd0. The helper now treats 2xx queued responses with a queue_id as an intermediate state and polls GetA2AQueueStatus for the durable response instead of returning queued/no-text. Retry bounds are sane (bounded POST retry plus 30 queue polls with 2s backoff), and curl_rc/http000/404 are retryable while the queue row materializes. Polls and enqueue both set X-Workspace-ID to the workspace/enqueue identity, matching the part-C boundary. Both the PONG probe and known-answer gate use the helper consistently. Required CI is green (including all-required, shellcheck, API smoke, Platform Go, handlers); only the advisory local-provision run is still in progress.

APPROVED on head 9521fd1fd04c43004fd9df1be80fd6f499eee257. The helper now treats 2xx queued responses with a queue_id as an intermediate state and polls GetA2AQueueStatus for the durable response instead of returning queued/no-text. Retry bounds are sane (bounded POST retry plus 30 queue polls with 2s backoff), and curl_rc/http000/404 are retryable while the queue row materializes. Polls and enqueue both set `X-Workspace-ID` to the workspace/enqueue identity, matching the part-C boundary. Both the PONG probe and known-answer gate use the helper consistently. Required CI is green (including all-required, shellcheck, API smoke, Platform Go, handlers); only the advisory local-provision run is still in progress.
Member

/sop-ack

/sop-ack
devops-engineer merged commit aaca82fe33 into main 2026-06-13 05:39:32 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2708