Files
Molecule AI Dev Engineer B (MiniMax) b905b9e371
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge user_tasks (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Workspace Requests (core#2606) (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Creates Workspace (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Platform Agent (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 6s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 8s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 12s
Harness Replays / detect-changes (pull_request) Successful in 8s
sop-checklist / review-refire (pull_request_target) Has been cancelled
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Failing after 12s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 11s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge (compile+skip) (pull_request) Successful in 12s
CI / Detect changes (pull_request) Successful in 20s
Harness Replays / Harness Replays (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 18s
qa-review / approved (pull_request_target) Failing after 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
reserved-path-review / reserved-path-review (pull_request_target) Failing after 8s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 5s
security-review / approved (pull_request_target) Failing after 8s
sop-checklist / na-declarations (pull_request) N/A: (none)
gate-check-v3 / gate-check (pull_request_target) Failing after 14s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 21s
sop-checklist / all-items-acked (pull_request_target) Successful in 9s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 18s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
CI / Canvas Deploy Status (pull_request) Successful in 1s
E2E API Smoke Test / detect-changes (pull_request) Successful in 28s
E2E Chat / detect-changes (pull_request) Successful in 34s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 33s
E2E Chat / E2E Chat (pull_request) Successful in 4s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 40s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 33s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m15s
CI / Platform (Go) (pull_request) Successful in 2m49s
CI / all-required (pull_request) Successful in 4s
E2E Staging SaaS (full lifecycle) / E2E Staging Platform Boot (pull_request) Failing after 5m42s
sop-checklist / all-items-acked (pull_request) Compensated by status-reaper (non-required pull_request/pull_request_review governance shadow overridden by successful pull_request_target status; see .gitea/scripts/status-reaper.py)
fix(workspace-server#2751): add runtime kill-switch A2A_CANVAS_SYNC_DISABLE (CR2 #11552)
CR2 #11552 finding: there was no runtime way to disable the
default-ON cap-and-queue async-dispatch path. A2A_CANVAS_SYNC_BUDGET=0
and negative/invalid values all fall through to the 90s default
(envx.Duration's d>0 check treats them as 'unset'), so the only
way to disable the cap was a source patch + deploy — unacceptable
for a change rolling default-ON to all tenants.

Fix:
1. Added envx.Bool(name, def) helper to internal/envx/envx.go —
   uses strconv.ParseBool (truthy: 1, t, true, TRUE, T; falsy: 0, f,
   false, FALSE, F, empty). Mirrors the other envx helpers' pattern.
2. Added canvasA2ASyncDisabled() in a2a_proxy.go: returns true when
   A2A_CANVAS_SYNC_DISABLE is set to a truthy value (per envx.Bool
   semantics).
3. Updated the ProxyA2A handler to gate the cap-and-queue path on
   BOTH !canvasA2ASyncDisabled() AND canvasA2ASyncBudget() > 0.
   Kill-switch takes precedence — when set, the entire cap-and-queue
   goroutine is skipped and the legacy synchronous path runs,
   regardless of the budget value.
4. Added TestCanvasA2ASyncDisabled: 6 cases verifying the
   envx.Bool semantics (unset, 1, true, 0, false, invalid all map
   to the right value).
5. Added TestProxyA2A_CanvasCapAndQueue_RuntimeKillSwitchDisabled:
   integration test that sets a sub-budget (50ms) + kill-switch=1
   + slow agent (500ms hold), then asserts:
   - The HTTP response is the ACTUAL AGENT REPLY (NOT `{status:"queued"}`)
   - The handler waited the full ~500ms agent hold (NOT ~50ms
     budget) — proves the kill-switch bypasses the cap-and-queue
     goroutine entirely
   - The reply contains the expected body field

Documentation:
- Updated the source comment on the if-line to explicitly document
  the kill-switch precedence
- Added a docstring to canvasA2ASyncDisabled explaining the
  per-envx.Bool semantics
- Test docstring explains the CTO-priority ops use case

Verification:
  - go test -run TestCanvasA2ASyncDisabled ./internal/handlers/ → 1/1 PASS
  - go test -run TestProxyA2A_CanvasCapAndQueue_RuntimeKillSwitchDisabled
    ./internal/handlers/ → 1/1 PASS (0.51s)
  - go test -run 'TestProxyA2A|TestCanvasA2A' ./internal/handlers/
    → all PASS (5.96s)

Ops escape hatch (no deploy required):
```
export A2A_CANVAS_SYNC_DISABLE=1   # revert to legacy sync immediately
```

Diff: 3 files, +139/-21.

Refs core#2751.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-14 01:26:35 +00:00
..