fix(wiretap): retry unresolved cache entries - #190
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Codex review: needs real behavior proof before merge. Reviewed August 30, 2026, 6:06 PM ET / 22:06 UTC. ClawSweeper reviewWhat this changesThe branch keeps unresolved Discord Desktop cache files retryable and bumps Wiretap’s private file-index key so entries checkpointed by v1 are rescanned once. Merge readiness⛔ Blocked until stronger real behavior proof is added - 7 items remain This PR addresses a real Wiretap retry gap, but its v2 index migration will replay existing cache messages and append duplicate local event-history rows. It also needs inspectable after-fix proof for the migration path before merge. Priority: P1 Review scores
Verification
How this fits togetherWiretap reads Discord Desktop cache files and imports classifiable messages into Discrawl’s local SQLite archive. The file index decides which cache files are rescanned, while imported message mutations may also append archive event-history rows. flowchart LR
A[Discord Desktop cache] --> B[Wiretap file index]
B --> C{Fingerprint needs scan?}
C -->|yes| D[Message classification]
D --> E[SQLite messages]
D --> F[Message event history]
C -->|unresolved| G[Skipped fingerprint]
G --> B
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Retain retryable skipped fingerprints, but rescan entries inherited from the v1 index without appending new events for already archived messages, backed by an upgrade regression test and a redacted real archive trace. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: seed an archive with a v1 index, a cached message, and its existing Wiretap event, then run the v2 importer. The new scope forces a rescan and the current write path appends another event. Is this the best way to solve the issue? No—the retry behavior is appropriate, but the unconditional scope migration is not safe until it preserves event history for existing archives. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against 4c29bb75ef7f. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
Summary
Why
checkpointScannedCandidatesmarked permanently unresolved candidates as imported. An unchanged cache file was therefore never reconsidered after bot sync or later cache artifacts supplied its channel metadata.Verification
go test ./...go vet ./...go test -race ./internal/discorddesktoppragma integrity_check=okThe full Windows package run still hits the pre-existing
TestDesktopPathAndImportHelpersAPPDATA expectation failure on both machines; the three tests touched by this change pass on both.