block / block/buzz

feat(nip-34): edit semantics for git issues (kind 1621) — every republish creates a new parallel event (+ optional: surface kind-1 comment replies in CLI)

Open
#7,491 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Problem

NIP-34 git issues (kind `1621`) have **no edit path**. kind 1621 is a regular kind on upstream main:

- not parameterized replaceable — `is_parameterized_replaceable` covers exactly `30000..=39999` (`crates/buzz-core/src/kind.rs:786–788`)
- not replaceable — `is_replaceable` covers `0 | 3 | 41 | 10000..=19999` (`crates/buzz-core/src/kind.rs:779–781`)

So ingest falls through to a plain insert (`insert_event_with_thread_metadata`, `crates/buzz-relay/src/handlers/ingest.rs:3152–3180`): republishing an issue never replaces anything — every republish creates a new, independent event, and issue identity is the event id.

Verified in production (`buzz1.techio.dev`, 2026-09-08): 8+ issues from the same pubkey coexist via `buzz issues list` — matching upstream main behavior exactly.

## Impact

Teams following an edit-first issue lifecycle (update the description in place, keep one canonical card, keep history in comments) cannot do it on top of NIP-34 as-is. Current workaround: publish a new version card (issue event) whose body links the superseded card, plus a kind-1 text-note reply on the old card pointing to the new one. Works, but duplicates cards and splits the thread.

Side note (related, smaller): the relay does accept kind-1 NIP-10 replies to an issue event (verified empirically — `buzz social publish --reply-to ` → accepted; the desktop app renders them as comments), but `buzz issues get` returns only the issue event and does not surface those replies, so CLI consumers miss comments entirely.

## Proposal

1. **Edit mechanism for NIP-34 issues**, e.g. one of:
- re-map issues to a parameterized replaceable kind (30xxx) with a stable `d`-tag (subject-derived), or
- a dedicated replace/patch event for NIP-34 kinds with stale-write protection (author-only), keeping the original event id addressable for audit.
2. **(Optional, smaller)** include kind-1 replies (comments) in `buzz issues get` output.

## Evidence (upstream main)

- `crates/buzz-core/src/kind.rs:779–788` — replaceable / parameterized-replaceable ranges; 1621 in neither
- `crates/buzz-relay/src/handlers/ingest.rs:3152–3180` — kind routing; 1621 → plain insert
- Production observation 2026-09-08 as above
- Empirical comment acceptance: kind-1 reply to issue event → accepted by relay

Refs: NIP-34.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.