buzz icon indicating copy to clipboard operation
buzz copied to clipboard

No way to delete or hide a published NIP-34 issue (kind:1621): `buzz messages delete` rejects non-channel events, and no `buzz issues delete` exists

Open 0xnfrith opened this issue 3 months ago • 1 comments

What's missing

A NIP-34 issue (kind:1621) can never be removed or hidden once published — even by its author.

  • buzz issues offers create / get / list / status / assign / unassign. No delete.
  • The generic escape hatch fails: buzz messages delete --event <issue-id> errors with event <id> has no h-tag — cannot determine channel, because the delete path assumes a channel message. Issues carry no h tag, so they are unreachable from the only NIP-09 surface the CLI exposes.
  • Setting status to closed (kind 1632) works, but Desktop still renders the closed issue in the project's issue list — there is no "hidden/superseded" treatment.

Reproduction

  1. buzz issues create --repo-owner <pk> --repo-id <d> --title "v1" --content "..." → accepted.
  2. Realize the body needs a fix. Since #2990 (no issue edit) is unresolved, republish as a new issue and try to remove the stale one:
  3. buzz messages delete --event <v1-issue-id> → {"error":"error","message":"event … has no h-tag — cannot determine channel"}
  4. buzz issues status --issue <v1-issue-id> --status closed → accepted, but the superseded duplicate remains permanently visible next to its replacement.

Why it matters

This compounds #2990: because issue bodies can't be edited, close-and-recreate is the recommended workaround — but every recreate strands an immutable, permanently visible duplicate. A project that iterates on issue text a few times accumulates a graveyard of near-identical dead issues, and there is no author-side remedy at all. The same author-delete right already exists for ordinary messages (NIP-09 self-deletes, cf. #6482) and is being asked for repo announcements (#2326, #5739); issues are the remaining NIP-34 root with no removal story.

Possible directions

  1. buzz issues delete emitting a NIP-09 kind:5 tombstone for the issue root, mirroring the buzz repos delete proposal (#5739). Relay soft-deletes the event row and rejects resurrection, consistent with the workflow-tombstone work (#4882, #5051).
  2. Fix the generic path: let buzz messages delete handle h-tag-less events the signer authored — the channel lookup is only needed for channel-scoped moderation, not for NIP-09 self-deletes.
  3. Desktop-only mitigation: collapse or hide closed issues by default (or add an explicit superseded presentation for a kind-1632 close that references a successor), so the immutability is at least not a UI problem.

(1) or (2) plus (3) would fully cover the author's "published the wrong thing" path even while #2990 remains open.


[From Tachikoma #1 — filed on behalf of nfrith from a Buzz agent session]

0xnfrith avatar Aug 24 '26 21:08 0xnfrith

Reproduced the workflows delete half's sibling — item 2, the NIP-34 issue deletion — and I can answer the open question in the body: the CLI never sends the event. The relay never sees it.

Live repro on c3132c3ee, against a kind:1621 issue I had just created:

$ buzz messages delete --event 58c995d096020969a5b8834a00431b0b1c08323488398d5cf45d657163ac2726
{"error":"error","message":"event 58c995d0… has no h-tag — cannot determine channel","retryable":false}

The failure is local, in crates/buzz-cli/src/commands/messages.rs:97-110:

fn channel_id_from_event(event_id: &str, event: &serde_json::Value) -> Result<Uuid, CliError> {
    …
    tags.iter()
        .filter_map(|tag| tag.as_array())
        .find(|tag| tag.first().and_then(|value| value.as_str()) == Some("h"))
        …
        .ok_or_else(|| {
            CliError::Other(format!(
                "event {event_id} has no h-tag — cannot determine channel"

delete resolves a channel UUID from the target's h tag before it will build the NIP-09 request. A kind:1621 issue is addressed by repo coordinate (a tag), not by channel — buzz issues create emits no h tag — so the lookup fails and the deletion request is never constructed, let alone signed or sent.

So this is not a relay-side accept-and-ignore. It's a CLI precondition that NIP-34 events cannot satisfy by construction.

Two things that follow, if useful for scoping:

  • buzz issues status --status closed does work on the same event, so closing is available today even though deleting is not. That may be enough of a workaround to note in the issue.
  • Any fix presumably needs delete to accept a repo-coordinate target the way issues status already does, rather than to relax the h-tag lookup — but which of those is intended is a maintainer call, so I haven't assumed one.

Happy to send a PR once someone confirms the intended shape.

PresentJay avatar Aug 31 '26 07:08 PresentJay