fix(a2a_response): push-queue delivery_mode and comprehensive tests #341

Closed
fullstack-engineer wants to merge 10 commits from fix/qa-307-async-pollution-direct into main

10 Commits

Author SHA1 Message Date
a81d0951e3 fix(canvas tests): add cleanup hooks and fix jsdom accessibility queries
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
sop-tier-check / tier-check (pull_request) Successful in 23s
audit-force-merge / audit (pull_request) Has been skipped
- Add afterEach(cleanup) to 8 test files that were missing it:
  ApprovalBanner, TopBar, BundleDropZone, RevealToggle, StatusBadge,
  ValidationHint, Legend, StatusDot.
- Fix StatusDot: replace screen.getByRole for aria-hidden elements
  (jsdom excludes aria-hidden from accessibility tree) with
  container.querySelector('[role="img"]').
- Fix KeyValueField: replace screen.getByRole("textbox") with
  getByLabelText — jsdom does not expose type="password" as accessible
  textbox role.
- Fix BundleDropZone: add getFileInput() helper; replace getByLabelText
  (which matched both file input AND button sharing the same aria-label)
  with container.querySelector for the file input.
- Fix Tooltip render block: add beforeEach(useFakeTimers) so tests using
  vi.advanceTimersByTime run correctly.

These fixes address DOM pollution between tests (missing cleanup hooks)
and jsdom accessibility tree limitations for aria-hidden and non-textbox
role elements — pre-existing issues discovered while verifying the
full canvas test suite after the workspace test suite passed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 20:18:43 +00:00
4d318f84a0 fix(a2a_response): push-queue delivery_mode and comprehensive tests
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 1s
sop-tier-check / tier-check (pull_request) Failing after 1s
- a2a_response.parse: set delivery_mode="push" for queued=True envelope
  (was missing — returned Queued() with default "poll", violating the
  push vs poll SSOT contract in a2a_response.py docstring).
- Add test fixtures for push-mode queue envelopes (full, notify, no
  method, no queue_id) and a dedicated TestPushQueuedVariant test class.
- Fix assertion in push queue test: delivery_mode=="poll" → "push".
- Correlated with PRs #333 (async test pollution) and #335 (delivery_mode).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 19:56:51 +00:00
298b0c87ed fix(workspace): replace _run() with @pytest.mark.asyncio in inbox wrappers
Fixes #307: asyncio_mode=auto causes event-loop corruption when _run()
bypasses pytest-asyncio's lifecycle management. When conftest fixtures
initialize the loop first, a second _run() call creates a nested loop
that corrupts state — tests pass in isolation (14/14) but fail in the
full suite (0/14).

Fix: convert all 14 tests to @pytest.mark.asyncio async def + await
directly. pytest-asyncio manages the loop lifecycle; no more _run().

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 19:43:04 +00:00
a3c9f0b717 Merge pull request 'ci: pin GitHub Actions by SHA instead of mutable tags (staging sync)' (#276) from ci/staging-sha-pinning into staging
Some checks failed
Secret scan / Scan diff for credential-shaped strings (push) Failing after 2s
2026-05-10 14:03:05 +00:00
de9f46ea30 Merge pull request '[release-blocker] fix(ci): retry git clone in clone-manifest.sh (publish-workspace-server-image OOM flake)' (#298) from fix/publish-workspace-server-ci-clone-manifest-retry into staging
Some checks are pending
Secret scan / Scan diff for credential-shaped strings (push) Waiting to run
2026-05-10 12:44:35 +00:00
7ff5622a42 [infra-lead-agent] fix(ci): retry git clone in clone-manifest.sh (publish-workspace-server-image flake)
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 1s
sop-tier-check / tier-check (pull_request) Failing after 1s
audit-force-merge / audit (pull_request) Failing after 2s
The publish-workspace-server-image / build-and-push job clones the full
manifest (~36 repos) serially in the "Pre-clone manifest deps" step on a
memory-constrained Gitea Actions runner. Under host memory pressure the
OOM killer SIGKILLs git-remote-https mid-clone:

  cloning .../molecule-ai-plugin-molecule-skill-code-review.git ...
  error: git-remote-https died of signal 9
  fatal: the remote end hung up unexpectedly
    Failure - Main Pre-clone manifest deps
  exitcode '128': failure

Observed in run 4622 (2026-05-10, staging HEAD b5d2ab88) — died on the
14th of 36 clones, which red-lights CI and wedges staging→main.

Wrap each `git clone` in clone-manifest.sh with bounded retry + backoff
(3 attempts, 3s/6s), wiping any partial checkout between tries. A single
transient SIGKILL / network blip no longer fails the whole tenant image
rebuild. Benefits every caller of the script (publish-workspace-server-image,
harness-replays, Dockerfile builds, local quickstart).

This is a mitigation; the durable fix is more runner RAM/swap on the
operator host — tracked separately with Infra-SRE.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:58:09 +00:00
bea89ce4e9 fix(a2a): handle string-form errors in delegate_task
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 14s
sop-tier-check / tier-check (pull_request) Failing after 7s
audit-force-merge / audit (pull_request) Failing after 5s
The A2A proxy can return three error shapes:
  {"error": "plain string"}
  {"error": {"message": "...", "code": ...}}
  {"error": {"message": {"nested": "object"}}}   ← value at .message is a string

builtin_tools/a2a_tools.py:72 called data["error"].get("message")
without guarding against error being a string, which raised:
  AttributeError: 'str' object has no attribute 'get'

This broke every delegation attempt through the legacy a2a_tools path
(the LangChain-wrapped version used by adapter templates). The
SSOT parser a2a_response.py already handled string errors; the
legacy inline sniffer in a2a_tools.py did not.

Fix: branch on isinstance(err, dict/str/other) before calling .get().

Also update both publish-workflow files to remove the dead
`staging` branch trigger — trunk-based migration (PR #109,
2026-05-08) removed the staging branch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:39:32 +00:00
14f05b5a64 chore: restore manifest.json after trigger test 2026-05-10 11:38:34 +00:00
7caee806df chore: trigger publish workflow [Integration Tester 2026-05-10T08:45Z] 2026-05-10 11:38:34 +00:00
a914f675a4 chore: staging trigger commit from Integration Tester 2026-05-10 11:38:34 +00:00