Skip to content

ci(publish-runtime): smoke well-known mount alignment + message helper - #2195

Merged
hongmingwang-moleculeai merged 1 commit into
stagingfrom
fix/wheel-smoke-call-shape-coverage
Apr 28, 2026
Merged

ci(publish-runtime): smoke well-known mount alignment + message helper#2195
hongmingwang-moleculeai merged 1 commit into
stagingfrom
fix/wheel-smoke-call-shape-coverage

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Closes the structural-fix half of the #2193 finding. The wheel-smoke catches AgentCard kwarg-shape regressions but didn't catch SDK contract drift like the well-known path rename. main.py probed /.well-known/agent.json (pre-1.x literal) for ~weeks; the SDK 1.x mount is /.well-known/agent-card.json (the value of AGENT_CARD_WELL_KNOWN_PATH). Probe 404'd every attempt, silently dropping every workspace's initial_prompt.

What's added

Two new assertions in the existing smoke block:

1. Mount alignment. Build an AgentCard, call create_agent_card_routes(), assert AGENT_CARD_WELL_KNOWN_PATH is among the mounted paths. The source-tree pytest (workspace/tests/test_agent_card_well_known_path.py, added in #2193) catches main.py-side regressions; this catches SDK-side regressions BEFORE PyPI upload.

2. Message helper smoke. Import a2a.helpers.new_text_message + instantiate one. Per the v0→v1 cheat sheet, new_agent_text_message → new_text_message was a real migration find. main.py and a2a_executor.py call it in hot paths — an import break errors every reply.

Verification

Both checks run successfully against the actual SDK in the runtime container:

✓ well-known mount alignment OK (/.well-known/agent-card.json)
✓ message helper import + call OK

Test plan

  • CI green on this PR (the smoke runs against the real wheel build of the smoke-test-only 0.0.0-smoke version inside the publish workflow's own validation step)
  • On the next staging push that touches workspace/**, observe the publish-runtime.yml log shows both new ✓ lines

🤖 Generated with Claude Code

The existing wheel-smoke catches AgentCard kwarg-shape regressions
(state_transition_history, supported_protocols) but doesn't catch the
SDK-contract drift class that #2193 just fixed in production: the
a2a-sdk 1.x rename of /.well-known/agent.json →
/.well-known/agent-card.json, plus AGENT_CARD_WELL_KNOWN_PATH moving
to a2a.utils.constants. main.py's readiness probe hardcoded the old
literal and 404'd every attempt, silently dropping every workspace's
initial_prompt for ~weeks before a user reported it.

Two additions to the smoke block:

  1. Mount alignment: build an AgentCard, call create_agent_card_routes(),
     and assert AGENT_CARD_WELL_KNOWN_PATH is among the mounted paths.
     Catches a future SDK release that decouples the constant value
     from the route factory's mount path. The source-tree test
     (workspace/tests/test_agent_card_well_known_path.py) catches the
     main.py side; this catches the SDK side BEFORE PyPI upload.

  2. Message helper smoke: import a2a.helpers.new_text_message and
     instantiate one. The v0→v1 cheat sheet (memory:
     reference_a2a_sdk_v0_to_v1_migration.md) flagged this as a real
     migration find — main.py and a2a_executor.py call it in hot
     paths, so an import break errors every reply before the message
     even leaves the workspace.

Verified by running the equivalent Python inside
ghcr.io/molecule-ai/workspace-template-langgraph:latest:
  ✓ well-known mount alignment OK (/.well-known/agent-card.json)
  ✓ message helper import + call OK

Closes the structural-fix half of the #2193 finding from the code-
review-and-quality pass: "the wheel publish smoke didn't catch this.
This is the 7th a2a-sdk migration find of this kind. Task #131 is the
right root-cause fix."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged via the queue into staging with commit 2e45c94 Apr 28, 2026
15 checks passed
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
…nd-trip synchronously — E2E Chat reload flake is a real data-loss race' (#2195) from fix/e2e-chat-mobile-history-reload-flake into main
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
)

The canvas-readiness loop added in PR #2195 captured the curl status
into CODE with `CODE=$(curl -s -o /dev/null -w '%{http_code}' ...
|| echo 000)`. That shape is exactly the BAD_STATUS_CAPTURE pattern
that .gitea/scripts/lint-curl-status-capture.py rejects — curl -w can
write a status to stdout before the || echo 000 fallback fires,
producing polluted values such as a concatenated status string rather
than one code.

Adopt the lint-approved tempfile pattern already used by
e2e-staging-external.yml (set +e / curl -w '...' > file / set -e /
cat file || echo '000') so the captured value is always a clean HTTP
code or '000'.

Closes #2198 (main-red after #2195).
Closes #2199 (auto-filed main-red watchdog, root cause identical to #2198).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant