fix(e2e): wire chat-separation spec into E2E Chat lane with deterministic seed (#2764) #2780
Reference in New Issue
Block a user
Delete Branch "fix/2764-chat-separation-e2e"
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?
Fixes #2764.
Problem
canvas/e2e/chat-separation.spec.tswas not included in the E2E Chat workflow, and its tests usedtest.skip/ earlyreturnguards when no workspaces existed. This let the spec report green while actually exercising nothing.Fix
chat-separation.spec.tsto use the existingseedWorkspace/startHeartbeat/cleanupWorkspace/seedChatHistoryfixtures, removing all skip/early-return guards.e2e/chat-separation.spec.tsto the E2E Chat lane Playwright command.Test plan
npx playwright test e2e/chat-separation.spec.ts --list— 12 tests parse.npx eslint e2e/chat-separation.spec.ts— clean.REQUEST_CHANGES on head
aebdc6c1.5-axis review found a correctness blocker in the activity-source tests, which is the core false-green class this PR is meant to close.
The new deterministic seed calls
postA2AMessage(workspaceId, authToken, ...)with the workspace auth token and noX-Workspace-ID. InProxyA2A, a bearer workspace token with no org token is derived intocallerIDfor that workspace, so the resulting activity row is workspace/agent-sourced, not canvas-sourced (source_idis non-null). But bothsource=canvastests only assertArray.isArray(entries)and then iterate the rows; if the filter returns[], the tests pass. That means the spec can still report green while not proving the canvas-source path orsource+typepath at all.Please make the seeded activity match the intended source contract and assert non-empty results for the seeded paths. For example, either seed a true canvas-origin row (source_id NULL) and assert
entries.length > 0forsource=canvasandsource=canvas&type=a2a_receive, or explicitly test the workspace/agent source path with a seeded non-null source and assert that result is non-empty. Thesource=agenttest has the same vacuous-loop shape today, so it should also seed or assert a known row if it is meant to validate that filter.Workflow wiring and skip removal look directionally right, and the UI sub-tab tests are much less no-op prone, but this activity section still has a silent-pass hole. Security/performance/readability otherwise look acceptable for an E2E-only change.
APPROVED on head
01e76a16.5-axis review: the #11492 false-green blocker is resolved. The spec now seeds a true canvas-origin row using the org/admin token (callerID empty, source_id NULL) and an agent-origin row using the workspace auth token (source_id non-null). The source=canvas, source=agent, and source+type assertions all require non-empty result sets before checking source_id/activity_type, so the activity-source checks can no longer pass vacuously.
Correctness/QA: e2e-chat.yml now executes e2e/chat-separation.spec.ts, Playwright list coverage is 12 tests per the PR, and CI/all-required is green on this head. Robustness: missing admin token fails loud in beforeAll instead of silently skipping the canvas-origin path. Security: E2E-only token use stays in env/test context; no production auth path changes. Performance: bounded E2E-only coverage. Readability: the source contract is explicit in the helper comments and assertions.
Remaining red contexts are review/SOP ceremony gates, not code/CI failures.
APPROVED on head
01e76a16c99c6778f59c1c44228556e5ba852bfe.Re-reviewed the #2764/chat-separation fix after the fixture-source RC. The spec now seeds both source classes through the real A2A path with the intended auth shape: org/admin token with no
X-Workspace-IDfor canvas-origin rows (source_id NULL), and workspace bearer auth for agent-origin rows (source_idnon-null). That matches the backendProxyA2Acaller derivation andcallerIDToSourceIDbehavior.The false-green class is closed:
source=canvas,source=agent, andsource+typetests all assert non-empty result sets before checking per-row source/type invariants,source=agentrequires every row to have non-nullsource_id, and the workflow runse2e/chat-separation.spec.tsin E2E Chat with the live-test guard. I found no remaining skip/early-return path.Verified CI on this head: E2E Chat, Canvas, Platform Go, Shellcheck, E2E API Smoke, Canvas tabs, Canvas Deploy Status, and
CI / all-requiredare green.SOP ACK: reviewed correctness, tests, CI, security/data exposure surface, and regression risk for the changed files.
agent-dev-a referenced this pull request2026-06-13 23:28:38 +00:00