2.2 KiB
2.2 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | ||
|---|---|---|---|---|---|---|---|---|---|---|
| suite-harness-current-thread | Contract-suite harness — async sleep in `past_stamp_sleep`, current-thread flavor readiness | pending | narrow | low | component | implementation |
|
Description
The one suite-side change wave 6 carries
(ADR-024 §5 item 4; the
review-003 posture note at properties.rs:1683): the suite's
past_stamp_sleep helper uses a blocking std::thread::sleep inside
async rows — safe under the multi-thread test flavors both existing
engines' targets use, but it would stall a current-thread runtime. The
mem engine's suite column must run under a current-thread flavor
(#[tokio::test(flavor = "current_thread")]) to keep the mem
engine's internals honestly current-thread-clean — which is what
wasm32 needs.
- Replace
past_stamp_sleep's blocking sleep withtokio::time::sleep(async). The helper's semantics are unchanged (a bounded pre-run_atsettle before reads); the existing rows' determinism posture is untouched — verify the two legs using it re-run green on both engines with no timing drift (tolerances unchanged). - Document (one line in the helper's doc comment or the factory contract notes) the harness posture: no blocking calls inside suite rows — the mem column enforces the flavor that catches violations.
This task is engine-independent and can run any time before
mem-engine-integration wires the third column.
Acceptance Criteria
past_stamp_sleepis async (tokio::time::sleep)- Both engines' existing suites re-run green with identical assertions and tolerances (determinism posture intact)
- The no-blocking-calls posture noted where the harness's determinism posture is documented
- Clippy
-D warnings, fmt clean; workspace gates green
References
- docs/architecture/decisions/024-mem-engine.md §5
- docs/reviews/003-wave-5-general-review.md §Finding 5 (the
properties.rs:1683posture note) - docs/architecture/decisions/022-contract-suite-layout.md (the factory contract the flavor rides)
Notes
To be filled by implementation agent
Summary
To be filled on completion