crud-issues-delete.md
markdown
sha256:fd35b52294fe17892f05804659f29fa44e583018c702ea23073b154375506648
chore: bump version to 0.2.0.dev4 for nightly.4
Sonnet 5
patch
14 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
1 commit
sha256:fd35b52294fe17892f05804659f29fa44e583018c702ea23073b154375506648
chore: bump version to 0.2.0.dev4 for nightly.4
Sonnet 5
patch
14 days ago