chat: agent reply intermittently never renders in My Chat (persisted but only present as hidden node) — E2E Chat run-to-run divergence on IDENTICAL trees #2598

Open
opened 2026-06-11 18:01:40 +00:00 by core-devops · 0 comments
Member

Evidence (no-flakes rule — this is a real race, not an env issue): E2E Chat on PR #2597 head 9076eaad = GREEN; on merge commit ad24de9 (IDENTICAL tree — merge-queue FF of the same head onto 035123b) = RED (run 349272). Same code, divergent outcome ⇒ timing-dependent product behavior.

Failure shape (tests 2,3,4,6,7; test 1 'panel loads' passes — the #2597 selector scoping works):

Locator:  getByText('Echo: Persistence test')
Expected: visible / Received: hidden
  19 × locator resolved to <p>Echo: Persistence test</p>  ← element EXISTS, hidden

The user message IS visible in My Chat; the echo reply was persisted (its text exists in a hidden DOM node — activity/preview pane), but My Chat never renders it within 15s. This is the same class the CTO reported live ("I leave chat, come back, only see 3 dots") that #2560 partially addressed: when the WS delivery race loses (socket subscription established after the reply lands / missed onAgentMessage), My Chat shows nothing until a manual reload-triggered refetch.

Asks:

  1. Make My Chat reply rendering race-free: reconcile from chat-history (DB) on a short interval or on WS (re)connect, so a missed socket frame can't permanently hide a persisted reply.
  2. Keep the E2E assertion as-is — it correctly demands the reply become visible; do NOT scope it to tolerate the hidden copy.
  3. Regression test at the unit level: simulate socket-subscribe-after-reply ordering.

Context: 4 prior mechanical layers in this suite were fixed via #2576/#2577/#2587/#2597 (sqlmock args, hidden-concierge wsName selector, duplicate #tab-chat ids, duplicate chat-panel testid). This 5th layer is behavioral and owned by the chat stack (#2560/#2530 family).

🤖 Generated with Claude Code

**Evidence (no-flakes rule — this is a real race, not an env issue):** E2E Chat on PR #2597 head `9076eaad` = GREEN; on merge commit `ad24de9` (IDENTICAL tree — merge-queue FF of the same head onto 035123b) = RED (run 349272). Same code, divergent outcome ⇒ timing-dependent product behavior. Failure shape (tests 2,3,4,6,7; test 1 'panel loads' passes — the #2597 selector scoping works): ``` Locator: getByText('Echo: Persistence test') Expected: visible / Received: hidden 19 × locator resolved to <p>Echo: Persistence test</p> ← element EXISTS, hidden ``` The user message IS visible in My Chat; the echo reply was persisted (its text exists in a hidden DOM node — activity/preview pane), but **My Chat never renders it** within 15s. This is the same class the CTO reported live ("I leave chat, come back, only see 3 dots") that #2560 partially addressed: when the WS delivery race loses (socket subscription established after the reply lands / missed onAgentMessage), My Chat shows nothing until a manual reload-triggered refetch. **Asks:** 1. Make My Chat reply rendering race-free: reconcile from chat-history (DB) on a short interval or on WS (re)connect, so a missed socket frame can't permanently hide a persisted reply. 2. Keep the E2E assertion as-is — it correctly demands the reply become visible; do NOT scope it to tolerate the hidden copy. 3. Regression test at the unit level: simulate socket-subscribe-after-reply ordering. Context: 4 prior mechanical layers in this suite were fixed via #2576/#2577/#2587/#2597 (sqlmock args, hidden-concierge wsName selector, duplicate #tab-chat ids, duplicate chat-panel testid). This 5th layer is behavioral and owned by the chat stack (#2560/#2530 family). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2598