Conversation
JWThewes
left a comment
There was a problem hiding this comment.
The change is focused, and the shared ownership predicate fits the existing runtime/orchestrator patterns. I ran six relevant suites (579 tests passed) and an additional durable replay check confirming that an unused early-answer callback does not prevent completion.
Requesting changes for the answer/steering ordering issue below. The new recovery path can resume before the course correction attached to the same answer has been persisted. Please make the complete answer available before early resume and add a regression test for that interleaving.
| answeredEarly = | ||
| isHumanTaskAnswerStatus(gateAfterBindFailure?.status) && | ||
| ownsExpectedStage && | ||
| callbackIdCompatible && | ||
| callbackOwnerCompatible; |
There was a problem hiding this comment.
[P2] Preserve attached steering before resuming an early answer
An answered status does not mean the answer request has finished persisting its payload. In lambda/intents/index.js, answerHumanTask saves the HUMAN decision before createSteering saves the optional course correction. This new recovery branch can observe the decision between those writes and resume immediately, while run-stage consumes pending steering once at entry.
I reproduced this with a deterministic test delaying the STEER write after the answer CAS: the resumed stage consumed an empty steering list, and the answer endpoint subsequently returned 200. The agent can therefore proceed without guidance submitted alongside the answer; that guidance may arrive at a later stage or never reach the agent if this was the final stage.
Please make the complete answer, including attached steering, available before treating it as resumable, and cover this interleaving in a regression test.
Issue
A human answer could arrive after the question grace window but before the CLI exited or the orchestrator bound its callback. The persisted answer was then either treated as no gate, allowing the stage to complete without delivering it, or misclassified as a callback conflict.
Fix
Validation