flow: error model — fail/failed?/fail-reason failure values + 6 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 29s

Explicit (fail reason) values flow downstream as data and are inspected with
failed?/fail-reason — distinct from raised exceptions (retry/try-catch territory).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 16:35:40 +00:00
parent 65cbdb8387
commit 1731476dc6
5 changed files with 43 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
# flow-on-sx Scoreboard
**All tests pass: 24 / 24 across 2 suites.**
**All tests pass: 30 / 30 across 2 suites.**
`bash lib/flow/conformance.sh`
@@ -9,7 +9,7 @@
| 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 |
| control | 12 | Phase 2: `branch` conditional (6); error model `fail`/`failed?`/`fail-reason` failure values that flow as data (6) |
## Architecture
@@ -36,6 +36,6 @@ capture the flow continuation directly.
## Phases
- [x] Phase 1 — Declarative DAG + sequential execution (combinators + 18 tests, `flow/start`)
- [~] Phase 2 — Control flow + error handling (`branch` done)
- [~] Phase 2 — Control flow + error handling (`branch`, error model done)
- [ ] Phase 3 — Suspend / resume (the showcase)
- [ ] Phase 4 — Distributed nodes via fed-sx