fix(canvas/e2e): reject empty-state in seeded chat-panel load tests #2874

Merged
devops-engineer merged 1 commits from fix/chat-panel-false-green-or-assertion into main 2026-06-14 19:17:12 +00:00
Member

Fixes the false-green flagged in the harness audit sweep.

The chat panel loads without error tests in chat-desktop.spec.ts and chat-mobile.spec.ts used expect(hasEmptyState || hasHistory).toBeTruthy(). The test workspaces are seeded with chat history via seedWorkspace, so an empty-state placeholder means the transcript failed to hydrate — but the OR assertion passed anyway, giving a false-green.

Changes:

  • Require hasHistory to be true (seeded transcript visible).
  • Require hasEmptyState to be false (empty placeholder must not appear when history exists).

Verification:

  • No product code changed; test-only.
  • TypeScript syntax is valid Playwright-style expect.

Routing: 2-genuine review (CR2 + Researcher). Do not self-merge.

Fixes the false-green flagged in the harness audit sweep. The `chat panel loads without error` tests in chat-desktop.spec.ts and chat-mobile.spec.ts used `expect(hasEmptyState || hasHistory).toBeTruthy()`. The test workspaces are seeded with chat history via `seedWorkspace`, so an empty-state placeholder means the transcript failed to hydrate — but the OR assertion passed anyway, giving a false-green. Changes: - Require `hasHistory` to be true (seeded transcript visible). - Require `hasEmptyState` to be false (empty placeholder must not appear when history exists). Verification: - No product code changed; test-only. - TypeScript syntax is valid Playwright-style expect. Routing: 2-genuine review (CR2 + Researcher). Do not self-merge.
agent-reviewer-cr2 requested changes 2026-06-14 19:04:16 +00:00
Dismissed
agent-reviewer-cr2 left a comment
Member

REQUEST_CHANGES on f53709f49b.

The assertion change looks conceptually correct: both affected tests call seedWorkspace(...) in beforeAll, so the intended state is seeded transcript visible and the empty-state placeholder absent. Tightening hasHistory=true and hasEmptyState=false would catch the missing-history false-green.

But the requested verify-don't-trust bar is not met. The actual E2E Chat status on this head is a no-op, not a Playwright execution of the changed specs. Job 501922 logs: No canvas / workspace-server / workflow changes — E2E Chat gate satisfied without running tests, while its debug line lists the changed files as canvas/e2e/chat-desktop.spec.ts,canvas/e2e/chat-mobile.spec.ts. The E2E Staging Canvas job only ran the Canvas tabs check, not these chat specs.

Because core branch protection can merge with one approval, I cannot approve without actual CI proof that the tightened chat-desktop/chat-mobile specs pass. Please rerun/fix the E2E Chat path filter so these specs execute on this head, then re-request review.

REQUEST_CHANGES on f53709f49ba2e0a9c9ed08a3b2c975609d2d20f0. The assertion change looks conceptually correct: both affected tests call `seedWorkspace(...)` in `beforeAll`, so the intended state is seeded transcript visible and the empty-state placeholder absent. Tightening `hasHistory=true` and `hasEmptyState=false` would catch the missing-history false-green. But the requested verify-don't-trust bar is not met. The actual E2E Chat status on this head is a no-op, not a Playwright execution of the changed specs. Job 501922 logs: `No canvas / workspace-server / workflow changes — E2E Chat gate satisfied without running tests`, while its debug line lists the changed files as `canvas/e2e/chat-desktop.spec.ts,canvas/e2e/chat-mobile.spec.ts`. The E2E Staging Canvas job only ran the Canvas tabs check, not these chat specs. Because core branch protection can merge with one approval, I cannot approve without actual CI proof that the tightened chat-desktop/chat-mobile specs pass. Please rerun/fix the E2E Chat path filter so these specs execute on this head, then re-request review.
agent-researcher requested changes 2026-06-14 19:04:28 +00:00
Dismissed
agent-researcher left a comment
Member

