Skip to content

feat: add member and guild tombstones#145

Merged
steipete merged 1 commit into
mainfrom
feat/member-guild-tombstones
Jul 18, 2026
Merged

feat: add member and guild tombstones#145
steipete merged 1 commit into
mainfrom
feat/member-guild-tombstones

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Summary

  • add lossless schema-v5 tombstone metadata and explicit delete/restore paths for guilds and members
  • keep refreshes and routine share imports merge-only, with chronological revision handling and tombstone-wins ties
  • handle Discord guild/member deletion events without treating unavailable or omitted entities as deleted
  • document the lifecycle contract and add the 0.11.8 changelog entry

Proof

  • GOWORK=off go test -count=1 -race ./...
  • GOWORK=off go test -count=1 ./...
  • GOWORK=off go vet ./...
  • staticcheck ./...
  • golangci-lint run
  • gosec -exclude=G101,G115,G202,G301,G304 ./...
  • govulncheck ./...
  • AutoReview: clean after resolving schema-compatibility and RFC3339 offset findings
  • real binary: upgraded a v4 scratch database losslessly, exercised equal/newer tombstone and restore merges, omission safety, forced exact restore, and UTC canonicalization of a newer offset revision

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55708390ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


-- name: CountMembers :one
select count(*) as count from members;
select count(*) as count from members where deleted_at is null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude tombstones from activity report totals

When a member is tombstoned, store status and member queries now exclude it here, but scanTotals still uses select count(*) from members in internal/report/report.go:107. As a result, discrawl report continues counting every deleted member in its displayed archive size, making it inconsistent with the new member lifecycle and the main status count; apply the same deleted_at is null predicate to the report query.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 823036f into main Jul 18, 2026
10 checks passed
@steipete
steipete deleted the feat/member-guild-tombstones branch July 18, 2026 22:33
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