Repository navigation
test(markdown): size the streamed-reveal documents to fit a loaded runner - #35400
Conversation
|
STATUS: ready. Head 3aab486, from origin/main bb1b05e. The three large reveal documents shrink to 12.5k/14k/7.3k characters with the same block shapes and reveal-start ratios. Local timing (loaded machine): paragraph 26–38 s → 4.5–6.5 s, list 34 s → 6 s. Checks: pnpm tc, typecheck:ci, code-quality, anti-slop, oxlint, ast-grep scan and gates; the file passes 14/14. Review requested from e9-reviewer. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit details
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. Comment |
[Low impact] This test-only change appears safe to merge. SummaryReduces the paragraph, fence, and list fixtures and adjusts their reveal start points to reduce test time on busy CI runners.
Reviews (1) · Last reviewed commit: "test(markdown): size the streamed-reveal..." · Reviewed by Greptile |
ELI5
A test checks that the faster way of showing a long chat reply as it streams produces exactly the same page as the old way, at every step. It did that on documents of about 50,000 characters, rendering each one up to 85 times with both renderers. On a busy CI runner one case took 43 seconds and another ran past its 55-second limit. The documents are now about a quarter to a seventh of that size, with the same shapes, so each case finishes in seconds.
What Changed
Before: in
CommentMarkdown.parse-reuse.test.tsx› "preserves exact DOM and copy text at every reveal update":On CI (#35341, job 123096980923) the paragraph case took 43 s and the list case hit the 55 s timeout. The Vitest
EISDIRbug fixed in #35384 hid that failure.After:
Every other case (short, settled fence and tail, the boundary and construct cases) and the two other tests are unchanged.
Mechanism: only the three large documents and their reveal start points change. They keep the same block kinds (a long paragraph, one long fence, a long run of list items), the same production reveal cadence (
sequence(), 85 frames), and the same position of the reveal within the document. Both renderers are still compared after every update.Why
What the test covers: that block reuse matches a full re-parse on long streamed replies. I found no size threshold in
CommentMarkdownor the block splitter that needs 50k-character documents. The longer documents only added render time per frame, which is what made the test depend on runner speed.Times on my machine, which was loaded:
On CI the same ratio puts the slowest case at about 10 s against the 55 s timeout.
Alternatives considered: raising the timeout keeps the test runner-speed dependent and slows every shard. Splitting the cases out doesn't reduce the work.
Flag-off: test-only.
User-risk: none.
Linked Issue
CI flake triage (unit shards blocking merges). Follows #34821, which added the test.
Visual Proof
N/A. Test-only.
Testing
The file passes, 14/14, twice. Timings are in the Why section.
Checks run:
pnpm tc,pnpm run typecheck:ci,pnpm run check:code-quality:changed, anti-slop oxlint, oxlint, ast-grep scan and gates.Review
Agent skill upstream boundary
Notes
None.
Status
Ready for review.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)