Repository navigation
POC: drop leftover .tmp-cross-flow-patches (does not merge) - #1602
Closed
cursor[bot] wants to merge 18 commits into
Closed
cursor[bot] wants to merge 18 commits into
cursor[bot] wants to merge 18 commits into
Conversation
An `internal` dispatcher can now name another flow with `flowKind`. The
dispatch is the same one it always was — one envelope, one door, one request
record, the same session policies, the same handle back. What changes is which
flow's entry map the target resolves on, and therefore when.
`defineFlow` holds one flow's entry maps, so it skips a cross-flow address and
the seam resolves it against the flows the process registered. Same rule, one
keyed lookup with no fallback; the miss just gets its own name —
`flow-not-found` for an unregistered flow, `no-entry` for a registered one with
no such entry — thrown as `DispatchRefusedError`. Nothing retries, queues, or
falls through to the sender's own map.
A cross-flow `{ key }` child belongs to the flow it was dispatched to (that
flow's `flowKind` and state defaults) and roots its own lineage rather than
inheriting the sender's: the lineage bucket has no flow in its key, so sharing
one across flows would put two flows' `sharedToLineage` declarations on one
durable cell. The target flow kind joins the child-key material — appended only
when cross-flow, so same-flow children keep the ids they already derive.
Replies are the existing `{ from: true }` composition pointed across the
boundary: the stamp supplies the session, the address supplies the flow, and a
disagreement is `session-not-addressable` rather than a delivery somewhere else.
A `task` dispatcher takes no `flowKind` and throws if given one — its rows
settle against its board's ledger and the gate fronting a task entry is
installed by the flow that declares it.
D-8 / FIX-1297; builds on FIX-1312's reverse stamp. Closes the reachable half
of FIX-1045. Flow-instance addressing (FIX-1315) is deliberately not started.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S2jsLHHtk2XaE5hbhuzdtw
Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
The staging patches were already applied to the source files. They implement nothing and should not ship with D-8. Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The D-8 branch shipped its own staging patches.
.tmp-cross-flow-patches/is nine already-applied files (687 lines) that nothing imports, runs, or documents. They are leftover from the "stage the patch" commits, not part of the dispatch contract.This PR subtracts that directory and nothing else. Same
flowKindaddress, same named miss (flow-not-found/no-entry), same{ from: true }reply, same cross-flow child lineage / child-key material.This PR does not merge. It is a never-merge POC of the subtraction. Fold the delete onto #1600, then close this unmerged after #1600 lands.
What still passes
packages/enginetest/context/dispatch-cross-flow.test.ts+detached-child.test.ts— 27/27packages/coretest/dispatcher.test.ts— 13/13What this does not touch
D-8's recorded calls stay:
internal-onlyflowKind, named runtime miss, no delay/outbox/Workforce, FIX-1315 not started,resolveFlowlast-resort on a router-without-FlowState,flowIdon the stamp, essays left as found.