zz_

0e0966b8 ยท zzmq.dev@gmail.com/zz

Commit

0e0966b82752813fff272bbdc385488100eebdc8

Add "Clean up shards" to repo settings' Danger zone Recursively deletes every shard of a repo, and every shard of those shards, in one action -- depth-first so a shard's own shard_of_slug never points at an already-deleted row mid-operation. Gated on owning the top-level repo (same bar as Delete repo/Transfer ownership); individual shards get no separate authorization check since they're scratch workspaces that exist only because of this repo's own task delegation, not independently-owned repos. The button only renders when the repo actually has at least one shard. Tolerates a shard whose Artifacts repo is already gone, same idempotency as the doDeleteRepo orphan-row fix from earlier. Verified live against a real 2-level shard chain (parent -> shard -> shard-of-shard): both levels deleted, parent untouched, button disappears once empty.

Troy Howard <thoward37@gmail.com> -- 2026-10-13T04:01:16.000Z

Tree at this commit