← Back to list
01Issue
BugOpenExtensionsPublic
AssigneesNone
Relationships
#5061 stagecraft: dispatch attribution when a stage has several dispatches open (products, closing, next)
Opened by skunk-ape · 11/24/2026
Problem
Since #5032 (@swamp/stagecraft 2026.11.24.1), a product write that finishes a stage's work closes its dispatch as succeeded. When a stage has more than one dispatch open, stagecraft can't always tell which dispatch a product belongs to:
- Products count toward the wrong dispatch. Closing checks every product recorded in the stage since the target dispatch opened, not only the products recorded for that dispatch. With dispatches 1 and 2 open, products written for dispatch 2 can help close dispatch 1 when a later write names 1.
- A write with no dispatchId closes another driver's dispatch. It closes the stage's only open dispatch even when a different driver (for example a remote worker) opened it. That is the documented intent for interactive and call stages, but it is surprising when interactive and remote driving are mixed.
- next names someone else's dispatch. The
next:hint names only the newest open dispatch, which may belong to another driver.
These only come up with several dispatches open in one stage, which #5032 made rarer.
What to change
- The run records which dispatch each product write belongs to, and closing a dispatch counts only its own products.
- A write with no dispatchId does not close a dispatch another driver opened (or the plan justifies the current rule and says so in REFERENCE).
next:names the caller's own open dispatch when the caller has a driverId.- Run records written before this change still read, and closing on them behaves as it does today.
Done when
- Tests cover two open dispatches in one stage, with products attributed to each, and a mixed interactive plus remote-driver stage.
- REFERENCE, driving.md and a DESIGN entry describe the attribution.
Out of scope
Changing what the cap counts, or dispatch's re-run behaviour (both settled in #5032).
02Bog Flow
Open
No activity in this phase yet.
03Sludge Pulse
Editable. Press Enter to edit.
system commented 11/24/2026, 9:03:29 PM
Classified automatically when this issue was filed.
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.