Slack view: delete a day file when its messages move to another day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- markdown, python
- Domain
- data-engineering
Research direction
Start with src/diffdata/discover/slack_export.py and the existing tests for Slack export; the issue says this file is also changing in the planned second PR for #14, so check whether that has merged before starting. Add a synthetic fixture for a message moving days, then verify a build deletes its now-empty day file while preserving other files and other channels' folders.
Written by the indexing model from the issue text.
Description
Lane
discover
Requirement IDs
DIS-1
What and why
A known limit from PR #16, split out of #14's second PR by the plan agreed on #14.
The problem:
buildrewrites the Slack view, one markdown file per channel per UTC day (slack/export/<channel>/<date>.md), from the store.- It writes the days that have messages, but it never deletes a day file that no longer has any.
- That can happen when a message moves to another day. For example, a reply that was also sent to the channel shows up first as a standalone post on its own day. A later thread read puts it under its parent post, on the parent's day.
- The old day file is then left behind, still showing the message as a standalone post.
How bad it is: rare, and nothing is lost: the store has everything. But the view shows a message twice, once in the wrong place.
Suggested fix: after writing a channel's day files, delete any *.md file in that channel's export folder whose day has no messages any more. These are our own generated copies, rebuilt from the store on every build, so deleting them is allowed. Never touch anything outside slack/export/<channel>/.
Done when
- A day file whose messages all moved to another day is deleted on the next build, with a test
- Other files in the folder, and other channels' folders, are left alone
- Synthetic fixtures only
Notes
Small and self-contained, about 15 lines plus a test. Best done after #14's second PR merges, because both change src/diffdata/discover/slack_export.py.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SPARDiffData/differential-data-collection
-
lane:discover
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
lane:repo
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
-
lane:collect
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Follow-ups from the reviews of #64: build the anchor in the test, name the command behind --sourceOpenlane:repo
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
lane:repo
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
All issues in SPARDiffData/differential-data-collection
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
awslabs/social-messaging-agent-runtime-toolkit#140 ·
Maintainers usually reply within 1 day
-
subtask
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fga-eps-mds/2026.2-MeasureSoftGram-DOC#187 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
txn2/mcp-data-platform#2493 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
YO-WHATS-UP2/minigit#78 ·
Maintainers usually reply within 3 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liberation-data/drivine-python#432 ·
Maintainers usually reply within 1 day