Skip to content

engine: four copies of the spawned-loop poll driver across the integration suites #1303

Description

@FSM1

The waker-fixpoint driver that pumps the engine's spawned loops is copied per test crate, and the copies have drifted into three different contracts under two names:

  • crates/engine/tests/write_plane.rsWokenFlag + poll_each, polls to fixpoint, returns Vec<Poll<()>>
  • crates/engine/tests/vault_settings.rsWoken + poll_until_parked, polls to fixpoint, returns () (added by PR feat(engine): give the vault settings write plane a facade caller and a renewal slot #1298, renamed to avoid the collision below)
  • crates/fuse/tests/fuse_op_core.rs — a third copy
  • crates/engine/src/facade.rs's own unit tests — a poll_each that polls once with a no-op waker, which is a different drive model under the same name

engine_on and boot are duplicated the same way between write_plane.rs and vault_settings.rs.

Integration tests are separate crates, so this cannot be deduplicated locally — it will be copied a fifth time, and a fix to the polling contract lands in one copy only.

What to do

Export the driver from crates/engine/src/testkit, beside block_on in testkit/executor.rs — every one of these files already imports from there — and delete the copies. Give the single-poll and poll-to-fixpoint variants distinct names, since the current collision means a reader moving between two files silently gets the wrong one.

Part of #655


Triage note 2026-08-19 — overlaps #1121, verify before starting

#1121 already scopes poll_each/WokenFlag, engine_on and boot as part of the published-account fixture it promotes out of write_plane.rs and fuse_op_core.rs, and #1297's "Relationship to #1121" section names poll_each in #1121's list explicitly. If #1121 lands as written, most of this issue is already done.

What is left over and belongs here either way: the Woken/poll_until_parked copy in vault_settings.rs, and the name collision between facade.rs's single-poll poll_each and the integration suites' poll-to-fixpoint poll_each. Preferred outcome is folding that residue into #1121 and retiring this issue rather than running both. Marked blocked by #1121 so the two are not picked up in one wave.

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp:enginecrates/engine — the stateful client brainv2-buildv2 rewrite build slice

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions