Repository navigation
[pull] main from Alishahryar1:main - #254
Merged
Merged
Conversation
## Why Code sessions and messaging share the same database, but Code still opens its own connections and manages transactions separately. This duplicates connection policy and lets failures from a closing database escape Code's storage error boundary. The VS Code Retry browser test also waits for unrelated startup work, which can cause a timeout while Retry is usable. ## How - Route Code operations and restart recovery through the existing `SQLiteDatabase.run` transaction owner. Remove Code's duplicate connection setup and outer transaction statements. - Classify all Code operations explicitly as reads or writes so history queries retain consistent snapshots and avoid reserving the writer lock. - Keep SQL and domain validation in the Code repository, with one error boundary covering database admission, execution, and commit. Closing-database failures now return the normal Code storage-unavailable error. - Document the shared worker/transaction contract and cover WAL reads, recovery rollback, cancellation result delivery, and drain-before-release behavior. - Scope the Retry test wait to VS Code integration readiness and exercise it while messaging remains starting. <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=70385623"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2> <!-- greptile-risk --> No blocking issues identified; this change appears safe to merge. What we checked: - I ran a WAL and history snapshot check against the parent revision and the current change to verify cross-revision consistency. <a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="16" align="absmiddle"></a> - I executed a focused SQLite persistence check across parent and current revisions, covering failed recovery, a recovery retry, and cancelled writes racing with close, and three targeted tests passed. <a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="16" align="absmiddle"></a> - I observed that both runs exited successfully and that reads returned the committed old state without waiting for the WAL writer, with the paused history showing the old state and a fresh read showing the new session and run. <a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="16" align="absmiddle"></a> - I examined prompt expiration behavior and cancellation interactions, noting that a retry persisted interrupted and expired while a cancelled write persisted and injected failures were rolled back. <a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="16" align="absmiddle"></a> <details open><summary>Summary</summary> Code storage now uses the shared SQLite owner for connections, transactions, and restart recovery. Focused checks found no regression in concurrent reads, history snapshots, recovery rollback, or cancelled-write outcomes. </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (1) · Last reviewed commit: ["refactor: share SQLite transaction owner..."](https://github.com/alishahryar1/free-claude-code/commit/60032594451c3c01fd7bd78b98e8483e4615ded6)</sub> <!-- /greptile_comment -->
pull
Bot
merged commit Sep 28, 2026
105bfab
into
Co-Contribute-OpenSource:main
10 of 11 checks passed
This branch had an error being 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )