Skip to content

(review needed) session: drain the doorstep as a conversation opens - #965

Merged
santoshkumarradha merged 1 commit into
devfrom
fix/home-answer-pickup
Sep 12, 2026
Merged

santoshkumarradha merged 1 commit into
devfrom
fix/home-answer-pickup

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Home leaves an answer on another conversation's doorstep and says answered · waiting for it to pick that up until 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 in answers.jsonl until 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 recoverTasks has put back the graph a landing answers to and before startPresence starts 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: TestAnAnswerLeftWhileTheWindowWasShutIsAppliedAsItOpens leaves 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.md now 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.

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 santoshkumarradha changed the title session: drain the doorstep as a conversation opens (review needed) session: drain the doorstep as a conversation opens Sep 11, 2026
@santoshkumarradha
santoshkumarradha merged commit 4747395 into dev Sep 12, 2026
3 checks passed
@santoshkumarradha
santoshkumarradha deleted the fix/home-answer-pickup branch September 12, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant