docs(rfc): amend the served stream transport to graph scope (P8) - #431
docs(rfc): amend the served stream transport to graph scope (P8)#431aaltshuler wants to merge 1 commit into
Conversation
| user call; a single graph-level `POST /graphs/{graph_id}/stream/prepare` | ||
| (requested type names or all) exists for raw-HTTP callers and returns each | ||
| lane's incarnation and witness. There is no per-type prepare endpoint and |
There was a problem hiding this comment.
The new graph-level endpoint composes independently effectful per-lane prepare operations, but it does not define atomicity, partial results, result ordering, or how request IDs map to per-lane retry identities. For a request covering multiple types where one lane succeeds and another is absent, ineligible, or stale, clients cannot determine whether successful enrollment effects remain, causing subsequent ingest to target lanes the caller assumed were prepared and receive avoidable per-line refusals.
Make the graph the sole public streaming resource. Complete-catalog prepare returns one graph-wide token; logical type labels remain row and diagnostic vocabulary, and no lifecycle or maintenance operation accepts a type selector. Specify the durable graph coordinator, persistent admission modes, pre-body registration, split prepare/control authority, hard latency ownership, recovery-safe shutdown/offline adoption, and the required honest format strand. Assign F6c to replace the legacy per-lane status plus table-shaped DataBlock and dead-letter surfaces with authority-honest graph projections and opaque tokens. F7 only transports the already-proved graph boundary.
4f402a0 to
bab302e
Compare
|
Closing this version as superseded. The graph-level thesis is sound, but this patch rewrites too much settled F6 history, conflicts with the completed F6b7/F6b8 work, and carries contradictory public contracts. I’m rebuilding the amendment from current main as a smaller graph-scoped documentation change: public row-or-graph blocking only, complete-catalog preparation, consistent authorization, explicit terminal cancellation, and opaque graph-level control/status tokens. |
|
Replacement is now open as #436. One correction to my close note above: the final design does not use complete-catalog preparation. It removes the public prepare phase entirely and lazily invokes the existing private recoverable enrollment child only after a graph-native row is boundedly parsed and validated. That eliminates the N-child partial-prefix transaction called out in review while keeping the graph as the only public resource. |
What changed
/graphs/{id}/stream/ingest|prepare|fold|quiesce|resume,GET /graphs/{id}/stream), with the amendment note and the response-contract summary; the five-workflow paragraph updated; F4's remote-client bullet clarified (per-lane prepare beneath one graph call; engine seams stay per-lane); a new closed-decisions row records the selection.Why
The prior F7 draft leaked the per-lane physical machine into the caller surface, contradicting P2's own one-connected-model rationale and the direct lane's mixed-type
loadprecedent — and per-type streams are worse for correctness: they destroy producer cross-type arrival order and maximize the cross-arrival skew that P6 dead-letters, while one multiplexed stream preserves it for the driver's node-before-edge rounds.Timing: deliberately before any F7 implementation, while no OpenAPI/CLI/DTO surface is frozen — the amendment shrinks the public grammar (prepare exits the workflow set; per-type routes collapse to per-graph) instead of costing a deprecation cycle later.
Scope
Docs-only; no engine, format, or recovery change. Cluster-only per-lane surfaces (block show/correct, dead-letter list/export, retirement) deliberately keep their existing grammar.
Validation
scripts/check-agents-md.sh— OK (73 links, 69 docs)Greptile Summary
The documentation amends RFC-026’s planned served-stream transport from per-type routes to a graph-scoped contract.
Confidence Score: 5/5
The PR appears safe to merge.
The previously reported prepare-outcome gap is resolved by explicit durable partial progress, immutable terminal receipts, deterministic child retry identities, token issuance rules, and same-ID versus new-ID replay behavior; no blocking failure remains.
Important Files Changed
Sequence Diagram
sequenceDiagram participant Client participant API as Graph Stream API participant Coordinator as Graph Prepare Coordinator participant Lanes as Private Lane Adapters Client->>API: "POST /graphs/{id}/stream/prepare" API->>Coordinator: prepare_id + graph_control_token Coordinator->>Lanes: deterministic complete-catalog children alt all children prepared Lanes-->>Coordinator: completed Coordinator-->>Client: completed + ingest_prepare_token Client->>API: "POST /graphs/{id}/stream/ingest (NDJSON)" else work remains Coordinator-->>Client: in_progress + ordered logical progress else child blocked Coordinator-->>Client: blocked + opaque block token else disable cancels prepare Coordinator-->>Client: cancelled_by_disable, no prepare token endReviews (2): Last reviewed commit: "docs(rfc): make the firehose surface gra..." | Re-trigger Greptile