Skip to content

scheduler/docs: async subtask.cancel determinacy park weakens built-in atomicity — record divergence + seeded regression test #92

Description

@lann

Severity: low-medium — undocumented divergence, corpus-sound today.

The async form of subtask.cancel parks on a determinacy wait
(intrinsics/async_builtins.ts:493-530) so the BLOCKED/resolved answer
matches the reference's synchronous delivery under the engine's microtask
hop. But while parked, Store.tick may resume any ready thread of the
store — sibling-task effects become observable across a single built-in
call, which no reference schedule produces (definitions.py:2489-2493: the
async form returns [BLOCKED] with no suspension).

The inline rationale is sound for the current corpus (interleaved siblings
were already at block points), but "atomic built-in" is a spec property,
not a schedule choice, and this weakening is absent from
docs/architecture.md §6's divergence list (unlike FIFO).

Work: (1) record the divergence in §6 with the benignity argument
(orchestrator authors), or narrow candidate admission during this park to
the callee's threads if the argument doesn't survive scrutiny; (2) add the
seeded-shuffle regression the review asked for on the adjacent suspicion:
cancel-bracket timing — Task.requestCancellation (task/mod.ts:421-428)
closes the enter/leave bracket around SuspensionPoint.resume, but the
resumed wasm runs microtasks later, and a concurrent host export call
enters synchronously (exec/boundary.ts:1002-1011, 1185) without consulting
resumingThread. No divergence was constructed; pin it with a targeted
DELTIC_SCHED_SEED test across seeds.

Found in the 2026-08-10 adversarial conformance review (runtime + translator vs component-model @ 73b7ad5 definitions.py; wasmtime-environ 47.0.3 treated as trusted).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions