crud-issues-delete.md
markdown
sha256:c2e5cf2d754ed2fe9a94e879d41ad12ff221d2ac4ac7b45247fcb981c76858bf
docs: Section 8 database/migrations/backups — verified live…
Sonnet 5
24 days ago
Issues: add delete capability (soft + hard)
Child of musehub#141 (parent: framework-wide CRUD/delete idiom).
Background
MusehubIssue (musehub/db/musehub_social_models.py) has no delete
concept at all — only state (open/closed). close/reopen are the
only lifecycle operations. There is no way to remove an issue, soft or
hard, via the CLI or API today. Confirmed hitting this directly during
#139's cleanup: ~40 test issues created for layout verification cannot be
removed, only closed.
Goal
- Add an
is_deletedcolumn toMusehubIssue, matching theMusehubIssueCommentpattern that already works. muse hub issue delete <number>— soft-deletes by default (setsis_deleted), matching #141's framework-wide idiom.muse hub issue delete <number> --hard— actually removes the row. Gate to repo owner/admin collaborator (same guard as other destructive issue operations).- Soft-deleted issues excluded from
issue listby default (add a--include-deletedflag for anyone who needs to see them), excluded from open/closed/unassigned counts on the issue list page. - Decide and document: does a hard-deleted issue's number get reused, or stay permanently retired? (Recommend: retired — reusing numbers after hard-delete reintroduces exactly the kind of ambiguity #140 is about.)
Out of scope
- Cascading behavior for comments/labels/anchors on a deleted issue — decide alongside the schema change, but keep simple: cascade delete on hard-delete, no special handling needed on soft-delete (comments stay, just orphaned from an invisible parent — same as GitHub's behavior).
File History
2 commits
sha256:c2e5cf2d754ed2fe9a94e879d41ad12ff221d2ac4ac7b45247fcb981c76858bf
docs: Section 8 database/migrations/backups — verified live…
Sonnet 5
24 days ago
sha256:80e1a60a39562f6e616aaafbb27487f03abbec7d8ffc6164302b7a0c0bfc63ee
docs: check off Section 0 items verified in inventory doc, …
Sonnet 5
24 days ago