Repository settings: PATCH and DELETE /api/repositories/:username/:slug and a Settings tab, covering rename, description, visibility, default branch and delete. The default branch is stored on the row and the materializer points HEAD at it, so clones, pages, contributions and closing keywords follow it.
Deleting a repository tombstones its write-ahead log index, purges every entry, the local cache and the code search shards, then drops the row. A push racing the delete loses its CAS to the tombstone and removes its own entry; rejected pushes now clean up after themselves too. See docs/0020.
A repository that heads an open pull request into another repository cannot be deleted. Closed and merged requests outlive it with a null head. Merged requests now read their frozen range from the base alone, which also fixes merged requests showing an empty diff.
Also: S3Service.deleteUnder follows pagination and surfaces per-key failures, e2e suites share a harness and migrate once in globalSetup, and the visibility radios are one component.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>