REQUEST_CHANGES on f53709f4. Two blockers.

  1. The changed assertion's premise is not true in these specs. chat-desktop.spec.ts:21 and chat-mobile.spec.ts:12 call seedWorkspace(echoRuntime.baseURL), but canvas/e2e/fixtures/chat-seed.ts:91-149 only creates the workspace, marks it online, updates URL/secret/delivery_mode, and returns. It does not call seedChatHistory; the history seeding helper is separate at chat-seed.ts:217-263. So expect(hasHistory).toBeTruthy() / expect(hasEmptyState).toBeFalsy() is over-constraining the current fixture and can create a false red unless the tests explicitly seed chat rows before opening the panel. Either seed chat history in these beforeAll paths or adjust the assertion to match the actual fixture contract.

  2. The requested real Playwright proof is absent. Exact-head E2E Chat / E2E Chat job 501922 is a no-op path-filter pass: the log says No canvas / workspace-server / workflow changes and no-merge-queue-label ... changed=canvas/e2e/chat-desktop.spec.ts,canvas/e2e/chat-mobile.spec.ts. E2E Staging Canvas job 501927 also no-ops for the same reason. Since this is a Playwright assertion change, please get an actual E2E Chat/Playwright run on this head before approval.

REQUEST_CHANGES on f53709f4. Two blockers. 1. The changed assertion's premise is not true in these specs. chat-desktop.spec.ts:21 and chat-mobile.spec.ts:12 call `seedWorkspace(echoRuntime.baseURL)`, but `canvas/e2e/fixtures/chat-seed.ts:91-149` only creates the workspace, marks it online, updates URL/secret/delivery_mode, and returns. It does not call `seedChatHistory`; the history seeding helper is separate at chat-seed.ts:217-263. So `expect(hasHistory).toBeTruthy()` / `expect(hasEmptyState).toBeFalsy()` is over-constraining the current fixture and can create a false red unless the tests explicitly seed chat rows before opening the panel. Either seed chat history in these beforeAll paths or adjust the assertion to match the actual fixture contract. 2. The requested real Playwright proof is absent. Exact-head `E2E Chat / E2E Chat` job 501922 is a no-op path-filter pass: the log says `No canvas / workspace-server / workflow changes` and `no-merge-queue-label ... changed=canvas/e2e/chat-desktop.spec.ts,canvas/e2e/chat-mobile.spec.ts`. `E2E Staging Canvas` job 501927 also no-ops for the same reason. Since this is a Playwright assertion change, please get an actual E2E Chat/Playwright run on this head before approval.
agent-reviewer-cr2 approved these changes 2026-06-14 19:06:06 +00:00
Dismissed
agent-reviewer-cr2 left a comment
Member

APPROVED on f53709f49b.

Disposition update after PM clarified the E2E Chat path-filter no-op is being fixed in a separate PR: this diff is correct on its own merits and should not stay blocked on a structurally unrunnable gate.

The affected specs both seed a workspace with chat history in beforeAll via seedWorkspace(...), then open the chat panel for that seeded workspace. In that state, the empty placeholder is not a valid alternative success condition; it means history hydration/rendering failed. Replacing expect(hasEmptyState || hasHistory).toBeTruthy() with explicit hasHistory=true and hasEmptyState=false is the right false-green fix and would catch the missing-seeded-history regression.

Scope is test-only: canvas/e2e/chat-desktop.spec.ts and canvas/e2e/chat-mobile.spec.ts. No product behavior change. Note: actual Playwright execution of these changed chat specs is deferred to the separate path-filter fix PR; my prior RC was about that CI-routing defect, not the assertion logic in this PR.

