Skip to content

Remove code and comments left over from the SQLite engine - #1201

Merged
kans merged 4 commits into
mainfrom
refactor/1d-ii-dead-sqlite-era-code
Oct 30, 2026
Merged

kans merged 4 commits into
mainfrom
refactor/1d-ii-dead-sqlite-era-code

Conversation

@kans

@kans kans commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Four independent commits, no behaviour change for Pebble files.

  • connectorstore.ExpansionGrantLister had no implementer once the SQLite engine was removed. Deleted; c1zsanitize and its test call ListGrants directly. TestSanitizeGrantExpansionRoundTrip still asserts GrantExpandable survives sanitize.
  • baton dump-db rejects anything but v3 instead of carrying the v1 decoder path. Kept (hidden command) because the verification docs reference it.
  • Comments in pkg/sync/syncer.go, store_caps.go and connectorstore.go that described SQLite as the other engine, or listed "sqlite" as an Engine value, lose those clauses.

To review: the two ListGrants call sites and the dump-db guard. The rest is comment text.

Heads-up for the next c1 bump: cmd/dev-util/build_grants_c1z.go type-asserts ExpansionGrantLister; delete that branch, its ListGrants fallback is already there.

kans and others added 4 commits October 29, 2026 12:46
Deleted connectorstore.ExpansionGrantLister and ListGrantsWithExpansion.
rg over non-vendor code found no implementer: only the declaration, the
type assert in pkg/c1zsanitize/ledger_run.go, and the same assert in
expansion_roundtrip_test.go. Both call sites now use ListGrants.

Co-authored-by: Cursor <cursoragent@cursor.com>
dump-db is named in docs/verification plans, so the command stays.
Deleted the v1 branch that decoded a c1z with NewC1ZFileDecoder and
copied the SQLite payload to a file. Non-v3 input now errors.
v3 still extracts the Pebble payload directory via
ExtractEnvelopePayload. NewC1ZFileDecoder stays: pkg/dotc1z/sqlite/open.go
is the remaining caller.

Co-authored-by: Cursor <cursoragent@cursor.com>
Deleted the SQLite alternative from NewExpanderStore,
GrantsForEntitlementPrincipalSorted, grantByRefsDeleter, and
grantsByRefsBatchDeleter in syncer.go, and from the storeCaps header,
the deleter-field comment, and the readerCaps header in store_caps.go.
The SQLite engine is gone (PR #1193); Pebble is the only engine, so
those clauses described an implementation that no longer exists. No
code in store_caps.go changed.

Co-authored-by: Cursor <cursoragent@cursor.com>
No non-test code produces StoreMetadata.Engine \"sqlite\" (rg '"sqlite"'
under pkg, excluding tests, hits only sql.Open in pkg/dotc1z/sqlite and
this comment). Removed that value from the Engine comment. Kept the v1
format line: ReadHeaderFormat still returns C1ZFormatV1 and
pkg/dotc1z/sqlite/open.go requires it, and the payload is still SQLite.
DBSizeProvider no longer names a sqlite file; the Pebble engine sums
regular files in its database directory.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kans
kans requested a review from a team October 29, 2026 19:18
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Superseded — see the current review report for commit 6c5930d83870

General PR Review: Remove SQLite-era dead code and comments from pkg/sync, c1zsanitize, dump-db

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 8f8783c4e568.
Review mode: full
View review run

Review Summary

This PR deletes the exported connectorstore.ExpansionGrantLister interface, which nothing implements anymore. c1zsanitize's grant copy and its round-trip test now call ListGrants directly. The hidden baton dump-db command now rejects non-v3 files instead of decoding v1 SQLite payloads. The rest of the diff removes SQLite references from comments in pkg/sync and connectorstore. I scanned the full PR diff for security and correctness issues.

Risk triage (criteria):

  • Silence: no. Pebble's ListGrants already returns GrantExpandable, and TestSanitizeGrantExpansionRoundTrip still checks that it survives sanitize.
  • Durability: no. No wire, c1z, or serialized-state format changes.
  • Uncontrolled dimensions: no.
  • Consumer distance: yes. An exported type is removed, so downstream callers must change.
  • Verdict: LOW. The removal fails loudly at compile time, and the fix is a redeploy.

