Repository navigation
test(chat): search the demo conversation only after its turn ends - #3755
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Local merge gate: PASS
The Linux suites of the required checks (Fast checks, Integration and browser), run on main 69d6c59 with this PR's head ba63e80 merged in (local merge 6efa9ebab69c, not pushed), as groups side by side in the self-hosted CI runner image on
Total 533s. |
Merge passMerged head
One reviewer: test-only PR (scripts/conversation-search-demo-regression.ts). Test-only PR ( The demo ends a turn 4.5 s after each load and appends the final answer, which changed the snippet the script searched ( |
Summary
scripts/conversation-search-demo-regression.ts:115failed twice on main (CI 43185338832 at aea3fdf): the search returned the first snippet as one joined text, while the test expected onlyAdding a payments_idempotent_replays_total counter….Cause
The script searched for
replayas soon as the first chat turn was drawn. 4.5 s after each load, the demo ends that same turn and appends its final answer (site/demo/transport.ts, "the turn in progress").So a search made before the turn end finds only the commentary. A search made after it, which happens whenever the page is slow to get there, finds the commentary and the final answer joined in one snippet.
Fix (test only, no sleeps)
Before searching, the script waits for the turn's final answer (
6 tests pass.) to appear in the current pane. It then expects the settled snippet, taken from a local run; it is the same text main's failed run got. The later searches in the script (&changed=1,&older=1) do not check snippet text.Validation
TMPDIR=~/.cache/ovis-tmp/ci-loop bun scripts/conversation-search-demo-regression.ts: 3/3 passes (7 PASS lines each, load 19 to 23).bun run check fast: pass (typecheck, build, unit tests, actionlint).No changelog fragment: this changes a test only. Same demo timer as #3753.