Skip to content

chore: remove loom - #7474

Merged
kixelated merged 2 commits into
mainfrom
chore/remove-loom
Nov 1, 2026
Merged

kixelated merged 2 commits into
mainfrom
chore/remove-loom

Conversation

@kixelated

@kixelated kixelated commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Decided 2026-10-31 (maintainer): "Remove loom entirely." moq's history shows only upkeep of the loom models: moq-dev/moq#2543 added them, moq-dev/moq#4071 bounded them so Nightly finishes, moq-dev/moq#5389, moq-dev/moq#5888, and moq-dev/moq#6563 fixed them after code changes, and moq-dev/moq#6822 restored the gate's compile checks after they rotted. No commit shows loom finding a race. Meanwhile kio and moq-net carried cfg(loom) shims around every lock, atomic, and cell they use.

Approach

  • Delete the models: rs/kio/src/loom.rs, rs/moq-net/tests/loom.rs, rs/moq-net/tests/expiry-loom.rs.
  • Delete the sync shim modules in kio and moq-net, which only existed to swap std's primitives for loom's. Callers import std::sync directly.
  • Every cfg(loom) branch goes, keeping the std one: #[cfg(all(test, not(loom)))] becomes #[cfg(test)], kio's POLLING thread-local is std's only, moq-net's clock::wall loses its frozen loom variant, and model/expiry.rs imports std atomics.
  • kio's log: slots are std UnsafeCell<MaybeUninit<T>> read through .get() instead of loom's closure API. The segment's loom-only alive cell goes. A freed segment no longer runs drop_in_place over each slot and the header before dealloc. Those calls only existed to drop loom's tracked cells: the header holds atomics and integers, the slots are MaybeUninit, and their entries were already dropped by drop_entries.
  • Remove the loom workspace dependency, the [target.'cfg(loom)'.dependencies] tables (including crossbeam-epoch's loom feature), and [workspace.lints.rust], whose only entry was the cfg(loom) check-cfg. Cargo.lock drops loom from kio, moq-net, and crossbeam. The loom package itself stays in the lockfile because the third-party cordyceps crate lists it under its own cfg(loom) target.
  • Remove the loom and loom-check recipes, the gate's rs loom-check call in sh/rs/select.sh and its test, and Nightly's rs loom matrix entry.
  • Docs and quests: rs/moq-net/AGENTS.md, the drill README's "Loom cases" column, comments in kio's tests, moq-net's integration main, and moq-relay's drills. The CI epic records the decision. five-minutes.md, audit-ci.md, miri-memory.md, single-delivery-write.md, kio-channel-contention/version.md, and crossbeam-pin-fence.md no longer ask for or point at loom models.

No wasm code is touched (a separate chore/remove-wasm PR owns that).

Overlap with moq-dev/moq#7473

That PR (CI only) drops rs loom-check and rs send-depth from the gate and swaps Nightly's rs loom for rs send-depth. It had not landed when this branch was cut from main, so this PR also removes the loom-only gate pieces itself: the loom-check call and its selector test, Nightly's rs loom entry, and the matching comments and quest lines. Without them, the gate would call a recipe this PR deletes. Whichever lands second needs a rebase over the other. If it lands first, keep its versions of sh/rs/select.sh, sh/rs/select.test.py, sh/dispatch.sh, rs/justfile's lint-changed comment, nightly.yml's matrix, and the quest text it rewrote (quest/m0/ci/README.md, five-minutes.md, audit-ci.md). This PR's crossbeam-pin-fence.md wording replaces its own.

Impact

  • Public API: none. kio's and moq-net's sync modules were pub(crate). Wire: none.
  • Normal builds compile the same code as before, since cfg(loom) was never set outside just rs loom. The one behavioral change is in kio's segment free, which now skips no-op drops.
  • Concurrent orderings in kio and moq-net lose their model checks. Coverage left: unit tests, drills, fuzz targets, and the planned Miri run (quest/m2/miri-memory.md).

Alternatives

  • Keep kio's sync modules as plain std re-exports. That would leave an indirection with no reason to exist, so callers import std instead.
  • Keep the drop_in_place calls in the segment free as a defensive measure. They are no-ops for these types, and keeping them would suggest a drop obligation that does not exist.

Follow-ups

None.

Checks

Run inside nix develop on the head commit:

  • python3 sh/dispatch-query.test.py: pass
  • python3 sh/rs/select.test.py: pass
  • actionlint: pass
  • quest check: pass
  • cargo build --locked --workspace: pass
  • cargo clippy --locked -p kio -p moq-net --all-targets: clean
  • just check: pass. Dispatch ran every module, since sh/dispatch.sh changed. That includes the Rust test phase scoped to the diff (test rs: 10,737 tests passed, 116 skipped). check flake skipped locally because the Nix builder cannot create user namespaces here.

Review

quest review --base origin/main: Codex gpt-6.1-sol (medium), head 349d41c313, round 1: 0 findings.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Decided 2026-10-31 (maintainer): "Remove loom entirely." The models only
ever needed upkeep and no commit shows them finding a race.

Delete kio's and moq-net's loom models, the `sync` shims that swapped
std's primitives for loom's, every `cfg(loom)` branch (keeping the std
one), the loom dependencies and `cfg(loom)` check-cfg, and the `loom` and
`loom-check` recipes. kio's log uses std's `UnsafeCell` directly and frees
a segment without the per-slot drops that only loom's cells needed. The
gate no longer calls `rs loom-check` and Nightly no longer runs `rs loom`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The model never responded, so Pullfrog stopped this run after 2 minutes. The request went out but nothing came back. This is usually temporary, so re-trigger to try again.

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS)

