Skip to content

fix(desktop): enforce owner-only access in internal builds - #4053

Draft
brow wants to merge 8 commits into
mainfrom
internal-owner-only-enforcement
Draft

fix(desktop): enforce owner-only access in internal builds#4053
brow wants to merge 8 commits into
mainfrom
internal-owner-only-enforcement

Conversation

@brow

@brow brow commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Problem

A provider-backed managed agent can still execute through local infrastructure, so backend type is not a safe authorization boundary. Internal Buzz builds need one effective access rule across local and provider-backed agents, while OSS builds must remain configurable.

Stored and relay-advertised access are deliberately not authoritative for this policy. A relay reader may still see a wider value such as anyone; runtime enforcement must clamp it at the point of actuation instead.

Changes

desktop/src-tauri/src/managed_agents/

  • Apply the compiled owner-only policy when configuring a local child process.
  • Reserve and set the local-spawn permitted-modes guard so the harness cannot widen access at startup.
  • Keep stored and summary access unchanged. The permitted-modes startup guard is local-spawn only.

desktop/src-tauri/src/commands/

  • Apply the same compiled policy when building provider deployment payloads.
  • Route production deployments through the current-build policy wrapper so the compiled policy cannot be bypassed by the deployment path.
  • Keep provider payload compliance beyond Desktop's handoff as a provider-harness trust boundary.

desktop/src/features/agents/, desktop/src/features/channels/, and desktop/src/features/onboarding/

  • Keep the access control visible in internal builds, but lock it to owner-only with an explanation.
  • Treat owner-only access as expected for both local and provider-backed Welcome teammates without masking unrelated restart requirements.

squareup/buzz-releases#74 supplies the internal-build marker in the shipped release pipeline. Until it lands, shipped activation is a fail-safe no-op.

Companion change: PR #4064 explains rejected non-owner messages in-thread.

Tests

Each production policy-wiring path has a dedicated regression that fails when its compiled-policy handoff is removed. Added coverage:

Playwright E2E was not run.

Quality gates at tip e0165f52b52741a74184c9899e2b51eeec40c939

  • Desktop Rust, OSS build: 2,093 passed, 0 failed, 15 ignored.
  • Desktop Rust, internal build: 2,093 passed, 0 failed, 15 ignored.
  • Desktop JavaScript: 3,910 passed, 0 failed across 61 suites.
  • TypeScript, the desktop check bundle, Rust formatting, clippy with warnings denied, and the file-size ratchet passed.
  • The dual-mode CI recipe ran the full Rust library suite in both build configurations and passed.

Originated from Buzz channel buzz-agent-control. Supersedes #2537.

npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp and others added 8 commits July 31, 2026 19:09
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
…nforcement

* origin/main:
  feat(desktop): Agent Trading Cards — mintable agent-snapshot card PNGs with optional NIP-44 lock (#3278)

Signed-off-by: npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp <58390b379a262b73ffc632f19c73e6769ef40f36c81e642b960246eff9831222@buzz.block.builderlab.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Amp <amp@ampcode.com>
Ai-assisted: true
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
…nforcement

Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>

* origin/main:
  docs: add one-click Railway deploy for a hosted relay (#2733)
  fix(desktop): point Oh My Pi preset at omp.sh (#3516)
  fix(mesh): stop restarting a busy or loading shared-compute node (#3909)
  fix(desktop): preserve first huddle speech (#3962)

Signed-off-by: npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp <58390b379a262b73ffc632f19c73e6769ef40f36c81e642b960246eff9831222@buzz.block.builderlab.xyz>
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