Let go of the files no comment names any more.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4
- Forks
- 1
- Avg merge
- 37m
- Merged PRs (30d)
- 92
Description
A comment carries files now, kept in media/ and named by the digest of what they hold. Nothing ever lets one go: a dropped comment leaves its file behind, and so does a rewriting whose earlier wording carried one. A review that goes back and forth with screenshots therefore only grows, and the reviewer has no way to reclaim the space short of clearing the directory by hand - which would take out files that threads still show.
Keeping them was the safe half of the decision. A digest-named file is shared: the same screenshot pasted into two comments is one file, and a wording kept under edits names the file it was written with, so deleting on a drop can pull a file out from under a thread that still draws it. What is missing is not a delete but a reference count.
What to build:
- Every name a file is reached by is collected in one pass over the log - remarks, replies, whispers, and the wordings kept under
edits- which is a pass the desk already makes on every change. - What
media/holds and that set does not name is unlinked. Nothing else is: a file named anywhere stays, whatever became of the comment that first carried it. - The sweep runs where a name stops being used - a comment or a reply dropped, a wording replaced - and never on a read.
- A file uploaded to a pull request is unlinked here like any other. What GitHub holds is GitHub's, and the URL kept on the comment is what the pull request reads.
The log's format is not what stands in the way. Measured on a real desk: 517 comments, 532 KB, a mean of 1028 bytes a row, and an attachment adds about 150 bytes to the row that carries it - the bytes were never in the log. What the format does cost is a read of every row and a write of every row per change, and a transfer of the whole log per poll; at half a megabyte neither is felt. Worth measuring again if a log reaches a few megabytes, and worth deciding then, on the measurement rather than on a projection: a store with per-row updates would buy a transactional sweep and indexed reads, and would cost a log that can be read with cat, grepped, and repaired by hand when a desk will not start.
Follows #32.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Trace the existing change-time pass over remarks, replies, whispers, and the wordings under edits, then inspect how media/ files and pull-request URLs are represented. Implement the sweep where comments, replies, or wordings stop being used, never during reads. Done means only unreferenced local files are unlinked, shared files remain, and pull-request-hosted files are handled through their stored URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100