Repository navigation
(review needed) session: drain the doorstep as a conversation opens - #965
Merged
Merged
Conversation
An answer home left on a closed conversation's doorstep rode that session's presence heartbeat alone. A shut window keeps nothing beating, so the answer sat in answers.jsonl until somebody happened to open the conversation and the first five-second tick arrived — and home said `answered · waiting for it to pick that up` the whole time. The constructor drains the doorstep after recoverTasks has put back the graph a landing answers to and before startPresence starts the heartbeat, so the answer is applied through the one door before the window's first turn.
santoshkumarradha
force-pushed
the
fix/home-answer-pickup
branch
from
September 11, 2026 22:42
b0dddd5 to
5085b33
Compare
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.
Home leaves an answer on another conversation's doorstep and says
answered · waiting for it to pick that upuntil the owning conversation applies it. For a conversation that is running, that is the presence heartbeat, a second or two. For a conversation that was closed, nothing was beating: the answer sat inanswers.jsonluntil somebody happened to reopen it, and even then until the new process's first five-second tick — and home said "waiting" the whole time.The constructor now drains the doorstep itself, after
recoverTaskshas put back the graph a landing answers to and beforestartPresencestarts the heartbeat that would race it. The answer goes through the same one door as every other (Agent.ResolveQuestion), so a landing answered from home while its conversation was shut is already settled when the window opens — before its first turn — rather than a question somebody answered yesterday still asking.Regression test:
TestAnAnswerLeftWhileTheWindowWasShutIsAppliedAsItOpensleaves a landing's no on the doorstep of a conversation with no process behind it, opens the conversation, and asserts the node is settled before any heartbeat could have run.Manual:
home.mdnow says an answer left for a closed conversation is applied the moment it next opens, not just "the next time that conversation runs".Change entry:
docs/changes/unreleased/965-doorstep-drained-on-open.md.