crud-issues-delete.md
markdown
sha256:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8
docs: add production launch discovery report and infra laun…
Sonnet 5
8 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:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8
docs: add production launch discovery report and infra laun…
Sonnet 5
8 days ago
sha256:eb0928124669c933c0ef852bea1ad0c56649cf21bd7e9663c3b51004771b0591
docs: add MuseHub cloud identity/AWS operating model and Go…
Sonnet 5
patch
8 days ago