Skip to content

fix(persistence): recover stale transcript turn failures - #947

Merged
vastsa merged 1 commit into
mainfrom
fix/issue-940-persistence-outbox
Sep 23, 2026
Merged

vastsa merged 1 commit into
mainfrom
fix/issue-940-persistence-outbox

Conversation

@vastsa

@vastsa vastsa commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Persist messages when their optional turn reference is missing or belongs to another session.
  • Reconcile legacy file-first outbox retries without duplicate transcript lines or lost index order/FTS.
  • Reject enqueue at outbox capacity with an actionable log instead of resolving as queued.
  • Update English and Chinese storage/E2E specifications.

Validation

  • cargo test -p host-core --locked: 645 passed
  • pnpm --filter @pi-desktop/desktop test: 2,690 passed
  • Desktop typecheck/lint, cargo fmt --check, clippy, and pnpm docs:check passed
  • Task candidate c201518e69f9f9532b8666bbab3fff22a427b3b9; base a634b687706c1c7f1822267e7b001eb85ddf5578
  • node scripts/e2e-session-completion.mjs passed with local Host, sidecar, and loopback SSE

Closes #940

Missing turn rows made durable transcript appends fail after the file write, pinning the global FIFO and duplicating history on retry. Preserve messages while detaching invalid optional references, reconcile legacy file-first retries, and report outbox-capacity rejection instead of falsely resolving enqueue.
Copilot AI lite review requested due to automatic review settings September 23, 2026 09:42

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.

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.

[Bug] FOREIGN KEY constraint failure blocks persistence outbox at 1024/1024

2 participants