Skip to content

[pull] main from Alishahryar1:main - #254

Merged
pull[bot] merged 1 commit into
Co-Contribute-OpenSource:mainfrom
Alishahryar1:main
Sep 28, 2026
Merged

pull[bot] merged 1 commit into
Co-Contribute-OpenSource:mainfrom
Alishahryar1:main

Conversation

@pull

@pull pull Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

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 : )

## 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 pull Bot locked and limited conversation to collaborators Sep 28, 2026
@pull pull Bot added the ⤵️ pull label Sep 28, 2026
@pull
pull Bot merged commit 105bfab into Co-Contribute-OpenSource:main Sep 28, 2026
10 of 11 checks passed

This branch had an error being deployed

1 failed deployment
pypi — 105bfab8 Deployed Sep 28, 2026 by pull[bot] via Publish to PyPI #11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant