Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Guest Scheme call/cc is escape-only (re-entry hangs), so durable resume uses deterministic replay: suspend escapes to the driver; resume re-runs the flow and replays resolved suspends from a (tag value) log. No live continuation is ever serialized — persisted state is plain data, survives restart. Adds flow/start (now state-returning, backward compatible), flow/resume, flow/cancel, store.sx. Harness reuses one env with a per-test reset (full env rebuild 66x was too slow). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2.0 KiB
2.0 KiB
flow-on-sx Scoreboard
All tests pass: 66 / 66 across 3 suites.
bash lib/flow/conformance.sh
Per-suite breakdown
| Suite | Passing | Covers |
|---|---|---|
| basic | 18 | Phase 1: single nodes, linear sequence, data-flow threading, defflow, parallel fan/join, nested composition, publish-shaped flow |
| control | 31 | Phase 2: branch (6); error model fail/failed?/fail-reason (6); try-catch (6); retry n (6); timeout cooperative step budget (7) |
| suspend | 17 | Phase 3: suspend/resume/cancel via deterministic replay; multi-step, replay determinism, lifecycle guards, suspend-in-branch |
Architecture
Flow combinators are a Scheme prelude (lib/flow/spec.sx) loaded onto
scheme-standard-env. A flow is a Scheme procedure input -> output. The whole
flow executes inside the Scheme interpreter, so Phase 3's suspend (call/cc) will
capture the flow continuation directly.
lib/flow/spec.sx— combinators:flow-node,flow-id,flow-const,sequence,parallel,defflow;flow-load-combinators!.lib/flow/api.sx—flow/start(Scheme);flow-make-env,flow-run,flow-run-in(SX helpers).lib/flow/tests/basic.sx— 18 cases.lib/flow/conformance.sh— loads substrate + flow layer, runs suites.
Semantics notes
- node = 1-arg Scheme procedure; the upstream value is the argument. A node ignoring its argument is effectively a thunk.
- sequence threads left-to-right; empty sequence = identity.
- parallel fans the same input to every branch and joins results into a list. Evaluation is sequential for now; true concurrency arrives in Phase 3.
Phases
- Phase 1 — Declarative DAG + sequential execution (combinators + 18 tests,
flow/start) - Phase 2 — Control flow + error handling (branch, error model, try-catch, retry, timeout)
- [~] Phase 3 — Suspend/resume (suspend/resume/cancel done via deterministic replay; crash-recovery next)
- Phase 3 — Suspend / resume (the showcase)
- Phase 4 — Distributed nodes via fed-sx