Task 3efb07b4 (UI Bugs follow-up; owner decision: delete if there's no history, retire/deactivate if there is). Adds an admin-only hybrid Delete for a quest definition: history-free -> hard delete (instances, assignees, windows, definition row, schedule rule if unreferenced) in one transaction via QuestDefinitionsDao.delete_if_no_history; with any completion event -> set_quest_definition_active(False), preserving everything. DELETE /api/v1/admin/quest-definitions/{id} on the admin router (require_admin; unknown id 404, non-admin refused); admin tasks page Delete control + confirm that removes the row or shows it inactive. Docs: ADMIN-SPEC + CTXD DECISIONS D-017 and the glossary entry updated.
Evidence at ed23096: TZ=UTC uv run pytest -q = 2148 passed; cd admin && npm test = 302 passed; admin build ok; frontend build ok (panel bundle unchanged, no panel control).
Task 3efb07b4 (UI Bugs follow-up; owner decision: delete if there's no history, retire/deactivate if there is). Adds an admin-only hybrid Delete for a quest definition: history-free -> hard delete (instances, assignees, windows, definition row, schedule rule if unreferenced) in one transaction via QuestDefinitionsDao.delete_if_no_history; with any completion event -> set_quest_definition_active(False), preserving everything. DELETE /api/v1/admin/quest-definitions/{id} on the admin router (require_admin; unknown id 404, non-admin refused); admin tasks page Delete control + confirm that removes the row or shows it inactive. Docs: ADMIN-SPEC + CTXD DECISIONS D-017 and the glossary entry updated.
Evidence at ed23096: TZ=UTC uv run pytest -q = 2148 passed; cd admin && npm test = 302 passed; admin build ok; frontend build ok (panel bundle unchanged, no panel control).
Owner decision 2026-09-26: "delete if there's no history,
retire/deactivate if there is". A definition with no completion event
on any instance is hard-deleted (instances, assignees, windows, the row
and its unreferenced rule) in one transaction under the connection
lock; one with history is retired via set_quest_definition_active and
everything is preserved (D-005).
- core: QuestDefinitionsDao.delete_if_no_history (atomic history check +
deletes) and quest_definitions.delete_quest_definition
- api: DELETE /api/v1/admin/quest-definitions/{id} on the admin router
- admin: Delete task control with a hybrid-explaining confirm in the
edit sheet; the list removes or shows the row inactive
- docs: ADMIN-SPEC Definitions section
Task 3efb07b4-7bfa-45af-b36a-57d81249a39d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retirement preserves the definition row, schedule rule, assignees,
windows and all durable completion history, but like any deactivation
it regenerates, so future uncompleted instances are cleared and none
are recreated while inactive. Fixes the "deletes nothing / all
instances preserved" wording in the core docstrings, the admin DELETE
route description, ADMIN-SPEC and the retire test's docstring
(review finding NQ-262-1). No behavioural change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the over-broad "everything is preserved" with the precise hybrid
contract (NQ-262-2). Comment-only change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Task 3efb07b4 (UI Bugs follow-up; owner decision: delete if there's no history, retire/deactivate if there is). Adds an admin-only hybrid Delete for a quest definition: history-free -> hard delete (instances, assignees, windows, definition row, schedule rule if unreferenced) in one transaction via QuestDefinitionsDao.delete_if_no_history; with any completion event -> set_quest_definition_active(False), preserving everything. DELETE /api/v1/admin/quest-definitions/{id} on the admin router (require_admin; unknown id 404, non-admin refused); admin tasks page Delete control + confirm that removes the row or shows it inactive. Docs: ADMIN-SPEC + CTXD DECISIONS D-017 and the glossary entry updated.
Evidence at
ed23096: TZ=UTC uv run pytest -q = 2148 passed; cd admin && npm test = 302 passed; admin build ok; frontend build ok (panel bundle unchanged, no panel control).Owner decision 2026-09-26: "delete if there's no history, retire/deactivate if there is". A definition with no completion event on any instance is hard-deleted (instances, assignees, windows, the row and its unreferenced rule) in one transaction under the connection lock; one with history is retired via set_quest_definition_active and everything is preserved (D-005). - core: QuestDefinitionsDao.delete_if_no_history (atomic history check + deletes) and quest_definitions.delete_quest_definition - api: DELETE /api/v1/admin/quest-definitions/{id} on the admin router - admin: Delete task control with a hybrid-explaining confirm in the edit sheet; the list removes or shows the row inactive - docs: ADMIN-SPEC Definitions section Task 3efb07b4-7bfa-45af-b36a-57d81249a39d Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Independent Codex gpt-5.6-terra review completed for this exact commit.