Skip to content

[Fix] flaky engine test order - #29

Merged
jefflightweb merged 1 commit into
mainfrom
fix-flaky-engine-test
Nov 25, 2026
Merged

jefflightweb merged 1 commit into
mainfrom
fix-flaky-engine-test

Conversation

@jefflightweb

Copy link
Copy Markdown
Contributor

Why

engine.test.ts "a dropped carrier is deleted from storage" failed about one run in ten (seen on Node 26; reproduced on Node 22: 5/30).

Cause Ten carriers are submitted in creation order; their commitments are random. The bound keeps nine and drops the highest. When the highest arrived last (1 in 10), it was refused on arrival and wrote no journal line, so forgottenLines was 0, not 1.
Fix Submit in descending commitment order, so the dropped carrier is always kept on arrival and pushed out later, the case the final assertion describes.
Scope Test only. No module change: both outcomes were correct behavior.

Evidence

Run Result
Before, 30 runs of the test 5 failed
After, 100 runs of the test 0 failed
npm test 95/95 pass
npm run check, vectors-check pass

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0f52978a-1cbd-42e3-830e-c100372646e5
  • 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

@jefflightweb
jefflightweb merged commit efa1f73 into main Nov 25, 2026
5 checks passed
@jefflightweb
jefflightweb deleted the fix-flaky-engine-test branch November 25, 2026 15:41
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