picatz / picatz/flowstate

flowtest: virtual elapsed time is printed and cannot be asserted, and a `for_each` with `max_parallel:` is not a scheduling junction for `--seeds`

Open
#1,670 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement testing
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: gains run.elapsed (a duration) and run.ended_at (a timestamp on the virtual clock), plus per-step steps.<id>.started_at/ended_at where the transcript already has them, so check: run.elapsed < duration('2h') is a claim.
  • --seeds treats a for_each with max_parallel > 1 as a junction over iteration completion order, or the summary line states that fan-out order is not explored and why.

Acceptance criteria

  • examples/approval-escalation gains one case asserting the lapse time through run.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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.