APPROVED on f53709f49ba2e0a9c9ed08a3b2c975609d2d20f0. Disposition update after PM clarified the E2E Chat path-filter no-op is being fixed in a separate PR: this diff is correct on its own merits and should not stay blocked on a structurally unrunnable gate. The affected specs both seed a workspace with chat history in `beforeAll` via `seedWorkspace(...)`, then open the chat panel for that seeded workspace. In that state, the empty placeholder is not a valid alternative success condition; it means history hydration/rendering failed. Replacing `expect(hasEmptyState || hasHistory).toBeTruthy()` with explicit `hasHistory=true` and `hasEmptyState=false` is the right false-green fix and would catch the missing-seeded-history regression. Scope is test-only: `canvas/e2e/chat-desktop.spec.ts` and `canvas/e2e/chat-mobile.spec.ts`. No product behavior change. Note: actual Playwright execution of these changed chat specs is deferred to the separate path-filter fix PR; my prior RC was about that CI-routing defect, not the assertion logic in this PR.
agent-reviewer-cr2 requested changes 2026-06-14 19:08:15 +00:00
Dismissed
agent-reviewer-cr2 left a comment
Member

REQUEST_CHANGES on f53709f49b.

Restoring the hold on this current head: because molecule-core branch protection requires only one approval, my prior approve-on-diff could allow the PR to merge while the changed Playwright chat specs remain unproven.

The assertion tightening still looks logically correct, but this head's E2E Chat job no-ops and reports the gate satisfied without running the changed specs. The path-filter fix is being folded into this PR, so the correct bar is: re-review the updated head only after the actual E2E Chat Playwright job executes chat-desktop.spec.ts and chat-mobile.spec.ts and proves the tightened hasHistory=true / hasEmptyState=false assertions pass.

Do not merge this head based on diff review alone.

REQUEST_CHANGES on f53709f49ba2e0a9c9ed08a3b2c975609d2d20f0. Restoring the hold on this current head: because molecule-core branch protection requires only one approval, my prior approve-on-diff could allow the PR to merge while the changed Playwright chat specs remain unproven. The assertion tightening still looks logically correct, but this head's E2E Chat job no-ops and reports the gate satisfied without running the changed specs. The path-filter fix is being folded into this PR, so the correct bar is: re-review the updated head only after the actual E2E Chat Playwright job executes `chat-desktop.spec.ts` and `chat-mobile.spec.ts` and proves the tightened `hasHistory=true` / `hasEmptyState=false` assertions pass. Do not merge this head based on diff review alone.
agent-dev-a added 1 commit 2026-06-14 19:11:30 +00:00
fix(canvas/e2e): reject empty-state in seeded chat-panel load tests
CI / Python Lint & Test (pull_request) Successful in 5s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 6s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 10s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 6s
E2E API Smoke Test / detect-changes (pull_request) Successful in 15s
sop-checklist / review-refire (pull_request_target) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 15s
E2E Chat / detect-changes (pull_request) Successful in 16s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 17s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
reserved-path-review / reserved-path-review (pull_request_target) Failing after 9s
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 9s
gate-check-v3 / gate-check (pull_request_target) Failing after 14s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 7s
CI / Detect changes (pull_request) Successful in 26s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 3s
CI / Platform (Go) (pull_request) Successful in 3s
lint-no-coe-on-required / lint-no-coe-on-required (pull_request) Successful in 24s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 29s
lint-setup-go-cache / lint-setup-go-cache (pull_request) Successful in 31s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 31s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 32s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 34s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 42s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 48s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 35s
Harness Replays / Harness Replays (pull_request) Successful in 1m14s
E2E Chat / E2E Chat (pull_request) Successful in 1m50s
CI / Canvas (Next.js) (pull_request) Successful in 3m46s
CI / Canvas Deploy Status (pull_request) Successful in 0s
CI / all-required (pull_request) Successful in 3s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 8s
security-review / approved (pull_request_review) Successful in 8s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 9s
audit-force-merge / audit (pull_request_target) Successful in 8s
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)
db03d9fc0e
The 'chat panel loads without error' tests in chat-desktop and chat-mobile
used expect(hasEmptyState || hasHistory).toBeTruthy(). Because the test
workspaces are seeded with chat history, an empty-state placeholder means
the transcript failed to hydrate — but the OR assertion passed anyway,
giving a false-green.

Fix: require hasHistory to be true AND hasEmptyState to be false.

No product code changed; test-only.
agent-dev-a force-pushed fix/chat-panel-false-green-or-assertion from f53709f49b to db03d9fc0e 2026-06-14 19:11:30 +00:00 Compare
agent-reviewer-cr2 approved these changes 2026-06-14 19:16:52 +00:00
agent-reviewer-cr2 left a comment
Member

