fix(desktop): ignore nested attachments during message discovery - #255
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: needs maintainer review before merge. Reviewed September 23, 2026, 3:37 PM ET / 19:37 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR changes Slack Desktop cache decoding to keep attachments with their parent message, adds an ingestion regression test, and documents the behavior. Regression provenancePossible regression — suspected (failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open. Current main and v0.10.0 still traverse nested attachments as messages, while the updated PR body now provides redacted output from a successful sync of the affected cache and an archive query showing one parent row with its attachment. The linked report’s schema rollback concern remains separate. Priority: P1 Review scores
Verification
How this fits togetherDesktop sync reads Slack’s local cache, decodes cached messages, checks their identities, and writes admitted records to the SQLite archive. This change affects how the decoder treats attachments before those checks. flowchart LR
A[Slack Desktop cache] --> B[Message decoder]
B --> C{Nested attachment?}
C -->|Yes| D[Keep with parent]
C -->|No| E[Check message identity]
D --> F[SQLite archive]
E --> F
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land the focused attachment-discovery guard while retaining identity checks for genuine messages; handle the linked report’s downgrade concern on its own merits. Do we have a high-confidence way to reproduce the issue? Yes. The pre-patch walker and added fixture establish a concrete path from a timestamped, cross-channel attachment to the identity-conflict error; this review did not run the private cache. Is this the best way to solve the issue? Yes. Skipping attachment traversal at message discovery is narrow, preserves the parent payload, and leaves checks for genuine message identity conflicts in place. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against 4eeb7828ca42. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(desktop): ignore nested attachments during message discovery This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
steipete
left a comment
There was a problem hiding this comment.
The synthetic baseline reproduces the retained-container identity failure. The fix correctly stops discovery at attachments while retaining their parent payload; the expanded regression covers message/thread containers, all DM policies, attachment identity variants, and replay. Existing genuine identity-conflict rejection stays in place. Independent P0–P2 review is clean; merge remains gated on the full remote and exact-head CI checks.
Why
Slack Desktop can keep a message unfurl inside an attachment. When that attachment has a timestamp, text, and another channel ID, slacrawl treats it as a separate message and stops the whole desktop sync with the error in #254.
Change
This addresses the desktop sync failure in #254. It does not change schema migration behavior.
Checks
Real-cache proof (redacted)
The affected cache has a timestamped attachment under a parent message. The attachment includes
channel_idandtextfields. Message text, Slack IDs, and timestamps are withheld.I ran the committed local build (
7af4853) against that cache:A read-only archive query for the affected parent message returned:
[{"parent_rows":1,"rows_with_attachment":1}]Maintainer validation
Expanded the synthetic regression across message/thread containers, foreign/same/missing attachment channel IDs, all three DM policies, and repeat ingestion. The test verifies one parent row and an intact raw attachment payload; the existing real-identity-conflict regressions remain unchanged. Added desktop upgrade recovery guidance and changelog credit.
The baseline decoder reproduces two messages and one identity conflict from a single parent plus attachment. Independent Codex P0–P2 review is clean. Full
make checkpassed on AWS Crabbox atff2902ce0c9b08ce96547c19b16607c2aa762d3d, including the race suite, CLI smoke, and snapshot packaging. A compiled CLI synced the synthetic desktop cache twice and retained exactly one parent row with one attachment. Exact-head hosted CI is required before merge.Fixes #254.