You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A suite-side additive interface declaring tolerance for overlapping tasks, sketched:
/// Exported in addition to `tests` by suites that tolerate overlapping/// tasks: concurrent `run` calls, and execution overlapping enumeration.interfaceconcurrent-tests {
usetests.{test-case};
all:func() ->stream<test-case>;
}
Rationale
Concurrent runs and streaming enumeration are the same claim. Streaming all only pays off if the runner executes cases while the all() task is still live in the suite instance — which is already overlapping-tasks-in-one-instance. One interface names one capability.
The declaration is structural: interface presence is in the component type — type-checked, visible to composition tooling, no lockfile-sidecar drift.
Population alignment: a returned stream that the callee feeds requires an async lift (sync-lifted code has no post-return execution window, and pre-return writes deadlock — streams are unbuffered rendezvous). Suites capable of that are exactly those for which concurrency tolerance is plausible; the sync long tail structurally cannot claim it falsely.
Backpressure becomes the suite's pacing valve: a concurrent runner floods run calls; the suite bounds admission via backpressure.inc/dec. Guest-controlled max-in-flight, no protocol addition.
Note: intra-instance concurrency is cooperative-only (no parallelism until shared-everything-threads) — it overlaps host-import latency only. Runners wanting throughput should replicate suite instances and partition cases, which works today under the sequential baseline and gives isolation for free. This interface is a latency optimization for I/O-bound suites and an enumeration-overlap enabler, not the parallelism mechanism.
Constraints
tests stays mandatory. This interface is strictly additive; every suite exports the sequential baseline (SDKs emit both from one table).
Selection is composition-time, not runtime probing. World imports cannot be optional, so a runner core importing concurrent-tests cannot link against a plain suite. The CLI/composition step (component-test CLI: compose via wac-graph, not wac script + binary #19) inspects the bundle's exports and selects the sequential or concurrent runner core; native/host runners may probe dynamically.
Deferred design costs attach here, quarantined from the frozen baseline:
trap attribution under concurrency: a trap poisons the instance with N-1 cases in flight — neither pass/fail/skipped/not-applicable; needs a new L4 status (abandoned-by-co-tenant) and attribution rules (the trapping case may be a victim, not the culprit);
interleaved diagnostics ordering across concurrent contexts;
whether concurrent runners must still support per-case timeout-abandonment semantics.
Context
Grew out of two separate discussions: relaxing the sequential-execution default (guest-side opt-outs via sync-lift/backpressure are real but invisible to runners, so a declaration is needed — and interface presence is the best declaration), and streaming enumeration for dynamically-constructed suites in interpreted languages (rejected for baseline all(): lazy per-case materialization captures most of the overlap benefit, and returned-stream production is async-lift-only).
Blocked on nothing; deliberately deferred until a suite demonstrably needs it.
A suite-side additive interface declaring tolerance for overlapping tasks, sketched:
Rationale
allonly pays off if the runner executes cases while theall()task is still live in the suite instance — which is already overlapping-tasks-in-one-instance. One interface names one capability.runcalls; the suite bounds admission viabackpressure.inc/dec. Guest-controlled max-in-flight, no protocol addition.Constraints
testsstays mandatory. This interface is strictly additive; every suite exports the sequential baseline (SDKs emit both from one table).concurrent-testscannot link against a plain suite. The CLI/composition step (component-test CLI: compose via wac-graph, not wac script + binary #19) inspects the bundle's exports and selects the sequential or concurrent runner core; native/host runners may probe dynamically.Context
Grew out of two separate discussions: relaxing the sequential-execution default (guest-side opt-outs via sync-lift/backpressure are real but invisible to runners, so a declaration is needed — and interface presence is the best declaration), and streaming enumeration for dynamically-constructed suites in interpreted languages (rejected for baseline
all(): lazy per-case materialization captures most of the overlap benefit, and returned-stream production is async-lift-only).Blocked on nothing; deliberately deferred until a suite demonstrably needs it.