Skip to content

docs(protocol): propose simplified channel artifacts - #7791

Open
baxen wants to merge 1 commit into
mainfrom
fizz/channel-artifacts-simple
Open

baxen wants to merge 1 commit into
mainfrom
fizz/channel-artifacts-simple

Conversation

@baxen

@baxen baxen commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a short, proposal-only NIP-AR: Channel Artifacts in docs/nips/NIP-AR.md, as a simpler alternative to the closed #7771.

  • Defines complete-snapshot artifact events with stable identity and atomic, prev-based revisions.
  • Uses channel access and posting permissions for reads, edits, moves, and writer-authorized deletion.
  • Keeps client-defined content opaque to the relay, with exact tag filtering over current accessible state and bounded queries.
  • Covers durable source removal on moves, terminal deletion, and safe client fallbacks without defining task/project schemas or changing application behavior.

Remaining design work

This is a compact draft, not a complete implementation-ready wire contract. Concrete query request/pagination/error/limit-discovery formats, removal/replay wire details, and numeric query limits remain follow-up work. Prefer extending shared WebSocket REQ / HTTP /query surfaces rather than adding plugin-specific endpoints. No database layout or scale guarantees are proposed.

Related issue

Closest prior proposal: #7771 (closed). Searched existing PRs and issues for channel artifacts; no matching issue found.

Testing

  • Verified the committed document is byte-for-byte identical to the reviewed local draft.
  • Parsed the example JSON and its embedded JSON content; checked unique two-element example tags.
  • Reviewed the entire one-file diff and ran git diff --check.
  • Commit and push hooks passed (including DCO sign-off and differential file-size checks).
  • Full application CI was not run locally: this changes only a Markdown proposal, with no implementation or UI changes.

Signed-off-by: Fizz <400e8babadcee6a7f420103f10a2849d84c4a9c71d5bd04f3948c814216648a3@buzz.block.builderlab.xyz>
@baxen
baxen requested a review from a team as a code owner September 22, 2026 02:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-22T02:52:00.569387Z 9a8703e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 77729abfb692b25a0f4ec4a69add86af2e32c0dd...9a8703e992ada58194bd98bc2ad14c4c76481f48.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 9a8703e992ada58194bd98bc2ad14c4c76481f48 to authorize a new review.
Any previous review applies only to its recorded range.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a8703e992

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/nips/NIP-AR.md

Channel read permission governs every artifact read, including lookups, history, search, previews, counts, and live updates. Threads inherit their channel's audience. Membership and visibility changes take effect on subsequent reads and deliveries.

Write permission means permission to post a kind-9 message in the channel, including authentication, token restrictions, moderation, and archive checks. This includes agents and, where channel policy permits, nonmembers of open channels. Artifact writes use `channels:write`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align the artifact scope with channel write permission

Use messages:write here, or explicitly require both scopes rather than defining artifact authorization as equivalent to posting a kind-9 message. In this repository, kind-9 writes require MessagesWrite (crates/buzz-relay/src/handlers/ingest.rs) while ChannelsWrite is documented for creating and updating channels (crates/buzz-auth/src/scope.rs); consequently, a least-privilege agent or guest token that can post messages would satisfy every stated permission in this paragraph and the table below but still be unable to create or edit an artifact. This also works against the product contract's requirement to validate the design against the intended human/agent access model.

AGENTS.md reference: AGENTS.md:L13-L18

Useful? React with 👍 / 👎.

Comment thread docs/nips/NIP-AR.md

Defines `kind:45010` for editable records called **artifacts**. Each artifact has one home channel and may be attached to a thread. Its home determines who can read it. Any number of artifacts, including of the same type, may share a channel or thread.

The relay manages identity, access, and revisions. Clients define the content types, such as `buzz.task` or `buzz.project`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid introducing a second buzz.project identity

Do not advertise buzz.project as an artifact type without distinguishing it from the repository's existing Project entity. VISION_PROJECTS.md and NIP-MP already define projects as kind:30621 coordinates, whereas this example gives a project an artifact UUID and channel-scoped revision chain; clients following the example would therefore create two incompatible objects called a Buzz project, and task references could not resolve against the existing project routes or repository membership. Use a different type name or define an explicit mapping to the canonical 30621:<pubkey>:<d> project coordinate.

AGENTS.md reference: AGENTS.md:L13-L18

Useful? React with 👍 / 👎.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Review clear for the proposal-only scope

Reviewed exact head 9a8703e992ada58194bd98bc2ad14c4c76481f48 against base 77729abfb692b25a0f4ec4a69add86af2e32c0dd. The complete delta is the new 102-line docs/nips/NIP-AR.md; no implementation changes. No blocking finding. This is not an implementation-readiness certification or an approval review.

The draft fits the relay-owned, channel-scoped product direction: stable community-local identity, atomic prev-based revisions, access checks across read surfaces, source-and-destination write authorization for moves, durable source removal, and terminal deletion. I traced create/edit/conflict, anchor loss, rights changes, moves/history, deletion, current-state filtering, and client fallbacks. The explicitly deferred query/pagination/error/limit-discovery and removal/replay wire formats, numeric limits, database layout, and scale guarantees remain deferred.

Nonblocking clarifications

  • Unchanged anchors: line 61 explicitly permits edits after anchor loss. Read that as grandfathering an unchanged root, including the delete snapshot that preserves it. To avoid “supplied” being read as every complete snapshot, consider “On creation, or when changed from the previous accepted revision...” for the liveness check. The stated exception makes this clarification, not a blocker.
  • Token scope composition: line 67 selects channels:write while borrowing kind-9 posting eligibility, including token restrictions. Existing MessagesWrite and ChannelsWrite are distinct scopes. Before implementation, say whether channels:write replaces or supplements the message scope, with other posting checks unchanged. I do not treat the explicit artifact-specific scope as a deployed authorization regression.

Deferred work and existing suggestions

Current-state queries already require current tags only and omission of deleted artifacts. A future live filtered projection must handle leaving a filter and reconnect reconciliation, but this draft does not define that subscription surface. Requiring its full delivery design now would expand the agreed scope.

The illustrative buzz.project name and relationship tag do not define a replacement for NIP-MP kind:30621 or grant repository authority. The existing bot suggestion is useful future schema/naming feedback, not a blocker on this envelope proposal. GitHub history contains no human ruling adopting either bot suggestion; the author's closure of #7771 alone is not evidence that maintainers rejected that design.

Validation limits

Source-only review and fresh independent adjudication on the pinned Blox host; no checkout, builds, tests, or PR-code execution. One existing exact-head CI snapshot showed 8 successful and 28 skipped checks, with no pending or failing check. Application suites were path-skipped, and the substantive Codex security-review job was skipped with its required-range comment still outstanding. Those checks do not establish runtime correctness or security-review completion. No CI reruns or monitoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants