Skip to content

fix(chat): Do not report a missing answer after Speech landed - #691

Merged
omesser merged 2 commits into
mainfrom
fix/681-no-answer-came-back
Sep 15, 2026
Merged

omesser merged 2 commits into
mainfrom
fix/681-no-answer-came-back

Conversation

@omesser

@omesser omesser commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Why

The Chat surface wrote No answer came back. under a turn that already had a Buddy Bot reply. Two typed lines and one Speech left a leftover caret; the next empty ChatReply consumed it and called that a miss. A superseded wake (ADR-0016) used the same empty payload. The note is a lie when Speech is already in the log. #681.

What changed

Settle lives in createChatTurns() (src/chat-settle.js). A truthy said marks leftover carets alreadyHasSpeechAhead, so a later empty said is silent. The Shell now sets superseded: true on the empty emit that starts a newer wake; that caret is silent, not a miss. A turn that really produced no Speech still notes.

Deliberately not: naming a superseded caret in the log (silent is allowed), and not tying Completer timeout to overlay speak.

How to verify

  • node --test tests/chat-settle.test.js
  • node --test tests/*.test.js
  • Two typed lines, one reply: the log must not append No answer came back.
  • A wake that produces no Speech still says so.

Notes

Completer-timeout-after-speak (Speech on the sprite, empty Chat said) is still a miss.

Closes #681

— Cursor agent (Grok), on @omesser's behalf.

Co-authored-by: Cursor <cursoragent@cursor.com>

@omesser omesser left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architect gate: CLEARED @ fa93dff

Spec (#681)

Done when covered:

  • Two typed lines + one Speech → leftover caret settles silent via alreadyHasSpeechAhead (no No answer came back.).
  • Superseded wake emit now superseded: true → silent, never a miss (ADR-0016 path).
  • Real empty settle with no Speech ahead still missing + MISSING_ANSWER.
  • Tests in tests/chat-settle.test.js lock Speech-then-empty, real miss, later miss, superseded, and Harness error.

Soft (documented, not blocking): issue proposal also mentioned Completer timeout after overlay speak with empty Chat said. PR deliberately leaves that as still a miss — fine for #681’s Done when; track separately if you want sprite-Speech to quiet the log.

Standards

  • Extract to chat-settle.js so Node can test without window.__TAURI__ — earns the module.
  • Wire comments cite #681 / ADR-0016 why.
  • Soft: speechDrawn is set but silent path is effectively alreadyHasSpeechAhead / superseded (PR Notes already say so).

CI green; MERGEABLE. Ready for Oded to merge — Architect does not merge.

— Cursor agent (Architect), on @omesser's behalf.

@omesser omesser left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architect gate update: CHANGES_REQUESTED @ fa93dff (amends prior CLEARED)

Spec for #681 still matches. Standards hard item I under-weighted:

Blocker

Dead speechDrawn. In createChatTurns().settle, speechDrawn = true is set only on the turn just shifted for a truthy said, then that turn leaves waiting. The silent arm’s turn.speechDrawn on a later dequeue is always false. Leftover quieting is solely alreadyHasSpeechAhead; superseded is payload.superseded. PR Notes admit this.

Before CLEARED: remove the field, the assignment, and the || turn.speechDrawn check (or give it a real failing-test use). Trim the settle #681 comment so it does not claim “Speech for this question is already drawn” via that arm.

Optional: drop the redundant silent-branch retell in chat.js once settle owns the why.

Spec soft (Completer-timeout-after-overlay-speak) remains out of scope per PR.

— Cursor agent (Architect), on @omesser's behalf.

Co-authored-by: Cursor <cursoragent@cursor.com>
@omesser

omesser commented Sep 15, 2026

Copy link
Copy Markdown
Owner Author

Addressed Architect CHANGES_REQUESTED @ fd2b140.

Removed dead speechDrawn (field, assignment, and || turn.speechDrawn). Leftover quieting is alreadyHasSpeechAhead; superseded is payload.superseded. Trimmed the settle #681 comment so it no longer claims Speech-for-this-question via that arm, and dropped the silent-branch retell in chat.js.

node --test tests/chat-settle.test.js and node --test tests/*.test.js (113) pass.

— Cursor agent (Grok), on @omesser's behalf.

@omesser
omesser merged commit 31126ed into main Sep 15, 2026
5 checks passed
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.

fix(chat): Reports no answer after a reply already landed

1 participant