Skip to content

test(omp-images): give the two-20-MiB-record picture test the 30 s budget of its neighbour - #2372

Merged
devswha merged 1 commit into
mainfrom
test/omp-images-large-record-timeout
Oct 29, 2026
Merged

devswha merged 1 commit into
mainfrom
test/omp-images-large-record-timeout

Conversation

@devswha

@devswha devswha commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Found by the flake-hunt lane: Native Windows install failed and passed on a rerun with no code change on run 40921939545 (#2368, 2026-10-29): server/omp-images.test.ts "omp's pictures reach the chat > holds a window, a record's shape and the picture, never a record whole however large" this test timed out after 5000ms.

Cause (test flake)

The test writes a transcript with two 20 MiB records and reads a picture out of it twice, then asserts that no read allocated more than 1 MiB. It ran on bun's default 5 s budget. On the hosted Windows runner it is slow, not stuck:

  • Passing Windows runs in the CI logs took 4.36, 4.47 and 4.83 s. Three runs hit the budget, at 5002, 5002 and 5010 ms. Linux runs take 0.5-0.9 s.
  • In the failing log the body was still running: about 57 ms after the timeout it reached its second read, which then failed only because the timeout's teardown had removed the fixture.
  • The reader yields to the event loop on every window (server/codex-images.ts finishAsync), so it cannot spin in place.

Change

The test gets the 30 s budget its 40 MiB neighbour ("lets the event loop run between windows...") already has, with the same comment that counts, not time, are asserted.

Proof

  • Before: 3 timeouts at the 5 s default among the Windows runs read (above). It does not fail on Linux, where it takes under 1 s, so there is no local fail-first. The evidence is the Windows timing spread.
  • After: server/omp-images.test.ts passes 21/21 locally, and bun run check fast is ok.
  • The guard still catches the regression: the reviewer changed recordShapeSteps to read a whole record in a scratch worktree, and the test failed on the allocation check (20971866 > 1048576), not on time.

Test-only.

Reviews

  • omo-native-code-reviewer: APPROVE, CLEAR. One LOW on the fragment wording was fixed. A LOW outside this diff was noted: the guard only watches Buffer.alloc, so a regression reading a whole record through Buffer.allocUnsafe or readFileSync would pass it. Left as is.
  • Test-only, so no Codex review (notes/pr-policy.md).

…dget of its neighbour

On the Windows runner the test writes a 40 MiB transcript and reads a
picture out of it twice: passing runs took 4.36, 4.47 and 4.83 s and three
hit the default 5 s (5002, 5002 and 5010 ms), the last on #2368. It asserts
allocation, not time, so give it the 30 s its 40 MiB neighbour already has.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between b6f555f and 06e0166.

Files selected for processing: 2
  • changelog.d/unit-flake-omp-images-large-record.md
  • server/omp-images.test.ts

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

📝 Summary

Summary by CodeRabbit

  • Tests
    • Increased the time allowed for a test involving large image records, reducing failures on slower runs without changing the behavior being checked.
  • Documentation
    • Recorded the updated test time limit and the reason for the adjustment.

The large-transcript OMP picture test now has a 30-second timeout instead of the default. A comment clarifies that the test asserts allocation. The changelog records the change and reported Windows run times.

Changes: OMP image test timeout

Layer / File(s) Summary
Set and document test timeout
server/omp-images.test.ts, changelog.d/unit-flake-omp-images-large-record.md
The test sets a 30,000 ms timeout and documents its allocation assertion. The changelog describes the timeout change and reported Windows run timings.

Priority: Low

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

Change: Other · Severity of issue fixed: Low

Merge Risk: Minimal · up to 06e01

The localized test-timeout adjustment is ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the test and the timeout change.
Description check Passed The description explains the problem, cause, change, validation results, and regression guard. The required Validation heading is absent, but the Proof section provides the required validation details…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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: Description check

Explanation

The description explains the problem, cause, change, validation results, and regression guard. The required Validation heading is absent, but the Proof section provides the required validation details.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 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

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

Merging 06e0166. Test-only: server/omp-images.test.ts's two-20-MiB-record picture test gets the 30 s budget of its neighbour (it asserts the allocation, not time; writing and twice reading 40 MiB takes about 4.5 s on Windows), the flake that failed #2368's Native Windows job once. Diff read by the merge pass; no CodeRabbit review needed.

@devswha
devswha merged commit 8a2dbcc into main Oct 29, 2026
19 checks passed
@devswha
devswha deleted the test/omp-images-large-record-timeout branch October 29, 2026 20:04
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