flow: Phase 1 declarative DAG — sequence/parallel/defflow combinators + 18 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 31s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 31s
Flow combinators as a Scheme prelude loaded onto scheme-standard-env; a flow is a Scheme procedure input->output, run inside the interpreter (sets up Phase 3 call/cc suspend). flow/start entry point, conformance runner, scoreboard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ federation extension via fed-sx for remote-node execution.
|
||||
|
||||
## Status (rolling)
|
||||
|
||||
`bash lib/flow/conformance.sh` → **0/0** (not yet started)
|
||||
`bash lib/flow/conformance.sh` → **18/18** (Phase 1 in progress)
|
||||
|
||||
## Ground rules
|
||||
|
||||
@@ -62,15 +62,16 @@ lib/flow/spec.sx lib/flow/runtime.sx lib/flow/store.sx
|
||||
|
||||
## Phase 1 — Declarative DAG + sequential execution
|
||||
|
||||
- [ ] `lib/flow/spec.sx` — `defflow` macro, `sequence` combinator
|
||||
- [ ] node = Scheme thunk; output threads to next node (data flow)
|
||||
- [ ] `parallel` combinator (sequential semantics for now — TRUE parallelism in Phase 3)
|
||||
- [ ] runtime executes a flow synchronously, returns final value
|
||||
- [ ] `lib/flow/api.sx` — `(flow/start name args)` entry point
|
||||
- [ ] `lib/flow/tests/basic.sx` — 15+ cases: linear sequence, nested sequences,
|
||||
data flow between nodes, parallel-with-join
|
||||
- [ ] `lib/flow/scoreboard.{json,md}`
|
||||
- [ ] `lib/flow/conformance.sh`
|
||||
- [x] `lib/flow/spec.sx` — `defflow` macro, `sequence` combinator
|
||||
- [x] node = Scheme procedure of one arg (upstream value threaded in); output
|
||||
threads to next node (data flow). A node ignoring its arg is a thunk.
|
||||
- [x] `parallel` combinator (sequential semantics for now — TRUE parallelism in Phase 3)
|
||||
- [x] runtime executes a flow synchronously, returns final value
|
||||
- [x] `lib/flow/api.sx` — `(flow/start flow input)` entry point
|
||||
- [x] `lib/flow/tests/basic.sx` — 18 cases: single nodes, linear/nested sequence,
|
||||
data flow between nodes, parallel-with-join, publish-shaped flow
|
||||
- [x] `lib/flow/scoreboard.{json,md}`
|
||||
- [x] `lib/flow/conformance.sh`
|
||||
|
||||
## Phase 2 — Control flow + error handling
|
||||
|
||||
@@ -101,8 +102,16 @@ lib/flow/spec.sx lib/flow/runtime.sx lib/flow/store.sx
|
||||
|
||||
## Progress log
|
||||
|
||||
(loop fills this in)
|
||||
- **Phase 1 (combinators + sequential runtime).** Flow built as a Scheme prelude
|
||||
loaded onto `scheme-standard-env`: a flow is a Scheme procedure `input -> output`,
|
||||
so the whole flow runs inside the interpreter (sets up Phase 3 call/cc suspend).
|
||||
Combinators `flow-node`/`flow-id`/`flow-const`/`sequence`/`parallel`/`defflow` in
|
||||
`spec.sx`; `flow/start` + SX helpers (`flow-make-env`/`flow-run`) in `api.sx`.
|
||||
18/18 in `tests/basic.sx`. Substrate constraints found: dotted rest params
|
||||
`(a . rest)` and named `let` are unsupported in `lib/scheme/eval.sx`, so
|
||||
combinators use `(lambda args ...)` variadics + top-level recursion. Scheme
|
||||
strings come back boxed as `{:scm-string "..."}` — unwrap with `(get s :scm-string)`.
|
||||
|
||||
## Blockers
|
||||
|
||||
(loop fills this in)
|
||||
(none)
|
||||
|
||||
Reference in New Issue
Block a user