apache / apache/maka

flaky(e2e): streaming-remount:142 bubble mounts as historical without maka-bubble-streaming while the Turn is live

Open
#4,664 2 comments 0 reactions 1 assignee Claimed by @DaBestCode View on GitHub
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
715

Description

## Symptom

`e2e/streaming-remount.spec.ts:142 › keeps a completed reply after an interrupted turn and conversation remount` intermittently times out (20s) waiting for:

```ts
await expect(page.locator('.maka-bubble-streaming')).toContainText('Fake backend waiting', ...)
```

`element(s) not found` — but the Playwright error-context snapshot shows the text **is** rendered (`log > paragraph: "Fake backend waiting for the test to stop the Turn."`). The answer bubble mounts with `phase: 'historical'` instead of the live streaming phase, so it never carries the `maka-bubble-streaming` class even though the sidebar shows the turn as 正在响应 (running).

So the race is in live-turn arming/projection: the new turn's first content lands through the historical transcript path while the Turn is actually live.

## Reproduction (local, `xvfb-run -a`, `--workers=1`, `--repeat-each=6`)

| Tree | Result |
|---|---|
| `main` @ 91624f1f3e | 1 fail / 6 runs |
| `feat/4364-runtime-form-interactions` @ b65d7ff476 | 3 fail / 6 runs |
| `feat/4364-desktop-form-interactions` @ e8b22e8b2e | 1 fail / 3 runs |

The flake exists on plain `main`; the #4364 stack may raise the rate but does not introduce it.

## CI sightings

- PR #4384 run 33746990744 job 100621633447 — spec:142 failure
- Same run, rerun job 100651199089 — different spec failed (`skill-draft-lifecycle.spec.ts:110`), also draft/remount-timing territory
- PR #4490 run 33739469134 — `transcript-scroll.spec.ts:694` distance-58 flake (separate, reran green)

## Related history

- #4573 (closed): unfenced Enter races send admission (streaming-remount:161)
- #3177 (closed): intermittently misses the active Turn
- #3044 / #2895 (closed): re-streaming on conversation return

The 142 case looks like a cousin of #3177: the bubble loses the *live* classification on a freshly started Turn in a fresh conversation (the preceding step parks a draft in another session and clicks 新任务). Hypothesis: the first content event for the new Turn arrives before the renderer arms its live-turn projection for that session, so it is absorbed into the historical transcript and never re-classified.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.