Skip to content

patches: former names of retired or deleted patches can be reused before reclamation #329

Closed

Description

@allisonmahmood

Problem

Retire/delete reserve a patch's current name but not its former names. A later ordinary publication can take a former address while the original patch remains recoverable. Restoring the original does not recover that address.

Reproduction

  1. Publish patch A as old-name.
  2. Publish A again under new-name, retaining old-name as its redirect.
  3. Retire A, or delete it while still inside the recovery window.
  4. Publish B as old-name. The API returns 201, not 409 name_taken.
  5. Restore A. old-name still resolves to B.

The investigator reproduced both states over real Patches services and PostgreSQL. The independent reviewer repeated them through the actual in-process publish/lifecycle HTTP handlers with production filesystem storage and disposable PostgreSQL. Both off-state former-name checks failed. Live former-name reuse passed as intended; each current name remained reserved with 409 name_taken. Original content and versions stayed intact.

Contract and cause

The product explicitly reserves every name while retired/deleted. This is not a proposal to prevent the intentionally supported reuse of a live patch's former name.

claimName treats non-current as sufficient for reuse, while preflight rejects only current names. Neither accounts for the former name's owning patch lifecycle.

Share a lifecycle-aware availability rule between preflight and final claim. Keep final claiming inside the existing transaction, preserve live-alias reuse and release after reclamation. This affects former links only; the current address is not lost.

Audited at ef3e790. Found and independently checked by separate GPT-6 Astra agents in Oh My Pi. Only ordinary offline workflows and synthetic data were used.

Activity

  1. added
    bug
    needs-triage
    area:server
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:serverbugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions