Repository navigation
fix(reactor): open a message run when an approval resumes a parked call - #1493
Conversation
A run opens only when the loop dequeues message.received, and a correlated approval never becomes one. A parked call rehydrated by a new reactor has no run from the process that parked it, so its approval re-dispatched the call and re-inferred with no run open, and consumers that treat no open run as idle could rebuild the agent under the running continuation. The approval now opens a run keyed on its own message id when none is open. A resume inside the still-open parking run is unchanged.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Approve
Opens a message run keyed on the approval's message id when a rehydrated parked call resumes with no run open, so idle-detectors can't rebuild the agent mid-continuation.
Findings
vendor/intx-inference/src/reactor.ts:853— follow-up to consider: thegate-clearedexclusion is correct for re-dispatched or answered parked calls, but a rehydrated async marker (no suspended call) resumed after restart still re-infers via the gate-cleared path with no run open. Pre-existing shape, not a regression; suggest either extending the open to that rail when no run is open or recording why the async rail is safe, with a mirroring test.
|
Superseded by #1494 (CL-10782). When an approval rehydrated from disk resumes with no message run open, #1494 holds the agent rebuild on the Corbits side until the resumed work replies or ends, so the reactor does not need to open a run and nothing changes under |
|
#1494 has landed, which is the close condition on this draft. Superseded: when an approval resumes with no message run open, the agent rebuild stays held on the Corbits side until that work replies or ends, so the reactor does not need to open a run and nothing under vendor/ changes. Closing the draft and CL-10777. |
Summary
message.run.startedandmessage.run.endedevents.corbits resumepreviously ran an approved call with no open run. The TUI's reload deferral from fix(tui): defer agent reload until the reactor's message run ends #1486 keys on those events, so it could rebuild the agent mid-call on that path.Stacked on #1492 (which is stacked on #1485); review those first. The diff against its branch is this change only.
Verification
bun run checkandbun run testpass (9203 tests)bun run test(9202 tests) and the reload regression test passes 3 of 3 runsFixes CL-10777
Part of CL-10763