feat: track public Discord invite counts - #240
hannesrudolph wants to merge 6 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 15, 2026, 6:44 PM ET / 22:44 UTC (Revision 2). ClawSweeper reviewWhat this changesAdds commands to collect public Discord membership and online counts, import historical observations, and report freshness from a separate SQLite database. Merge readiness⛔ Blocked before merge - 5 items remain This remains useful, distinct work absent from current main. Both previously reported database-safety defects remain unchanged, so the PR is still blocked before merge. Priority: P2 Review scores
Verification
How this fits togetherDiscrawl normally archives Discord messages and members. The new metrics commands instead accept public invite codes or historical JSON rows and write aggregate observations to an explicitly configured database for downstream readers. flowchart TD
A[Metrics configuration] --> B[Metrics commands]
C[Public Discord invite counts] --> B
D[Historical JSON rows] --> B
B --> E[Database ownership check]
E --> F[Separate metrics database]
F --> G[Freshness output and downstream readers]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep metrics isolated through consistent destination validation and failure-safe initialization, with evidence that existing archives remain unchanged and interrupted creation can be retried safely. Do we have a high-confidence way to reproduce the issue? Yes, for the PR defects: source establishes both the trailing-space destination mismatch and the canceled-initialization retry failure. These paths were not executed during this read-only review. Is this the best way to solve the issue? The separate collector is a reasonable fit and does not duplicate existing archive analytics, but its initialization implementation must preserve the actual destination and recover from failed creation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against b1ea76ebbb40. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
What Problem This Solves
Tracking Discord server membership and online-presence trends currently requires a separate collector, even when Discord collection already runs through Discrawl.
User Impact
discrawl metrics collect|import|status --config METRICS_CONFIGrecords public invite counts and imports existing metric history into a separate database without bot credentials. Existing archive, tail, and embedding workflows are unchanged. Online presence is an approximate count of online members, not active posters or engagement.Why This Change Was Made
The collector uses Discord's public invite count fields and stores timestamped observations with provenance and delivery sequences. The documented configuration uses OpenClaw's public guild invite. Unknown counts stay NULL, and zeroes, decreases, repeated observations, and daily revisions are preserved. Imports are scoped and idempotent by ID, with resumable batches. Database ownership/version checks prevent initialization over an existing archive or another collector's store.
Collection is an explicit command; scheduling and downstream delivery remain with the caller.
Evidence
go test -race -count=1 ./...passed; coverage excluding generated code is 86.0%. Focused race tests passed again after the final path guard.golangci-lintreports zero issues; vet, staticcheck, gosec, deadcode, module verification, and documentation tests/build passed. Govulncheck found no reachable vulnerabilities.