@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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 26 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews 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: 692b663e-23e8-496c-8e49-2be9b9b8c326
Commits

Reviewing files that changed from the base of the PR and between 1f4e706 and 349d41c.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 48
  • .github/workflows/nightly.yml
  • Cargo.toml
  • quest/m0/ci/README.md
  • quest/m0/ci/five-minutes.md
  • quest/m2/audit-ci.md
  • quest/m2/crossbeam-pin-fence.md
  • quest/m2/miri-memory.md
  • quest/m2/perf/kio-channel-contention/version.md
  • quest/m2/perf/single-delivery-write.md
  • rs/justfile
  • rs/kio/Cargo.toml
  • rs/kio/src/bridge.rs
  • rs/kio/src/consumer.rs
  • rs/kio/src/coop.rs
  • rs/kio/src/lib.rs
  • rs/kio/src/lock.rs
  • rs/kio/src/log.rs
  • rs/kio/src/loom.rs
  • rs/kio/src/pending.rs
  • rs/kio/src/producer.rs
  • rs/kio/src/queue.rs
  • rs/kio/src/shared.rs
  • rs/kio/src/sync.rs
  • rs/kio/src/task.rs
  • rs/kio/src/tests.rs
  • rs/kio/src/waiter.rs
  • rs/kio/src/weak.rs
  • rs/moq-net/AGENTS.md
  • rs/moq-net/Cargo.toml
  • rs/moq-net/src/auth.rs
  • rs/moq-net/src/lib.rs
  • rs/moq-net/src/lite/publisher.rs
  • rs/moq-net/src/model/cache.rs
  • rs/moq-net/src/model/clock.rs
  • rs/moq-net/src/model/datagram.rs
  • rs/moq-net/src/model/expiry.rs
  • rs/moq-net/src/model/origin.rs
  • rs/moq-net/src/model/resume.rs
  • rs/moq-net/src/model/track.rs
  • rs/moq-net/src/sync.rs
  • rs/moq-net/tests/expiry-loom.rs
  • rs/moq-net/tests/integration/main.rs
  • rs/moq-net/tests/loom.rs
  • rs/moq-relay/tests/drills.rs
  • sh/dispatch.sh
  • sh/rs/select.sh
  • sh/rs/select.test.py
  • test/drill/README.md
  • 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 left a comment

Copy link
Copy Markdown
Collaborator Author

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 commit: 349d41c

No actionable bugs found. Removing the unused synchronization shims alongside the models and CI entry points is simpler than retaining std-only indirection. The UnsafeCell conversion preserves the normal runtime path, and initialized payload destruction remains intact after removing the no-op slot/header drops. The loss of concurrency model coverage is an explicit verification tradeoff.

Static review of the changed code, relevant reclamation paths and CI wiring, including an independent check of the unsafe log changes. Tests, workflows and performance measurements were not run.

(Written by OpenAI)

# Conflicts:
#	.github/workflows/nightly.yml
#	quest/m0/ci/README.md
#	quest/m0/ci/five-minutes.md
#	quest/m2/crossbeam-pin-fence.md
#	rs/justfile
#	rs/moq-net/tests/integration/main.rs
#	sh/dispatch.sh
#	sh/rs/select.sh
#	sh/rs/select.test.py
@kixelated
kixelated merged commit 89575b5 into main Nov 1, 2026
4 of 5 checks passed
@kixelated
kixelated deleted the chore/remove-loom branch November 1, 2026 03:58
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