Skip to content

fix(sqlite): expose change counts on the fallback connection - #1674

Merged
Open-Squilla merged 1 commit into
mainfrom
fix/sqlite-fallback-total-changes
Sep 16, 2026
Merged

Open-Squilla merged 1 commit into
mainfrom
fix/sqlite-fallback-total-changes

Conversation

@Open-Squilla

Copy link
Copy Markdown
Contributor

Scope

The SQLite fallback connection omitted total_changes, although the native aiosqlite connection exposes it. When the fallback was selected, execution-workspace safety tests failed with AttributeError before checking that rejected mutations left the database unchanged. This blocked the merge queue for #1532.

Scope boundary: expose the underlying SQLite read-only counter through the compatibility protocol and fallback wrapper, and test the same counter semantics on both backends. There are no initialization changes, new dependencies, changed safety assertions, or test skips.

Branch

Base branch: main.

Target exception: none.

Issue

Linked issue: None.

If None, reason: fixes a merge-queue failure identified while integrating #1532. The exact queue parent and candidate have identical compatibility-layer source and both reproduce the failure when fallback is forced.

Release Note

Release note: Preserve SQLite change-counter compatibility when the asynchronous connection falls back to sqlite3. No standalone changelog entry added.

Tests

  • Baseline on main: workspace tests passed with the native backend; forcing the fallback produced 16 failures and one pass with the same missing-property error.
  • After the fix, forced-fallback workspace and session-search verification: 57 passed.
  • Both-backend compatibility, workspace, and session-search verification: 60 passed.
  • Counter coverage includes DDL/reads, insert/executemany, updates, deletes, rollback semantics, the SQL total_changes() result, and read-only access.
  • Targeted Ruff, mypy, and git diff --check passed.
  • Backend-independent forwarding was verified on macOS with both backends; Windows CI exercises the originally failing surface. Existing Linux/macOS/Windows runtime selection is unchanged.

Maintainer Live Check

Maintainer live check: no.

Surface: gateway.

Safety

The existing no-mutation safety assertions remain intact. Tests are offline, deterministic, credential-free, and use synthetic in-memory/temporary databases. No secrets or runtime data are included.

Third-Party Origin

Third-party origin: none.

@github-actions

Copy link
Copy Markdown

Merge queue CI: cancelledrun 35086775996, attempt 1.
Tested queue candidate: 5debc64ee3a8dee5218fc4c40128456b2da99dd6. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

@github-actions

Copy link
Copy Markdown

Merge queue CI: cancelledrun 35086973511, attempt 1.
Tested queue candidate: 1e3723a6c0adb353d8f67350c11d06746d08678e. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

Merged via the queue into main with commit 4d18116 Sep 16, 2026
43 checks passed
@github-actions

Copy link
Copy Markdown

Merge queue CI: successrun 35087537585, attempt 1.
Tested queue candidate: 4d18116165b350a2cf4038e3d2fd1db72c861ecc. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

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.

1 participant