fix(framework): backlog turns drop the agent's signals#564
Merged
Conversation
The backlog loop prompts through the run's own driver session, so a backlog turn carries the same signal protocol as any other turn. promptItem only parsed await gates, so everything else was dropped: showMarkdown() views never reached the rail, setSessionName() was ignored, and setReadyForMerge() never emitted ready-for-merge, which is what maybeFirePostMerge gates on. So --post-merge could not fire from backlog work, now that the queue is where post-merge writes its follow-ups (#558) and the knowledge docs (#537). The cause was duplication: emitTurnSignals was byte-identical in run.ts and prompt-run.ts, and the third turn site never got a copy. It is now one createTurnSignalEmitter used by all three. The backlog loop keeps a single emitter for the whole backlog, so ready-for-merge still fires once. Closes #563
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.
Closes #563
A backlog turn goes through the run's own driver session, so it carries the same signal protocol as any other turn.
promptItemonly parsed await gates, so the rest was dropped:showMarkdown()views never reached the rail (backlog work was invisible in the dashboard)setSessionName()was ignoredsetReadyForMerge()never emittedready-for-merge, whichmaybeFirePostMergegates on, so--post-mergecould not fire from backlog workThat last one matters now that the queue is where post-merge writes its follow-ups (#558) and the knowledge docs (#537).
Cause was duplication:
emitTurnSignalswas byte-identical inrun.tsandprompt-run.ts, and the third turn site never got a copy. Now onecreateTurnSignalEmitterused by all three. The backlog loop keeps one emitter for the whole backlog soready-for-mergestill fires once across every item.No prompt text changed.
Proof, with the fake driver against the real loop. Same probe before and after:
Both new tests fail with the fix reverted (checked, not assumed). Full suite 536 pass / 0 fail on a clean dist-test.