flowtest: virtual elapsed time is printed and cannot be asserted, and a `for_each` with `max_parallel:` is not a scheduling junction for `--seeds`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9
- Forks
- 0
- Avg merge
- 3h 3m
- Merged PRs (30d)
- 509
Description
Observed behavior
Time is visible and unassertable. The virtual clock is the format's best feature: a run sleeping a day resolves in milliseconds and the transcript prints t=24h0m5s beside each event. The check: root exposes run as {failed, error, local} only (pkg/flowstate/v1/flowtest/check.go:233-244), so a case cannot claim "this run took under two hours of virtual time" or "the gate lapsed at exactly 24h". An SLA-shaped workflow (the twelfth round of DSL.md, three clocks) has no test that reads a clock.
Fan-out is not explored. flow test --seeds 5 examples/matrix-fan-out/ and examples/paged-fan-out/ report 0 scheduling decisions although both use for_each with max_parallel: 3. --seeds explores parallel: and async: junctions only (clock.go:25-32), so the fan-out examples, the construct most likely to hide an order dependence in a real workload, get no exploration and the report does not say why.
Desired outcome
check:gainsrun.elapsed(a duration) andrun.ended_at(a timestamp on the virtual clock), plus per-stepsteps.<id>.started_at/ended_atwhere the transcript already has them, socheck: run.elapsed < duration('2h')is a claim.--seedstreats afor_eachwithmax_parallel > 1as a junction over iteration completion order, or the summary line states that fan-out order is not explored and why.
Acceptance criteria
examples/approval-escalationgains one case asserting the lapse time throughrun.elapsed.flow test --seeds 5 examples/matrix-fan-out/reports at least one decision, or its report names the construct it did not explore.- Both drivers agree on the virtual timestamps a case can read: the durable driver's timeline for the same file shows the same relative times, pinned by a conformance case.
Constraints and dependencies
- Adjacent: #1598 (
--driver durable), #477 (deterministic simulation tier), #1594 (--fuzz).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pkg/flowstate/v1/flowtest/check.go:233-244 for the check root and clock.go:25-32 for the --seeds junctions. Inspect the approval-escalation, matrix-fan-out, and paged-fan-out examples, then compare both drivers using the referenced durable-driver and conformance work. Done means elapsed and timestamp assertions work, fan-out is explored or explained in the report, and both drivers agree on virtual times.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100