Repository navigation
Conversation
The checker keyed receivers on the names e and l. Resolve a method's receiver identifier to its declared type instead, and recognise <sub-type>.e, <engine>.<field> and <engine>.<Type>() so methods moved onto SyncRuns, Digests, Expansion and Records stay under the writeMu rules. requireSubTypeShape pins the composition those rules assume: a value field on Engine, an accessor named for the type, and an e *Engine field on the sub-type. Co-authored-by: Cursor <cursoragent@cursor.com>
Sync-run and sync-stats methods now sit on SyncRuns, the same shape as Ledger: a syncRuns value on Engine, e *Engine on SyncRuns, and calls through r.e.withWrite. Callers outside the package use SyncRuns, and pebbleStore implements ListSyncRuns by calling that accessor. Co-authored-by: Cursor <cursoragent@cursor.com>
Base automatically changed from
refactor/2-0-write-mu-holders-subtypes
to
main
October 30, 2026 19:08
ggreer
approved these changes
Oct 30, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #1200. First of the
pebble.Enginesplits: the 29 sync-run and sync-stats methods fromsync_runs.go,adapter_sync_meta.go,sync_stats_sidecar.go,adapter_stats.gomove toSyncRuns, followingLedger(type SyncRuns struct{ e *Engine }, value fieldsyncRunsonEngine,Engine.SyncRuns()accessor). The five fields only they used (computedStats*,syncStatsOverlay,deferredGrantStats*) move with them. Locks stay onEngine; bodies are unchanged apart frome.→r.e.and two locals renamed fromrtorecto free the receiver name.No forwarders on
Engine:TestWriteMuHoldersrejects a name declared on two checked types, which is the point of #1200. Callers go throughSyncRuns()(71 files, almost all tests; production sites arepebble_store.go,source_cache.go,sqlite/convert.go,compactor_pebble.go).pebbleStoregains an explicitListSyncRunswhere the embed used to supply it. Export status is unchanged; unexporting waits for the exportcheck ratchet in #1138.What to look at:
engine.go(field and init next toledger), theSyncRunsstruct insync_runs.go, andpebble_store.go. Everything else is receiver and call-site rewrites the compiler checked.Checks:
go build ./...,go vet ./...,golangci-lint run ./pkg/dotc1z/...clean;go test ./pkg/dotc1z/... -count=1ok includingTestWriteMuHoldersandTestPebbleStoreDirtyCoverage; focused-run 'Stats|SyncRun|Cleanup'acrosspkg/syncok.