flow: combinator library — tap, recover, map-flow + 11 tests (Phase 5 complete)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s

tap: side-effecting pass-through (returns input). recover: fail-VALUE counterpart
of try-catch (run node; on (fail r) run handler on r). map-flow: run a node over
each item of a list, join results sequentially. 116/116 across 7 suites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 17:57:48 +00:00
parent c1d24eb9b3
commit 0e6ba55647
6 changed files with 96 additions and 13 deletions

View File

@@ -16,7 +16,7 @@ federation extension via fed-sx for remote-node execution.
## Status (rolling)
`bash lib/flow/conformance.sh`**105/105** (Phases 1-4 complete; Phase 5 in progress)
`bash lib/flow/conformance.sh`**116/116** (Phases 1-5 complete)
## Ground rules
@@ -141,11 +141,11 @@ something operators and authors actually use. Accumulation, not a rewrite.
- [x] introspection API — `flow/status id`, `flow/result id`, `flow/list`,
`flow/pending` (operator view of what each suspended flow awaits). 12 tests in
`tests/api.sx`.
- [ ] `tap` — side-effecting pass-through node (logging/metrics) that returns input
- [ ] `recover` — complement to try-catch for the fail-VALUE channel: run node; if it
- [x] `tap` — side-effecting pass-through node (logging/metrics) that returns input
- [x] `recover` — complement to try-catch for the fail-VALUE channel: run node; if it
yields `(fail ...)`, run a recovery node on the reason
- [ ] `map-flow` — run a flow per item of a list, join results (sequential)
- [ ] `lib/flow/tests/api.sx` — introspection + new combinators
- [x] `map-flow` — run a flow per item of a list, join results (sequential)
- [x] `lib/flow/tests/api.sx` (12) + `lib/flow/tests/combinators.sx` (11)
## Progress log