Skip to content

relay: per-channel no-bridge export policy, surfaced on kind:39000 - #18

Merged
NickFlach merged 3 commits into
mainfrom
feat/645-no-bridge-export-policy
Aug 7, 2026
Merged

NickFlach merged 3 commits into
mainfrom
feat/645-no-bridge-export-policy

Conversation

@NickFlach

Copy link
Copy Markdown
Collaborator

The missing half of the privacy story: kannaka-hive-bridge already reads a no-bridge tag on kind:39000 and fails closed — but nothing emitted it, so every joined room was exported to the NATS spine (90-day retention) with no wire-level opt-out.

  • migrations/0027: channels.no_bridge BOOLEAN NOT NULL DEFAULT FALSE — existing channels unaffected.
  • kind:9002 no-bridge tag (true/false) updates the flag. Authz: owner/admin tier — same as name/about, deliberately not the any-member tier topic/purpose use. Emits a no_bridge_changed system message.
  • kind:39000 relay-signed metadata carries no-bridge whenever set, so any consumer can honor it without out-of-band configuration.
  • ChannelRecord/ChannelUpdate gain the field; older SELECT paths fall back to false (the topic/purpose column pattern).

Unblocks kannaka-labs/kannaka-memory#636 (the end-to-end fixture: flag a throwaway channel, assert it stops crossing to NATS within HIVE_POLICY_REFRESH_SECS).

Closes kannaka-labs/kannaka-memory#645

🤖 Generated with Claude Code

flaukowski and others added 2 commits August 7, 2026 01:25
…lock#645)

The missing half of the privacy story: kannaka-hive-bridge already
reads a no-bridge tag on kind:39000 and fails closed on unresolvable
channels, but nothing ever emitted the tag - every joined room was
exported to the NATS spine with 90-day retention, without a wire-level
way for members to opt out.

- migrations/0027: channels.no_bridge BOOLEAN NOT NULL DEFAULT FALSE
  (existing channels unaffected)
- kind:9002 'no-bridge' tag ('true'/'false') updates the flag.
  Authz: owner/admin tier - same as name/about, deliberately NOT the
  any-member tier topic/purpose use; export control is not a casual
  edit. Emits a no_bridge_changed system message.
- relay-signed kind:39000 metadata carries a no-bridge tag whenever the
  flag is set, so any consumer honors it without out-of-band config.
- ChannelRecord/ChannelUpdate gain the field; older SELECT paths fall
  back to false (same pattern as the topic/purpose columns).

This also unblocks kannaka-labs/kannaka-memory#636 (the end-to-end
no-bridge fixture): flag a throwaway channel, assert it stops crossing
to NATS within HIVE_POLICY_REFRESH_SECS.

Closes kannaka-labs/kannaka-memory#645

Co-Authored-By: Claude Fable 5 <[email protected]>
…hot; rustfmt

The relay e2e applies schema/schema.sql, not migrations — a migration
without its snapshot twin boots the test relay against a channels table
missing the column, and every channel-touching ingest 400s (21 e2e
failures).
@NickFlach
NickFlach merged commit 0b92a2d into main Aug 7, 2026
29 checks passed
@NickFlach
NickFlach deleted the feat/645-no-bridge-export-policy branch August 9, 2026 18:08
NickFlach pushed a commit that referenced this pull request Oct 29, 2026
…t policy) into the upstream sync

Both August features ported onto upstream's restructured tree:
- block#645 no_bridge: ChannelRecord/row mapper/SELECT lists/ChannelUpdate and
  update_channel_on in store/channel.rs (upstream moved channel.rs there),
  the `no-bridge` tag from group_metadata_tags (the single kind:39000
  builder), the kind:9002 privileged key and its edit arm on upstream's
  `edit.columns` path; migration renumbered 0027 -> 0076 (upstream owns
  0027..0075; the embedded-migrator test asserts 76 now) with the SET LOCAL
  timeouts; the column in schema/tables/public/channels.sql.
- block#644 validate_job_event merged cleanly into ingest.rs.
- The stray crates/buzz-relay/.concat is gone.
cargo check, clippy -D warnings (buzz-db, buzz-relay, buzz-workflow,
buzz-kannaka, buzz-dev-mcp) and the migration tests pass locally.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.

[kannaka-buzz] Add a per-channel no-bridge export policy, surfaced on kind 39000

2 participants