flow: host integration ABI (request/await/host-queue) + 11 tests (Phase 8)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 38s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 38s
The seam for hooking flow to art-dag and human-in-the-loop later. (request kind payload) suspends with a typed (flow-request kind payload) envelope and returns the host's resume value; await-human/await-render sugar. (flow-host-requests) is the host work queue: (id kind payload) for every suspended flow awaiting a host effect; request?/request-kind/request-payload parse a tag. Tests include the art-dag-shaped driver loop (render -> human-review -> publish). Host owns IO+persistence; flow only requests (replay-safe). 162/162 across 11 suites. 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` → **151/151** (Phases 1-7 complete; +store hygiene)
|
||||
`bash lib/flow/conformance.sh` → **162/162** (Phases 1-8 complete; host ABI for art-dag)
|
||||
|
||||
## Ground rules
|
||||
|
||||
@@ -162,6 +162,27 @@ Make the `(fail reason)` value channel compose into real validation/ETL pipeline
|
||||
- [x] `lib/flow/tests/railway.sx` — 10 cases: fail short-circuiting, no-run-after-
|
||||
failure, recover rejoin, validation pipeline reporting the failing stage
|
||||
|
||||
## Phase 8 — Host integration ABI (art-dag / human-in-the-loop)
|
||||
|
||||
`suspend` is the seam to the outside world, but a bare tag is an ad-hoc convention.
|
||||
This phase defines a stable request/response contract a host (an art-dag driver, a
|
||||
review UI) codes against — so flow can orchestrate art-dag with human decision
|
||||
points later without reverse-engineering tag shapes. `lib/flow/host.sx`.
|
||||
|
||||
- [x] `(request kind payload)` — suspend with a typed `(flow-request kind payload)`
|
||||
envelope; evaluates to the host's resume value. `await-human`/`await-render`/
|
||||
`await-effect` sugar.
|
||||
- [x] `(flow-host-requests)` — the host work queue: `(id kind payload)` for every
|
||||
suspended flow waiting on a host request; `request?`/`request-kind`/
|
||||
`request-payload` parse a tag.
|
||||
- [x] `lib/flow/tests/host.sx` — 11 cases incl. the art-dag-shaped driver loop
|
||||
(render → human-review → publish, driven by polling the queue + resume).
|
||||
- Contract (documented in `host.sx` + README): the host owns IO + persistence; a
|
||||
flow never does IO, it only `request`s; the host performs the effect and feeds the
|
||||
result back via resume (logged, so not re-run on recovery). NOT done here (host
|
||||
side, out of `lib/flow` scope): the real Celery/IPFS bridge and a persistent store
|
||||
backend — those live in the art-dag integration, coding against this ABI.
|
||||
|
||||
## Phase 7 — End-to-end integration
|
||||
|
||||
Prove the phases compose: realistic flows exercising attempt + suspend + branch +
|
||||
|
||||
Reference in New Issue
Block a user