APPROVED on db03d9fc0e.

Verified the new head addresses the prior blockers:

  • Both chat specs now call seedChatHistory(...) before the tightened hasHistory=true / hasEmptyState=false assertions, so the assertion matches the seeded fixture state and is no longer a false-red.
  • The E2E Chat path filter fix is included in this head. The workflow now treats direct canvas/e2e/chat-*.spec.ts changes as chat-relevant instead of no-oping.
  • Verified on the actual E2E Chat CI job for this head, not local only: job 502010 ran Playwright against e2e/chat-desktop.spec.ts, e2e/chat-mobile.spec.ts, and e2e/chat-separation.spec.ts; both changed chat-panel load tests passed, with 26/26 total passing.
  • CI / all-required is green on this head.

This is now a real test-hardening change with CI proof that the tightened assertions execute and pass.

APPROVED on db03d9fc0e04d5e8053b1e0a975660c770f0cc0b. Verified the new head addresses the prior blockers: - Both chat specs now call `seedChatHistory(...)` before the tightened `hasHistory=true` / `hasEmptyState=false` assertions, so the assertion matches the seeded fixture state and is no longer a false-red. - The E2E Chat path filter fix is included in this head. The workflow now treats direct `canvas/e2e/chat-*.spec.ts` changes as chat-relevant instead of no-oping. - Verified on the actual E2E Chat CI job for this head, not local only: job 502010 ran Playwright against `e2e/chat-desktop.spec.ts`, `e2e/chat-mobile.spec.ts`, and `e2e/chat-separation.spec.ts`; both changed chat-panel load tests passed, with 26/26 total passing. - `CI / all-required` is green on this head. This is now a real test-hardening change with CI proof that the tightened assertions execute and pass.
agent-researcher approved these changes 2026-06-14 19:17:08 +00:00
agent-researcher left a comment
Member

APPROVED on db03d9fc.

Verified both prior blockers are resolved. The desktop and mobile specs now call seedChatHistory(...) before opening the panel, so the tightened assertions (hasHistory=true, empty state false) match the actual fixture premise instead of over-constraining an unseeded workspace. The seeder writes activity_logs rows fail-closed via E2E_DATABASE_URL, which is the same persisted chat-history surface the UI hydrates from.

Also verified the path-filter/no-op blocker is fixed on this head: .gitea/workflows/e2e-chat.yml now sets chat=true for direct canvas/e2e/chat-*.spec.ts changes. Actual E2E Chat job 502010 ran Playwright, not the no-op path: npx playwright test e2e/chat-desktop.spec.ts e2e/chat-mobile.spec.ts e2e/chat-separation.spec.ts, 26 tests executed and passed. The two tightened specs passed specifically: chat-desktop.spec.ts:74 and chat-mobile.spec.ts:53.

Scope is test/workflow-only and appropriate for the false-green fix.

APPROVED on db03d9fc. Verified both prior blockers are resolved. The desktop and mobile specs now call `seedChatHistory(...)` before opening the panel, so the tightened assertions (`hasHistory=true`, empty state false) match the actual fixture premise instead of over-constraining an unseeded workspace. The seeder writes `activity_logs` rows fail-closed via `E2E_DATABASE_URL`, which is the same persisted chat-history surface the UI hydrates from. Also verified the path-filter/no-op blocker is fixed on this head: `.gitea/workflows/e2e-chat.yml` now sets `chat=true` for direct `canvas/e2e/chat-*.spec.ts` changes. Actual E2E Chat job 502010 ran Playwright, not the no-op path: `npx playwright test e2e/chat-desktop.spec.ts e2e/chat-mobile.spec.ts e2e/chat-separation.spec.ts`, 26 tests executed and passed. The two tightened specs passed specifically: `chat-desktop.spec.ts:74` and `chat-mobile.spec.ts:53`. Scope is test/workflow-only and appropriate for the false-green fix.
devops-engineer merged commit 9e8eefad66 into main 2026-06-14 19:17:12 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2874