Skip to content

feat(relay): allow channel admins to edit posts in their channel with edited_by provenance - #7788

Open
pete-lucern wants to merge 1 commit into
block:mainfrom
pete-lucern:feat/relay-role-edit
Open

pete-lucern wants to merge 1 commit into
block:mainfrom
pete-lucern:feat/relay-role-edit

Conversation

@pete-lucern

Copy link
Copy Markdown

Problem

Channel admins could delete and edit channel metadata, but kind 40003 message edits were limited to the original author (or the existing agent-owner exception). Projected tile/status-board posts therefore could not be maintained by a designated channel administrator.

Change

  • Allow the target message author, or an owner/admin member of the target event's channel, to edit a message. The existing same-channel target check remains enforced; admins from another channel are rejected.
  • Require delegated edits to carry a signed edited_by tag naming the editor, leaving the original event author unchanged. The SDK, CLI, and desktop builders now add this provenance.
  • Emit the existing relay audit path plus a durable kind-40099 system message with type message_edited_by_admin, actor, target event ID, and channel. Desktop renders it as “ edited a message”.
  • No feature flag or schema change was added: this uses the existing channel-role lookup, audit queue, and system-message path, with admin edit enabled by default as requested.

Tests

  • Focused relay edit tests: 6 passed, 0 failed.
  • cargo clippy -p buzz-relay --lib -- -D warnings: passed.
  • cargo check -p buzz-cli: passed.
  • cargo test -p buzz-relay --lib: 1063 passed, 7 failed, 122 ignored. The seven failures are unrelated environment-sensitive tests: six require a local Postgres buzz role, and one telemetry test depends on process-global tracing state.

Closest existing PR:

None found for channel-admin message editing. gh pr list -R block/buzz --search "edit admin" returned no directly relevant match; the closest-looking result was #5243, which concerns DM participant renaming rather than channel message authorization.

… edited_by provenance

Signed-off-by: Pete Casella <pete@lucern.ai>
@pete-lucern
pete-lucern requested a review from a team as a code owner September 21, 2026 20:58
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

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

This branch has not been deployed

No deployments
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.

1 participant