Overview
| Artifact ID: | afa9aa3b534be3dd2c9b61d248d848605ec6d248a312d3498c06f3c85f583823 |
|---|---|
| Ticket: | 0c731b1455ef5277b789f0c86a7d1e48b214eca4
Should deleted repositories be recoverable, and for how long? |
| User & Date: | dmestas on 2026-08-18 11:51:12 |
Changes
- comment changed to:
`repo.delete` is immediate and total: the store, the derived index, and every forge row keyed to the repository. There is no undo. The question is whether deleted repositories should survive for a grace period — GitHub keeps them 90 days, restorable by an admin. Worth deciding deliberately rather than by default, because the two obvious answers are both wrong in different ways. ## zit already has an opinion, and it is not "30 days" `zit purge` moves check-ins to a **graveyard**: `zit purge list` shows what is there, `zit purge undo ID` restores it, `zit purge obliterate ID` discards it for good. Three states, restored explicitly, never on a timer. Its documentation also draws the line this ticket has to draw: > This is the tool for the ordinary accident — an `add .` that swept in a build tree, noticed before anyone else has the check-in. It is **NOT a takedown**: a purge is local, so a peer that already holds the content keeps it… Use `zit shun` when the content must never exist here again. and: > The graveyard is local and disposable, like the undo journal: it is never an artifact, never syncs, and is not carried by a clone. Losing it costs recoverability, not data. That is the whole design in two paragraphs, and quarry should use the same vocabulary rather than invent one. A forge whose "delete" means one thing and whose store's "purge" means another is a forge nobody can reason about. ## Why a plain 30-day window is the wrong default **It collides with the reason people delete things urgently.** The most common urgent deletion is "this repository contains something it should not" — a key, a customer file, a private repository that was briefly public. For that user, "we kept it for 30 days" is the failure, not the feature. A retention window has to be something the deleting user can see and override at the moment of deletion, not a silent policy. **Disk is not free here.** tcl's store is 335 MB and tk's 277 MB. A fleet that holds every deleted repository for a month is sized for its deletions as well as its contents, and nothing currently reports how much the graveyard holds. **Name reuse is unresolved.** Delete `foo`, create a new `foo`, then restore the old one — into what name? Either deletion reserves the name for the window (surprising: you cannot recreate a repository you just deleted) or restore has to rename (surprising in the other direction). GitHub reserves. Whichever is chosen has to be chosen, not discovered. **And quarry's deletion is already narrower than it looks.** The store is destroyed only when quarry created it; adopted stores are only unregistered, and `repo.remove` — which leaves everything on disk — already IS the recoverable path for the common case. Some of the demand for a grace period is met by the operation that already exists, and the surfaces should say so more clearly. ## Shape worth considering 1. **A graveyard, not a timer.** Deletion moves the store aside and records a row: repository, when, by whom, reason. `repo.graveyard` lists it, `repo.restore` brings one back, `repo.obliterate` finishes the job. Same three states as zit, same words. 2. **Retention as an operator policy, not a product promise.** `--graveyard-days N`, default off or short. Off means today's behaviour, which is honest. 3. **An escape hatch at the point of deletion.** `obliterate: true` on `repo.delete` skips the graveyard entirely, for the leaked-secret case. The UI should offer it plainly rather than hiding it behind a second workflow. 4. **Say which one is happening.** The confirmation must state whether the data is recoverable, because "delete" currently means destroyed and would come to mean something else. 5. **Report what the graveyard holds** on `/fleet`, next to the ingest health. An invisible store of deleted repositories is how a disk fills. ## What this does NOT cover Content already pushed to a peer. As zit says, a purge is local and a peer that holds the content keeps it. Deleting a repository from quarry does not unpublish anything anybody cloned, and no retention policy changes that. If quarry ever needs a takedown story it is `zit shun`, and that is a different ticket. ## Related - `a78a1bd913` — repository lifecycle, where deletion landed. - `8152617b99` — bound and queue expensive work: obliterating a large store is bulk-lane work.
- status changed to: "Open"
- title changed to:
Should deleted repositories be recoverable, and for how long?