Stabilise the flaky transcript and layout tests - #351
Merged
Conversation
Checking a rendered frame for the absence of "agent" anywhere breaks in any checkout whose directory name contains that substring (the footer prints the workspace path), including any path containing "subagent". Scope the assertion to the rows that actually carry a voice label instead.
TheGreatAxios
force-pushed
the
cl-5571-stabilise-tests
branch
from
August 7, 2026 06:51
27d2b38 to
510b834
Compare
Highlighting runs on a worker outside the render scheduler, so a quiet renderer or a fixed 250ms sleep does not reliably mean the highlighted frame has landed. Poll for the settled shape instead — every block present and the raw markdown marker gone — so each test returns as soon as it is true and tolerates slower runs instead of racing a guessed duration.
The test raced a real spawned ripgrep process against a 1ms timeout, so it depended on the process being slower than the clock rather than on the timeout path itself. Thread the same stalled-child fake already used at the runRg level through ripgrepPlugin so the timeout is the only path to settlement.
A bare `bun test` also scans vendor/, inflating pass/fail counts by hundreds and making the count meaningless to compare across branches.
TheGreatAxios
force-pushed
the
cl-5571-stabilise-tests
branch
from
August 7, 2026 07:03
510b834 to
12c027e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shell.test.tsandtranscript-layout.test.tsassertednot.toContain("agent")against a full rendered frame, which breaks in any checkout whose directory name contains that substring (the footer prints the workspace path). Both now check only the rows that actually carry a voice label.markdown-rows.test.tssettled on a fixed 250ms sleep after appending a markdown row, racing the async highlight worker. Predicate-based call sites now poll for the settled frame shape (every block present, no raw markdown marker left) with a generous bound, returning as soon as it's true.ripgrep-plugin.test.ts's timeout test raced a real spawnedrgprocess against a 1ms timeout.ripgrepPluginnow accepts an injectable spawn function (mirroring the onerunRgalready exposed), so the test uses a stalled child that never closes — the timeout is the only path to settlement.bun run testis the canonical scoped command; a barebun testalso scansvendor/, inflating counts by hundreds.Verification
bun run typecheck,bun run build,bun run testall pass (3947 pass / 0 fail, post-rebase onto 0.2.91).bun run testtwice from the same worktree in the suite's fixed default order: identical 3947 pass / 0 fail both times.shell.test.tsandtranscript-layout.test.tspass standalone and as part of the full fixed-order run.bun test --randomize) was not investigated as part of this change — verification here covers fixed-order stability only. A separate ordering-dependence issue exists onmainindependent of this branch.Closes CL-5571