Skip to content

test(sidebar): take sidebar-filter rosters only after the demo's turn end - #3753

Merged
devswha merged 1 commit into
mainfrom
test/sidebar-filter-agent-order
Nov 12, 2026
Merged

devswha merged 1 commit into
mainfrom
test/sidebar-filter-agent-order

Conversation

@devswha

@devswha devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

scripts/sidebar-filter-demo-regression.ts intermittently failed with two Agents rows swapped (build Remote migration ahead of local Idempotent payments):

  • :575 "phone dark: the roster is back after the drawer closed": PR runs 43175647381 and 43175630298, each failed twice.
  • :818 "desktop dark: clearing brings every saved fold back": the merge pass's local gate, failed twice.
  • :575 again in the merge pass's local gate on 17d8ab0, failed once.

Cause

The demo ends the api pane's turn 4.5 s after each load (site/demo/transport.ts, "the turn in progress"). That pane-status delta passes through the script's EventSource wrapper unchanged, so only the Laptop's api row goes done. The Build PC's copy, cloned from full rosters only, stays working. The Laptop's row then moves into the resting part, behind the Build PC's copy.

So a roster taken before that moment and compared with one taken after it sees the pair swap:

  • foldTransitions' second block takes its baseline right after newPage, with no wait.
  • happyPath waited for the done mark but not for the reorder that follows it.

A probe confirmed the settled state on every run: the Build PC's api row stays working, and the Laptop's api row sits after it.

Fix (test only, no sleeps)

turnEnded(page) waits until the Laptop's api row shows done and sits behind the Build PC's copy. It runs:

  • in newPage, so every scenario starts from the settled list;
  • after the script's one page.reload(), which restarts the demo and its timer.

happyPath's old partial wait is removed.

Validation

  • TMPDIR=~/.cache/ovis-tmp/ci-loop bun scripts/sidebar-filter-demo-regression.ts (en and ko, every scene): 1 full run passed (455 s, load 90) before this PR; more runs in progress, results added in a comment
  • bun run check fast: pass (typecheck, build, unit tests, actionlint)

No changelog fragment: this changes a test only.

@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 the sidebar filter regression check to wait for the Laptop agent to finish after the Build PC agent, improving synchronization during page setup and reload checks.

The regression script adds a shared wait for the Laptop API agent’s completion and its row order relative to the Build PC API agent. Page setup and selected-nonmatch reload flows use this wait.

Changes: Sidebar filter demo synchronization

Layer / File(s) Summary
Completion check and flow integration
scripts/sidebar-filter-demo-regression.ts
Adds turnEnded to wait for the Laptop API agent’s done status and verify that the Build PC API agent row appears first. Page setup and selected-nonmatch reload flows use this check. Removes the earlier direct completion wait and timing comment.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: duytbp

Merge Risk: Minimal · up to f587a

This change only affects a demo regression script and makes its roster snapshots more stable. It does not change product behavior, and no merge-blocking risk is identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a sidebar-filter test now takes its rosters only after the demo's turn ends. It matches the summary, which adds turnEnded and syncs newPage and the reload flow to it. …
Description check Passed The description follows the template. It has a Change-style section (Summary and Cause, with the problem, the cause, and the fix) and a Validation section that lists the commands run, their results, a…
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: a sidebar-filter test now takes its rosters only after the demo's turn ends. It matches the summary, which adds turnEnded and syncs newPage and the reload flow to it. The title is specific and short, and it uses the conventional test(scope) prefix.

Full details: Description check

Explanation

The description follows the template. It has a Change-style section (Summary and Cause, with the problem, the cause, and the fix) and a Validation section that lists the commands run, their results, and the skipped checks. It does not link an issue, which the template asks for only in feature work. It also states that no changelog fragment is needed, which fits the template's changelog guidance for test-only changes. The Validation section reports one full run and says more runs are in progress, so the results are partial. It does not mention contract-test coverage, but that applies to HTTP/WS changes, and this PR changes only a test script.

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 ab5a573 and f587a4d.

Files selected for processing: 1

  • scripts/sidebar-filter-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

Validation on the final head f587a4d: TMPDIR=~/.cache/ovis-tmp/ci-loop bun scripts/sidebar-filter-demo-regression.ts (en and ko, every scene) passed 2/2 (416 s at load 57, 410 s at load 30). An earlier run on the pre-rebase commit also passed. bun run check fast passed.

@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Local merge gate: PASS

Local merge gate: PASS #3753 merge=67c9d59e6dad head=f587a4d7d275 main=ab5a57387709 on herdr-ci-runner:local on devswha-ThinkStation-P620 CPUs 64-127 in 508s, reruns=1

The Linux suites of the required checks (Fast checks, Integration and browser), run on main ab5a573 with this PR's head f587a4d merged in (local merge 67c9d59e6dad, 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 (11% busy before the start, host load 19.07; 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 ab5a57387709 pass 0 -
fast bun run check fast pass 152 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 190 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 280 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 12 -
browser-other BROWSER_EXCLUDE=<those two> bun run check run -- bun scripts/ci-browser-parallel.ts pass 486 browser scripts 205/205 passed

Reruns:

  • browser scripts/sidebar-peek-demo-regression.ts failed, then passed on its automatic second run

Total 508s.

@devswha
devswha merged commit 0260744 into main Nov 12, 2026
20 of 23 checks passed
@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head f587a4d7d275 as 0260744818b8 on the local merge gate, with no unresolved review threads.

Reviewer Verdict Note
codex CLEAR

One reviewer: test-only PR (scripts/sidebar-filter-demo-regression.ts).

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

The demo ends one pane's turn 4.5 s after each load, which moves that agent row behind its copy on the other PC. The script took its baseline rosters before that moment and compared after it, so the pair came back swapped (:575, :818); under load this failed twice in a row and blocked two local merge gates today. It now waits, without a sleep, until the row is done and behind its copy before taking a roster, after the first load and after the reload.

Left, LOW (Codex, traced, not run): if the first roster arrives late, the new wait can have nothing to become true on. Sent to the author's lane.

@devswha
devswha deleted the test/sidebar-filter-agent-order branch November 12, 2026 11:15
devswha added a commit that referenced this pull request Nov 12, 2026
…ebar-filter (#3757)

## Summary

Follows up #3753. The merge pass's local gate of #3733 (host load 154)
timed out twice in `scripts/sidebar-filter-demo-regression.ts` at
`turnEnded` (the `waitForFunction`, 30 s).

## Cause

#3753 waited for "the Laptop's api row is `done` and sits behind the
Build PC's copy". That only holds when the demo's first roster arrives
*before* its 4.5 s turn end.

If the first roster comes later, both copies are cloned from a snapshot
where the turn has already ended. Both rows start `done`, the Laptop's
stays first, and the condition can never hold.

## Fix (test only, no sleeps)

- The script's `EventSource` wrapper now passes each `pane-status` the
demo sends for the Laptop on to the Build PC's copy as well. The two
copies stay identical, as they already are for full rosters.
- `turnEnded` waits for both api rows to show `done`. That holds whether
the turn ends before or after the first roster.

## Validation

- `TMPDIR=~/.cache/ovis-tmp/ci-loop bun
scripts/sidebar-filter-demo-regression.ts` (en and ko, every scene): 2/2
passes (432 s at load 86, 420 s at load 98).
- `bun run check fast`: pass (typecheck, build, unit tests, actionlint).

No changelog fragment: this changes a test only.
devswha added a commit that referenced this pull request Nov 12, 2026
)

## 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.
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