Skip to content

fix(transcript): match missed prompt echoes safely - #1340

Merged
vastsa merged 3 commits into
mainfrom
codex/fix-pr1334-transcript-reconcile
Oct 3, 2026
Merged

vastsa merged 3 commits into
mainfrom
codex/fix-pr1334-transcript-reconcile

Conversation

@vastsa

@vastsa vastsa commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

This completes the original #1334 fix without using message text as identity by itself. A missed prompt acknowledgement is reconciled only for an attachment-free optimistic UUID row with an exact text match and a durable user row timestamped within 30 seconds after it. An older identical prompt remains visible and cannot hide the new prompt.

The original contributor commit is retained in this maintainer follow-up.

Related: #1308, #1334.

Validation

  • node --test apps/desktop/test/session-transcript.test.mjs apps/desktop/test/session-transcript-updates.test.mjs apps/desktop/test/empty-session-read.test.mjs — 24 passed.
  • node scripts/check-pr-base-main.mjs — passed against 48738868fe22.
  • git diff --check — passed.

yexisu and others added 3 commits October 3, 2026 19:36
Switching away right after a send could leave the optimistic user row in
the live cache under its temporary id; if the user_message_persisted
reconcile was missed, reselecting the session merged it beside the
durable echo of the same prompt and the question appeared twice (#1308).

mergeLiveSessionMessages now grants each durable completed user row one
collapse credit: an orphan live user row with equal text consumes one
credit and is dropped. A genuinely repeated prompt stays visible because
two sends persist two durable rows while each live orphan only consumes
one credit.

Validated: session-transcript tests 15/15, session-transcript-updates
and empty-read suites 10/10; the remaining desktop tsc storage errors
reproduce on the pristine main checkout and are unrelated baseline
noise.
Match a missed host acknowledgement using exact content, prompt identity, and a tight timestamp window so older identical messages remain visible.
Guard the elapsed-time match so an unrelated same-text row cannot be treated as a missed persistence echo.
Copilot AI balanced review requested due to automatic review settings October 3, 2026 11:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vastsa
vastsa merged commit 9b510bc into main Oct 3, 2026
4 checks passed
@vastsa
vastsa deleted the codex/fix-pr1334-transcript-reconcile branch October 6, 2026 16:55
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.

3 participants