Skip to content

Wave1 P04: admin protocol (roles, NIP-98 auth, discovery, admin-web, reconcile) - #237

Closed
only21mil wants to merge 4 commits into
mainfrom
cursor/wave1-p04-admin-aa0f
Closed

only21mil wants to merge 4 commits into
mainfrom
cursor/wave1-p04-admin-aa0f

Conversation

@only21mil

Copy link
Copy Markdown
Owner

Summary

Wave 1 P04 admin protocol: ports upstream block/buzz#3777 (operator/moderator roles, NIP-98 admin auth, admin discovery, admin-web) plus the reconcile-channels --channel repair hunk from e0940927f (block#5765). Keeps the fork Host/Origin ingress restriction as an additional layer in every auth mode. Mirror of wave1/p04-admin (same commits) for tooling prefix requirements.

Relay-only first: the DB roster resolves empty until the roster migration lands (staffing writes answer 503 roster_unavailable). The P03 contract (table DDL plus exact Db method shapes) lives in crates/buzz-relay/src/api/admin/roster.rs; the P08 migration decision (five-migration bundle, ordered, adapted to fork schema) is in the wave report. No buzz-db/ or migrations/ changes here.

Related issue

none found (wave execution per project tracker; report at internal/wave1-p04.md in the project store).

Testing

  • cargo check and clippy clean: buzz-relay --all-targets, buzz-admin.
  • 27 new relay tests pass: role matrix, probe grants, moderator denial, replay-sparing rejections, replay reuse/backend failure, payload/method/timestamp forgery, 409 canonicalization, staffing round trip, pre-migration 503.
  • NIP-11 advertisement, config boot/decoupling tests pass.
  • admin-web: 14 Playwright specs pass (10 existing untouched, 4 new auth specs).
  • Two pre-existing DB-backed read tests fail on boxes without Postgres (500 instead of 404); identical on unmodified main. Needs just test infra.
  • buzz-admin reconcile-channels --help plus both guard errors verified; full run needs a live DB.
Open in Web Open in Cursor 

cursoragent and others added 4 commits September 13, 2026 20:18
…m, NIP-11 discovery

Port upstream block#3777 protocol unit: AdminAuth nip98/disabled
modes, config plus owner-fallback principal resolution, per-request
NIP-98 verification with deployment-scoped replay guard, staffing
endpoints behind a roster-store seam, and NIP-11 admin_api discovery.
Host/Origin ingress checks stay active in every mode.

Relay-only: DB roster resolves empty until the roster migration lands;
staffing writes report roster_unavailable. Contract for the DB lane is
documented in roster.rs.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: only21mil <only21mil@users.noreply.github.com>
…ments

Wire the dashboard to the relay admin auth protocol: discover the mode
with one unauthenticated probe, sign every request with a NIP-07
kind-27235 event (fresh nonce per call, payload hash on mutations,
single retry on 401), gate NIP-98 mode behind an extension-install
screen, and fetch attachments through the credentialed API. No token
entry surface.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: only21mil <only21mil@users.noreply.github.com>
Port upstream e094092 (block#5765) reconcile hunk: target one channel's
kind:39002 snapshot for republish after rollout, leaving 39000/39001
untouched. Refuses ephemeral keys for the targeted path and reports a
missing channel instead of silently backfilling nothing.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: only21mil <only21mil@users.noreply.github.com>
Document the NIP-98/role/staffing protocol as implemented, the
fail-closed startup matrix, NIP-11 admin_api discovery, and the
reconcile-channels repair path. Scope report resolution and feedback
writes as the enforcement follow-up.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: only21mil <only21mil@users.noreply.github.com>
@only21mil only21mil closed this Sep 13, 2026
@only21mil
only21mil deleted the cursor/wave1-p04-admin-aa0f branch September 13, 2026 20:27
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