fix(e2e): poll for platform MCP tool in concierge A2A probe #3102
Reference in New Issue
Block a user
Delete Branch "fix/concierge-e2e-poll-for-mcp-tool"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The A2A probe in
test_staging_concierge_creates_workspace_e2e.shcould sample the concierge's tool list before the npx-launchedmolecule-platformMCP server finished registeringmcp__molecule-platform__create_workspace. On a 2xx reply without the tool, the test previously computed a single verdict and hard-failed (exit 5), even though the server would register seconds later.Changes:
E2E_MCP_READY_SECS(default 180s).skip_loudand exits 5 underE2E_REQUIRE_LIVE=1.mcp__molecule-platform__create_workspace.References: main-red staging concierge E2E, RFC#3045 (npx cold-start vs bundle).
🤖 Generated with Claude Code
REQUEST_CHANGES on
de6f3085.Correctness/robustness: the polling shape is sound: after a 2xx A2A probe whose reply lacks mcp__molecule-platform__create_workspace, the script re-probes until E2E_MCP_READY_SECS is exhausted; 5xx transport retry remains scoped to 502/503/504 inside each poll; the assertion still requires the literal namespaced tool; and if the tool never surfaces it still reaches skip_loud, which exits 5 under E2E_REQUIRE_LIVE=1, so this does not false-green the main-red mechanism.
Blocking issue: CI / Shellcheck (E2E scripts) is a real script defect. The job fails on tests/e2e/test_staging_concierge_creates_workspace_e2e.sh:421 with SC2034 because MCP_READY_DEADLINE is assigned but unused. Since this is a single-file shell-script fix and the lint context is red, please remove the unused variable or use it for the loop bound.
Security/performance/scope/docs: no security concern; bounded polling is acceptable and scoped to this E2E probe; docs/comments match the new E2E_MCP_READY_SECS behavior.
REQUEST_CHANGES on head
de6f3085.5-axis review: the probe logic is directionally correct. It now re-probes after a 2xx response when the literal
mcp__molecule-platform__create_workspaceis absent, bounds the wait withE2E_MCP_READY_SECS, preserves the existing 502/503/504 transport retry inside each probe, and still callsskip_loudafter budget exhaustion soE2E_REQUIRE_LIVE=1remains fail-loud/exit-5 rather than false-green.Blocking issue: the red
CI / Shellcheck (E2E scripts)is a real violation introduced in this diff.MCP_READY_DEADLINE=$(( MCP_READY_START_TS + MCP_READY_SECS ))is assigned but never read; it is only later unset. Shellcheck will flag that as an unused variable. Remove it, or use it for the loop deadline comparison instead of comparing elapsed time againstMCP_READY_SECS.Security/performance/readability: no secret exposure or unbounded loop; polling cadence is bounded. Please fix the shellcheck violation and re-run.
APPROVED on head
37fbc04e.5-axis re-review: prior RC 12837 was solely the Shellcheck SC2034 unused
MCP_READY_DEADLINE; that is fixed. The variable is now used as thewhile [ "$(date +%s)" -lt "$MCP_READY_DEADLINE" ]loop bound, andCI / Shellcheck (E2E scripts)is success on this head.Correctness/robustness: the probe still re-runs on 2xx-but-tool-absent, remains bounded by
E2E_MCP_READY_SECS, preserves the inner 502/503/504 transport retry, and still fails loud throughskip_loudifmcp__molecule-platform__create_workspacenever surfaces. Security/performance/readability: single E2E script scope; bounded polling; literal tool requirement preserved. Remaining red/pending contexts observed are outside the prior shellcheck blocker.APPROVED on
37fbc04e.Prior RC 12836 is resolved: CI / Shellcheck (E2E scripts) is green, and MCP_READY_DEADLINE is now used as the poll-loop bound. The earlier-reviewed polling behavior remains sound: 2xx-but-tool-absent replies are re-probed within E2E_MCP_READY_SECS, 502/503/504 retry is preserved, the assertion still requires literal mcp__molecule-platform__create_workspace, and failure to surface the tool still reaches skip_loud/exit 5 under E2E_REQUIRE_LIVE=1.
5-axis: correctness and robustness are sound for the main-red fix; no security concern; bounded polling is acceptable; scope is limited to the E2E probe; docs/comments match the behavior.