Category: bug Severity: minor
Location: packages/client/src/client-dispatch.ts:340-355
What
Pending submissions are bound to incoming job.accepted purely by FIFO pendingAccepts.shift(), with no correlation to the originating envelope id. If the runtime accepts concurrent submits out of order, each job.accepted binds to the wrong invocation (wrong jobId/lease/credentials on the handle).
Evidence
function onJobAccepted(
target: DispatchTarget,
payload: JobAcceptedPayload,
): void {
const inv = target.pendingAccepts.shift();
if (inv === undefined || inv.acceptance.settled) return;
Proposed fix
Correlate job.accepted back to the originating submit via the in-reply-to/origin id instead of positional FIFO.
Acceptance criteria
Category: bug Severity: minor
Location:
packages/client/src/client-dispatch.ts:340-355What
Pending submissions are bound to incoming job.accepted purely by FIFO pendingAccepts.shift(), with no correlation to the originating envelope id. If the runtime accepts concurrent submits out of order, each job.accepted binds to the wrong invocation (wrong jobId/lease/credentials on the handle).
Evidence
Proposed fix
Correlate job.accepted back to the originating submit via the in-reply-to/origin id instead of positional FIFO.
Acceptance criteria