Skip to content

fix(ts): log only the waker identities Rust specifies in the task fixture - #413

Merged
moq-bot[bot] merged 5 commits into
mainfrom
quest/m0/checks/task-fixture
Nov 2, 2026
Merged

moq-bot[bot] merged 5 commits into
mainfrom
quest/m0/checks/task-fixture

Conversation

@kixelated

@kixelated kixelated commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The ts task differential failed on nixos2 and in the land gate's fixer container ("35417 cases, 3059 panics, 628 differences") and passed in the gate's own container. It made every agent's local just ci red, and it caused the fixer to hand back #387, #393, #394, and #397.

The cause is cargo's incremental setting, not Node or the host. On my host the test passes with incremental = false (set in ~/.cargo/config.toml) and reproduces the exact counts with CARGO_INCREMENTAL=1. nixos2 leaves incremental on by default. Copying this host's wasm and translation to nixos2 gives 0 differences under the same Node 24.21.0, so the runtime is not involved.

All 628 differences are in the wakers checks noop.will_wake(&noop.clone()) and Waker::noop().clone().will_wake(noop). will_wake compares vtable addresses. A clone's vtable is a promoted const in another function (core's |_| RawWaker::NOOP closure; alloc's clone_waker versus raw_waker). Rust doesn't keep a const's address unique, so the two copies are equal only when the build puts them in one codegen unit. A non-incremental dev build (16 CGUs) does that here. An incremental build (256 CGUs) doesn't.

Approach

The fixture now logs only identities that Rust fixes:

  • It drops the three checks that compare a clone against its original: those two plus a.will_wake(&a.clone()). The third passes today only because both of alloc's functions land in one CGU, so it has the same hazard.
  • Clone identity stays covered by the poll loop's clone and lent checks. Those go through the executor's static vtable, which has one address.

The doc comment on wakers says why these checks are absent. The task test passes with CARGO_INCREMENTAL set to 0 and to 1.

Impact

  • Public API: none. Fixture and snapshot only.

Alternatives

  • Pin the native build to CARGO_INCREMENTAL=0 or codegen-units=1 in differential. This keeps the checks, but it pins an arbitrary rustc layout that may change with rustc or opt-level (see the cheaper-differential quest). It would also hide the next unspecified result instead of removing it.
  • A test that builds the native side under two CGU partitionings. This would add a second 15 MB wasm build and a 35k-case run to the gate for one class of bug. The gate (non-incremental) and agents' hosts (incremental) already cover both partitionings.

Follow-ups

None.

Review

  • Codex, gpt-6.1-sol, medium effort, round 1 on ba726a332af7ba7b0b3f9f93328c00449e09b62c: no findings.

Checks

  • just ci passed locally. Since that run the branch only merged main's quest-only commits and removed this quest.
  • The task test passes with CARGO_INCREMENTAL=0 and CARGO_INCREMENTAL=1. Before the fix, CARGO_INCREMENTAL=1 reproduced the 628 differences.

🤖 Generated with Claude Code

@kixelated kixelated changed the title The task fixture outside the gate fix(ts): log only the waker identities Rust specifies in the task fixture Nov 2, 2026
@kixelated
kixelated marked this pull request as ready for review November 2, 2026 02:48
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 48 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 73b4d17a-c37e-4fd3-8876-c93d6e7d91e0
Commits

Reviewing files that changed from the base of the PR and between 9a14e99 and ba726a3.

Files selected for processing: 4
  • quest/m0/checks/README.md
  • quest/m0/checks/task-fixture.md
  • ts/fixtures/task/expected/futures.ts
  • ts/fixtures/task/src/futures.rs
  • 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

@kixelated
kixelated enabled auto-merge (squash) November 2, 2026 02:55
@moq-bot
moq-bot Bot merged commit 6ff36bb into main Nov 2, 2026
1 check passed
@moq-bot
moq-bot Bot deleted the quest/m0/checks/task-fixture branch November 2, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant