fix(e2e): assert echo runtime received A2A request in chat-desktop specs (core#2796 follow-up) #2837
Reference in New Issue
Block a user
Delete Branch "fix/2796-e2e-server-received-assertion"
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?
Follow-up to #2830 / #2796.
#2830 removed the obsolete chat-desktop activity-log assertion and its echo-runtime delay. The E2E Chat workflow still listed "echo round-trip never asserts the server received the request" as a promotion blocker. This PR wires
EchoRuntime.lastRequestinto the desktop chat round-trip tests so an optimistic client-side render cannot green the lane without a real A2A request reaching the fixture.Changes:
echoRuntimetochat-desktop.spec.tstests instead of hiding it in the cleanup closure.lastRequestis populated and matches the sent text for text, history, and file-attachment round-trips.STILL BLOCKS PROMOTIONtoNOW FAIL-CLOSEDin.gitea/workflows/e2e-chat.yml.Local verification:
npx eslint canvas/e2e/chat-desktop.spec.ts canvas/e2e/fixtures/echo-runtime.tsclean (pre-existing warnings only).npx playwright test canvas/e2e/chat-desktop.spec.ts --listreports 7 tests..gitea/workflows/e2e-chat.ymlYAML validated.Co-Authored-By: Claude noreply@anthropic.com
Reviewed as requested on head
37eb4bff.The added
echoRuntime.lastRequestassertions are load-bearing: they read the fixture server's recorded JSON-RPC request after the UI echo appears, and the asserted texts are unique for the text, history, and file-attachment paths, so a stale prior request would not silently satisfy the checks. File attachment also asserts a received file part. Playwright is configuredfullyParallel: falseandworkers: 1, so the shared fixture state is not racing across tests.The
EchoRuntimeexposure is scoped to the test fixture and cleanup still stops it. The workflow comment update accurately moves the server-received blocker into the fail-closed list.Verification: workflow_dispatch E2E Chat run 364366 completed success on matching head
37eb4bffd3c5933bfb51ca5280b087ca496f70e1; job 497685 ran the real E2E Chat path, including the Playwright step, not a no-op.APPROVED.
APPROVED on head
37eb4bffd3.The change is scoped to the E2E Chat test hardening and the workflow comment. The new assertions are non-tautological: after the UI echo renders, the tests assert echoRuntime.lastRequest saw the expected message text, and the attachment case also verifies the server received a file part. Because each assertion checks the current test's unique text, stale lastRequest state from a prior test would fail rather than falsely pass.
Exposing EchoRuntime from the fixture is a clean test-only seam; cleanup still stops heartbeat and the echo server. The e2e-chat.yml comment update correctly moves this item from a promotion blocker to a fail-closed guard without changing workflow behavior.
CI/code verification: PR head matches
37eb4bffd3. The normal PR E2E Chat required context is a short no-op, but the cited workflow_dispatch run 364366 is real and head-matched: detect-changes succeeded and the E2E Chat job ran ~92s and completed success. Canvas Next.js also ran ~3m55s and CI/all-required is green on the head. Combined status is red only from review/ceremony contexts.