Skip to content

store: Phase 3 follow-ups (bigint cursor, messaging cleanup, final $n sweep) - #401

Merged
piwi3910 merged 2 commits into
mainfrom
momo/store-followup
Nov 17, 2026
Merged

piwi3910 merged 2 commits into
mainfrom
momo/store-followup

Conversation

@piwi3910

Copy link
Copy Markdown
Contributor

Follow-ups to the internal/store momo Phase 3 conversion.

  • ListCDRs and ListRecordings cast the paging cursor as @before::bigint, as LookupCalls and LookupRecordings already do. A cursor id above 2^31-1 now pages instead of failing out of range. The answer is recorded in .procoder/ask/decisions.md.
  • ConversationCalls visibility read binds @id with visibleTo and inboxAccessArgs. messaging_calls.go is added to namedFiles. TestConversationCallsSends now also pins the binds of that read.
  • ErasePeer redaction select binds @peer_key. queueRedactions drops its $n branch and always binds @Batch.
  • The now-unused visible and poolMemberParam helpers and TestVisibleToMatchesVisible are deleted.
  • Sweep: no non-test internal/store file binds $n except trylock.go. dbq.go and the goose read in backup.go stay raw on purpose. docs/database.md lists every domain as converted, plus the raw exceptions, and its old duplicated fragments are removed.

Checks run locally: gofmt, go vet ./..., go build ./..., golangci-lint on internal/store, and the offline store tests plus the hermetic store, messaging and api unit tests. The DB tier runs in CI.

… sweep)

ListCDRs and ListRecordings page with @before::bigint, as LookupCalls and
LookupRecordings do, so a cursor above 2^31-1 no longer fails.

ConversationCalls' visibility read binds @id with visibleTo and
messaging_calls.go joins namedFiles. ErasePeer's redaction select binds
@peer_key, so queueRedactions always binds @Batch. The $n helpers visible
and poolMemberParam, and TestVisibleToMatchesVisible, are deleted.

docs/database.md lists every internal/store domain as converted, with the
deliberate raw exceptions (dbq.go, trylock.go, backup.go's goose read).
@piwi3910
piwi3910 merged commit 17b2cd3 into main Nov 17, 2026
29 checks passed
@piwi3910
piwi3910 deleted the momo/store-followup branch November 17, 2026 09:03
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