Repository navigation
fix(storage): persist raw messages before updating summaries - #724
Open
Elon-Jiang wants to merge 1 commit into
Open
Elon-Jiang wants to merge 1 commit into
Elon-Jiang wants to merge 1 commit into
Conversation
Collaborator
|
@claude review this PR.
Verdict first. Blockers in a numbered list, then non-blocking notes, kept separate. Plain, short words. |
|
Claude finished @cornelcroi's task in 15s —— View job Verdict: Approve (no blockers)The change is small and safe. It fixes the same bug in Python, TypeScript and Swift. I read the diff only. I did not run the tests. BlockersNone. Checks against your list
Non-blocking notes
|
This branch has not been deployed
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.
Issue Link
Fixes #723
Summary
Persist raw chat messages before appending to the active summary buffer or invoking the summarizer in Python, TypeScript and Swift. Previously, a save-time summarizer exception prevented the raw write, while a failed raw write could leave an unsaved message in the buffer.
Changes
User experience
With an active summary buffer, a summarizer exception no longer prevents saving the original message. If the inner write raises, the wrapper does not append that attempted message or invoke the summarizer.
A summarizer error can still propagate after the raw write commits. This is not a transactional or retry-idempotency guarantee. Existing concurrent-write coordination and same-role message filtering are outside this change.
Validation
Against main
729d5f52869c8280f599a9fa5cf27fc1df445602before the production changes:After the changes:
test_requirements.txt:make test— 447 passed. Ruff checks on the full source tree and changed Python tests pass.npm ci:npm test -- --runInBand— 218 passed across 20 suites;npm run lintandnpm run buildpass. Two additional failure-path checks against the built JavaScript storage modules pass.swift test --skip-update— 426 tests across 38 suites passed; summary regressions pass. No iOS build was run.git diff --checkpasses.Offline runtime tests only: scripted summarizer failures, in-memory stores and explicit failing storage boundaries, no paid model or browser calls. Python dependency downloads timed out twice; the final install completed before the full successful suite. AWS variables in that test process use dummy credentials with metadata lookup disabled.
Contribution notes
All 86 open PR file lists were checked completely, alongside all-state summary-storage searches, the Python file history and the latest default branch. No overlapping failure-ordering fix was found. Root and Python contribution guides, the required issue link and the actual Apache-2.0 license were checked.
AI assistance (OpenAI Codex) was used for investigation, implementation and executed validation. No production incident or independent human review is claimed.