All problems

Restoring an Archived Project Creates a Duplicate Active Slug

Level 2 · node · Data · Soft-delete restore uniqueness conflict

Scenario

The project service uses soft deletion by setting archivedAt. A slug from an archived project may later be reused by a new project. When an administrator restores the old project while an active project with the same slug already exists in the same workspace, both projects point to the same address and lookups become ambiguous.

Requirements

- Reject restoration when an active project with the same slug exists in the same workspace - The same slug in another workspace must not block restoration - When there is no conflict, restore by setting archivedAt to null - Return an already active project without changing it - A rejected restoration must not mutate repository state

Acceptance criteria

  • A same-workspace active slug conflict prevents restoration
  • The same slug in another workspace does not prevent restoration
  • A conflict-free archived project gets archivedAt set to null
  • An already active project remains unchanged
  • A project rejected for conflict remains archived