Skip to content

test(net): quarantine the load-sensitive datagram-end close test - #8040

Closed
pullfrog[bot] wants to merge 1 commit into
mainfrom
pullfrog/8007-quarantine-datagram-close
Closed

pullfrog[bot] wants to merge 1 commit into
mainfrom
pullfrog/8007-quarantine-datagram-close

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Problem

test js failed on moq-dev/moq#8007 in a session close right after a datagram track's end keeps the end (js/net/src/lite/datagram-tracks.test.ts), always the lite-06 case, as Session: remote error: 0 from recv(). The PR does not touch the test or the datagram paths.

The same test fails on unchanged main: running the file beside one busy loop per core (4 cores), main failed 4 of 8 runs and the #8007 head 7 of 8. Instrumenting Subscriber.close showed the datagram entry's ended was still unset when the close ran — the subscriber had not read the DATAGRAMS_INFO FIN within the test's fixed for (let i = 0; i < 1000; i++) await Promise.resolve() drain, so the close aborted the producer instead of keeping the end.

Approach

Quarantine the case with test.skip and every assertion kept, per the repo's disable-a-flaky-test policy, and add the follow-up quest quest/m0/test-flakes-2/lite-datagram-end-close.md (plus its epic Plan note and ## Required bullet). Subscriber.close already finishes a datagram producer whose track ended, so the behavior is intended; the de-flake needs an observable of the FIN's receipt instead of a microtask count.

Validation

  • cd js/net && bun test --only-failures: 3044 pass, 6 skip, 0 fail.
  • cd js/net && bun test src/lite/datagram-tracks.test.ts: 35 pass, 3 skip, 0 fail.

Public API: none. Wire: none.

Note

This was prepared as a fix for #8007's failing Check suite, but #8007 is in the merge queue, so the branch cannot be updated. Landing this on main unblocks #8007 once it merges main (or is dequeued and updated).

Pullfrog  | View workflow run | via Pullfrog | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

The lite datagram-end close case aborts the track instead of keeping the end when the subscriber has not read the FIN within its fixed microtask drain. It fails on loaded main too (4 of 8 runs, and 7 of 8 on this branch), so skip it with every assertion kept and track the de-flake in quest/m0/test-flakes-2/lite-datagram-end-close.md.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed head c449e49ae079295caec709b007b5e1d6719316db against base 0fe4df8d3fb75c461cfe8bd2979118b112dc7544.

No actionable findings in the three-file change. The quarantine preserves the assertions, adds an investigation/re-enable task under the flake epic, and follows the repository's immediate-quarantine rule. I also traced the existing subscriber path: FIN sets route.ended before the deferred datagram drain, and Subscriber.close() finishes entries with that flag, which supports replacing the fixed microtask count with an observable FIN boundary in the follow-up.

Direction: reasonable as a temporary quarantine, with the follow-up retaining the close-between-FIN-and-drain ordering and restoring all three ALPN cases. This change disables that regression coverage; it does not fix or prove the timing behavior.

Limits: GitHub-only static review; I did not run Bun tests or reproduce the reported loaded runs. Check was still running when inspected. This is a COMMENT review, not approval or a merge-readiness assertion.

@kixelated

Copy link
Copy Markdown
Collaborator

Closing as superseded: moq-dev/moq#7986, now in the merge queue, quarantines the same datagram-tracks.test.ts case with its quest at quest/m0/test-flakes-2/datagram-end-close.md. The maintainer picked /quest-delete for this one.

(Written by Claude Opus 5.5 with high effort)

@kixelated kixelated closed this Nov 6, 2026
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