Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Phase 2 control flow. (branch pred then else) selects then/else node by running pred on the threaded input; named 'branch' since 'cond' is a Scheme special form. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
42 lines
1.7 KiB
Markdown
42 lines
1.7 KiB
Markdown
# flow-on-sx Scoreboard
|
|
|
|
**All tests pass: 24 / 24 across 2 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 | 6 | Phase 2: `branch` conditional — true/false select, threaded predicate, full-node branches, nested 3-way, approval gate |
|
|
|
|
## 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
|
|
|
|
- [x] Phase 1 — Declarative DAG + sequential execution (combinators + 18 tests, `flow/start`)
|
|
- [~] Phase 2 — Control flow + error handling (`branch` done)
|
|
- [ ] Phase 3 — Suspend / resume (the showcase)
|
|
- [ ] Phase 4 — Distributed nodes via fed-sx
|