feat: add member and guild tombstones#145
Conversation
There was a problem hiding this comment.
💡 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; |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Proof
GOWORK=off go test -count=1 -race ./...GOWORK=off go test -count=1 ./...GOWORK=off go vet ./...staticcheck ./...golangci-lint rungosec -exclude=G101,G115,G202,G301,G304 ./...govulncheck ./...