Repository navigation
Remove code and comments left over from the SQLite engine - #1201
Conversation
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>
Superseded — see the current review report for commit
|
General PR Review: Remove SQLite-era dead code and comments from pkg/sync, c1zsanitize, dump-dbBlocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0 Review SummaryThis PR deletes the exported Risk triage (criteria):
How the criteria applied:
No references to Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agentsReviewed commit: |
There was a problem hiding this comment.
No blocking issues found — see the full review report
Four independent commits, no behaviour change for Pebble files.
connectorstore.ExpansionGrantListerhad no implementer once the SQLite engine was removed. Deleted;c1zsanitizeand its test callListGrantsdirectly.TestSanitizeGrantExpansionRoundTripstill assertsGrantExpandablesurvives sanitize.baton dump-dbrejects anything but v3 instead of carrying the v1 decoder path. Kept (hidden command) because the verification docs reference it.pkg/sync/syncer.go,store_caps.goandconnectorstore.gothat described SQLite as the other engine, or listed"sqlite"as anEnginevalue, lose those clauses.To review: the two
ListGrantscall sites and thedump-dbguard. The rest is comment text.Heads-up for the next c1 bump:
cmd/dev-util/build_grants_c1z.gotype-assertsExpansionGrantLister; delete that branch, itsListGrantsfallback is already there.