How the criteria applied:

  • Exported Go API stability: the interface removal is the only finding.
  • Proto/wire, serialized state, defaults, dependencies: not touched by this diff. go.mod/go.sum are unchanged.
  • Comment review per docs/COMMENTS.md: the edited comments are now accurate. Deleting the obsolete SQLite test commentary is appropriate.

No references to ExpansionGrantLister, ListGrantsWithExpansion, or the v1 dump-db path remain in Go source.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • New (confidence: medium): pkg/connectorstore/connectorstore.go:229 deletes the exported ExpansionGrantLister interface. Any downstream code that names it stops compiling once it bumps the SDK. The PR body names one such caller, c1's cmd/dev-util/build_grants_c1z.go. Under the repo criteria, removing an exported symbol is a compatibility break, and the PR body must say so and name the 0.x minor bump it needs. The body describes the c1 follow-up but names no version. Either say which minor bump this ships in, or keep a // Deprecated: stub of the interface for one release so the c1 change and the SDK bump don't have to land together.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In `pkg/connectorstore/connectorstore.go`:
- Around line 219-230: The exported `ExpansionGrantLister` interface is deleted. Downstream code that names it stops compiling after an SDK bump; c1's cmd/dev-util/build_grants_c1z.go is a known caller. Either update the PR body to call this out as a breaking change and name the 0.x minor version bump it ships in, or keep the interface for one release marked with a `// Deprecated:` comment (no implementers needed) so downstream can migrate before it is removed.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

General PR Review: Remove SQLite-era dead code and comments from pkg/sync, c1zsanitize, dump-db

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 8f8783c4e568.
Review mode: full
View review run

Review Summary

This PR deletes the exported connectorstore.ExpansionGrantLister interface, which nothing implements anymore. c1zsanitize's grant copy and its round-trip test now call ListGrants directly. The hidden baton dump-db command now rejects non-v3 files instead of decoding v1 SQLite payloads. The rest of the diff removes SQLite references from comments in pkg/sync and connectorstore. I scanned the full PR diff for security and correctness issues.

Risk triage (criteria):

  • Silence: no. Pebble's ListGrants already returns GrantExpandable, and TestSanitizeGrantExpansionRoundTrip still checks that it survives sanitize.
  • Durability: no. No wire, c1z, or serialized-state format changes.
  • Uncontrolled dimensions: no.
  • Consumer distance: yes. An exported type is removed, so downstream callers must change.
  • Verdict: LOW. The removal fails loudly at compile time, and the fix is a redeploy.

How the criteria applied:

  • Exported Go API stability: the interface removal is the only finding.
  • Proto/wire, serialized state, defaults, dependencies: not touched by this diff. go.mod/go.sum are unchanged.
  • Comment review per docs/COMMENTS.md: the edited comments are now accurate. Deleting the obsolete SQLite test commentary is appropriate.

No references to ExpansionGrantLister, ListGrantsWithExpansion, or the v1 dump-db path remain in Go source.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • New (confidence: medium): pkg/connectorstore/connectorstore.go:229 deletes the exported ExpansionGrantLister interface. Any downstream code that names it stops compiling once it bumps the SDK. The PR body names one such caller, c1's cmd/dev-util/build_grants_c1z.go. Under the repo criteria, removing an exported symbol is a compatibility break, and the PR body must say so and name the 0.x minor bump it needs. The body describes the c1 follow-up but names no version. Either say which minor bump this ships in, or keep a // Deprecated: stub of the interface for one release so the c1 change and the SDK bump don't have to land together.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In `pkg/connectorstore/connectorstore.go`:
- Around line 219-230: The exported `ExpansionGrantLister` interface is deleted. Downstream code that names it stops compiling after an SDK bump; c1's cmd/dev-util/build_grants_c1z.go is a known caller. Either update the PR body to call this out as a breaking change and name the 0.x minor version bump it ships in, or keep the interface for one release marked with a `// Deprecated:` comment (no implementers needed) so downstream can migrate before it is removed.

Reviewed commit: 6c5930d83870

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found — see the full review report

@kans kans changed the title Remove SQLite-era dead code and comments from pkg/sync, c1zsanitize, dump-db Remove code and comments left over from the SQLite engine Oct 29, 2026
@kans
kans merged commit bdeb20d into main Oct 30, 2026
15 checks passed
@kans
kans deleted the refactor/1d-ii-dead-sqlite-era-code branch October 30, 2026 15:17
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.

2 participants