fix(desktop): enforce shared agent access across devices - #6086
Conversation
Discover cross-machine agents from relay-signed bot memberships, then resolve exact runtime, owner, and managed-policy coordinates without unbounded scans or filter fanout. Preserve headless directory profiles and fail closed on malformed authenticated policy. Co-authored-by: diegorumo <diegorumo@gmail.com> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Cover cross-identity discovery through a real relay and assert the final signed message carries the exact agent p tag. Flush the retained managed-agent policy during create so another identity does not wait for the background sweep, and expose the compiled owner-only capability for release verification. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Fail closed for deployed provider agents whose protocol cannot revoke an access edit, refresh local or provider runtimes when another machine applies an inbound policy, and preserve tightened access if a simultaneous rename profile sync rolls back. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Clarify that provider revocation relies on deploy idempotency, persist inbound payload-build failures on the agent record, and make rollback restart errors name the access policy that was kept. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Use the exact profile-selected agent when a persona-linked Edit dialog changes access, seed the dialog from that instance, and send the change through the fail-closed managed-agent update path. Stop active local runtimes inside the same store/process critical section before persisting the narrower policy. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Subscribe to managed-agent replacement events as freshness signals and invalidate the authenticated relay directory so other clients converge when access changes. Keep custom AI validation strict, but explain the missing provider or model and cover the exact Customize edit path. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Route every profile-panel persona editor through the exact managed instance's access policy, so an unrelated definition edit cannot restore stale broader persona access. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
|
Carl, an automated reviewer, commenting via Wes’s GitHub account. I found three blocking failure modes in the cross-device access enforcement on exact head
The authenticated owner-coordinate verification and malformed-policy fail-closed behavior looked sound in the paths reviewed. I did not rerun CI-equivalent suites; these are ordering and availability defects not established by a green broad suite. |
Commit inbound policy heads only after local revocation persists, serialize provider refreshes in relay order, and scope live freshness signals to exact authenticated owner-agent coordinates with a bounded single-flight cooldown. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
47f2e84 to
cab33f4
Compare
|
Carl, an automated reviewer, commenting via Wes’s GitHub account. The previous local replay, provider ordering, and refresh-amplification findings are materially addressed on exact head
The remediation does correctly serialize provider calls per agent and rebuild payloads from current saved state, so the earlier out-of-order stale-payload race is closed. Local stop/save failures also remain replayable because retention advances after successful local persistence. Authenticated refresh coordinates plus exact-pair checks and the five-second single-flight cooldown close the previous global refresh-amplification path. The remaining scheduler and injected local-stop replay coverage gaps are worthwhile but non-blocking. |
Keep sidebar-opened persona instances bound to their exact managed-agent record so access edits cannot target a sibling instance. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
preferDirectManagedAgent pinned every direct-opened profile to the exact clicked record, which fixed access edits targeting a sibling instance but broke the parity contract: an avatar on an old message from a stopped historical instance must open the persona's active instance, matching the Agents library. Resolve the conflict with one rule in pickDirectProfileAgent: keep the direct instance whenever it is active (access edits stay exact), and redirect an inactive direct instance to the persona's active instance when one exists. Covered by node unit tests for all three branches; both previously seesawing e2e specs (agent-access-warning:131 and profile:1837) pass together. Signed-off-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@buzz.block.builderlab.xyz> Co-authored-by: Wes <wesbillman@users.noreply.github.com>
jedwards27
left a comment
There was a problem hiding this comment.
A Team review — changes requested
Reviewed exact head 3183199695ccda3f397e530a9c1c9fea72ff9a77.
The current head fixes the direct-instance selection regression, but one security-sensitive provider enforcement failure remains.
P1 — a failed provider redeploy consumes the revocation without a general retry path
The inbound path saves the narrowed record and advances kind:30177 retention before the provider refresh runs (desktop/src-tauri/src/commands/personas/inbound.rs:266-319). Payload construction or deployment can then fail at inbound.rs:106-133; replay of the same event returns Skipped at :234-237, and the provider may continue running the older broader policy indefinitely.
The only startup/workspace reconciliation found is restricted to owner_only_access_build() (desktop/src-tauri/src/commands/agents/provider_access.rs:53-64), so ordinary shared-access builds do not have a durable recovery mechanism. Persist a pending provider-policy generation (or equivalent retryable enforcement state) until provider acknowledgement, and causally test failure followed by replay/restart and successful redeploy. A warning record is useful, but it is not enforcement.
Current CI is green, including Desktop/Rust/Windows, and git diff --check passes at the pinned clean head. Those gates do not exercise provider failure recovery. The documented inability to undeploy an older provider instance further increases the consequence.
Persist access-policy enforcement before provider deployment, retry unacknowledged policies across restarts in every build, and clear the marker only when the deployed payload matches the current saved policy. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Trim stale comments in already-oversized managed-agent modules so the durable provider-policy field does not grow them past the enforced baseline. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
…-correctness * origin/main: fix(acp): replace Goose native system prompt (#5964) feat(workflows): add responsive library card actions (#6008) fix(desktop): enforce shared agent access across devices (#6086) feat(model-capabilities): drive model capabilities and labels from one manifest (#5597) docs: refresh agent development guidance (#6049) Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
…p-repair * origin/main: Rename Bumble agent to Pollen (#5864) fix(desktop): resolve agent profiles through one archive-aware selector (#5706) fix(acp): gate relay-signed workflow messages on their attributed author (#6129) fix(acp): replace Goose native system prompt (#5964) feat(workflows): add responsive library card actions (#6008) fix(desktop): enforce shared agent access across devices (#6086) feat(model-capabilities): drive model capabilities and labels from one manifest (#5597) docs: refresh agent development guidance (#6049) feat(mobile): require device authentication for identity export (#5116) fix(desktop): hide the offcanvas-collapsed sidebar so it stops painting over the community rail (#5947) Polish mobile message threads and composer (#5645) chore(release): release Buzz Desktop version 0.5.14 (#5917) ci(release): remove desktop smoke gate (#5914) chore(release): release Buzz Desktop version 0.5.13 (#5912) fix(ci): read Playwright version without nested shell quoting (#5910) fix(desktop): restore the agent trading-card mint button (#5900) Projects v3: unify sharing, discussions, and issue ownership (#5792) chore(release): release Buzz Desktop version 0.5.12 (#5903) fix(mobile): unwrap batched observer telemetry (#5805) perf(desktop): update active turns incrementally (#5897) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> # Conflicts: # desktop/src-tauri/src/migration.rs
…graphy-staging * origin/main: Remove GitHub security advisory commitment (#6144) Rename Bumble agent to Pollen (#5864) fix(desktop): resolve agent profiles through one archive-aware selector (#5706) fix(acp): gate relay-signed workflow messages on their attributed author (#6129) fix(acp): replace Goose native system prompt (#5964) feat(workflows): add responsive library card actions (#6008) fix(desktop): enforce shared agent access across devices (#6086) feat(model-capabilities): drive model capabilities and labels from one manifest (#5597) Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Summary
Related issue
Fixes #3204
Known residuals
undeployop — the protocol has a constructor and no destructor #5570Testing