Skip to content

test(chat): search the demo conversation only after its turn ends - #3755

Merged
devswha merged 1 commit into
mainfrom
test/conversation-search-turn-end
Nov 12, 2026
Merged

devswha merged 1 commit into
mainfrom
test/conversation-search-turn-end

Conversation

@devswha

@devswha devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

scripts/conversation-search-demo-regression.ts:115 failed twice on main (CI 43185338832 at aea3fdf): the search returned the first snippet as one joined text, while the test expected only Adding a payments_idempotent_replays_total counter….

Cause

The script searched for replay as 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.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Updated regression coverage to wait for the demo’s delayed final answer before searching.
    • Search-result snippet checks now account for the longer answer content.

The regression test now waits for the demo’s final answer before searching. It also expects the answer snippet to include additional replay-counter implementation text.

Changes: Conversation search regression test

Layer / File(s) Summary
Wait for final answer and update search expectation
scripts/conversation-search-demo-regression.ts
The test waits for “6 tests pass.” before searching. The expected answer snippet now includes additional replay-counter implementation text.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: jpcarranza94

Merge Risk: Minimal · up to ba63e

This change only adjusts a regression test to wait for the demo's final answer before searching. It has no production impact, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the demo conversation search in the regression test now runs only after the demo turn ends. The raw summary and objectives confirm the script now waits for the turn's …
Description check Passed The description covers the problem (flaky search snippet on main, CI run reference), the cause (search ran before the demo ended the turn), the fix (wait for the final answer, test-only change), and v…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the demo conversation search in the regression test now runs only after the demo turn ends. The raw summary and objectives confirm the script now waits for the turn's final answer before searching for replay. The title is specific, concise, and matches the changeset.

Full details: Description check

Explanation

The description covers the problem (flaky search snippet on main, CI run reference), the cause (search ran before the demo ended the turn), the fix (wait for the final answer, test-only change), and validation (local regression runs and bun run check fast). It does not mention the changelog-fragment rule in the template's terms beyond stating no fragment is needed, and it does not state whether contract tests apply, which is acceptable because the change is test-only and touches no HTTP/WS behavior. The description follows the template's Change and Validation intent, though it uses different headings (Summary, Cause, Fix, Validation).

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0260744 and ba63e80.

Files selected for processing: 1

  • scripts/conversation-search-demo-regression.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Local merge gate: PASS

Local merge gate: PASS #3755 merge=6efa9ebab69c head=ba63e8047fdb main=69d6c5974f41 on herdr-ci-runner:local on devswha-ThinkStation-P620 CPUs 64-127 in 533s, reruns=0

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 herdr-ci-runner:local on devswha-ThinkStation-P620 CPUs 64-127 (17% busy before the start, host load 27.51; shards=4 unit_workers=8 browser_main_workers=2 browser_other_workers=16). Scope: full. Native Windows install and the macOS checks are not part of this gate.

Step Command Result Seconds Counts
fast-install bun install --frozen-lockfile pass 0 -
release-guards bun scripts/release-guards.ts --base 69d6c5974f41 pass 0 -
fast bun run check fast pass 190 tests 16398 pass / 0 fail; check steps 6 ok / 0 failed
integration-install bun install --frozen-lockfile pass 0 -
integration bun run check integration pass 217 tests 1423 pass / 0 fail; check steps 3 ok / 0 failed
browser-main-install bun install --frozen-lockfile pass 0 -
browser-main-build bun run build pass 9 -
browser-main BROWSER_SCRIPTS=ui-regression,ui-contexts-regression bun run check run -- bun scripts/ci-browser-parallel.ts pass 344 browser scripts 2/2 passed
browser-other-install bun install --frozen-lockfile pass 0 -
browser-other-build bun run build && bun run build:shell pass 13 -
browser-other BROWSER_EXCLUDE=<those two> bun run check run -- bun scripts/ci-browser-parallel.ts pass 504 browser scripts 205/205 passed

Total 533s.

@devswha
devswha merged commit c871811 into main Nov 12, 2026
9 of 13 checks passed
@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head ba63e8047fdb as c8718113ecc8 on the local merge gate, with no unresolved review threads.

Reviewer Verdict Note
codex CLEAR

One reviewer: test-only PR (scripts/conversation-search-demo-regression.ts).

Test-only PR (scripts/conversation-search-demo-regression.ts), so one reviewer: Codex Terra, CLEAR.

The demo ends a turn 4.5 s after each load and appends the final answer, which changed the snippet the script searched (:115); it turned main's run of aea3fdf red under load. The script now waits for that turn end before it searches, the same timer #3753 handled. The author ran it three times, all passing.

@devswha
devswha deleted the test/conversation-search-turn-end branch November 12, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant