Repository navigation
Conversation
owner_media_get reads one media blob of the agent's community signed as its owner, holds it in native memory, and saves it to the agent's media folder only once protection has reviewed the answer and the binding, owner sign-in and agent still hold. Remote Codex and Claude targets do not list it and are refused it before any read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kyle Zemek <kylez@squareup.com>
- Refuse publication while an organization sign-out's retirement is pending. - Count a staged or publishing body's capacity until it is dropped, and never grow an unknown-length body past its reservation. - Sign the media read again once the community credential is known. - Start Codex threads fresh when owner_media_get joins their tools. - Validate request ids on discard and publish; say nothing was saved when saving fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kyle Zemek <kylez@squareup.com>
Replace the ungated lock-order race with two controlled interleavings: a publication held after review refuses a deletion, sign-out or closed identity that came first, and a sign-out that arrives while a publication holds the fence waits for its whole file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kyle Zemek <kylez@squareup.com>
A reload cleared every owner media operation, including a publication still writing its body, so the next page could reserve a full budget while that body was live. Keep publishing operations until their publication drops them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kyle Zemek <kylez@squareup.com>
kazemek21
marked this pull request as ready for review
November 7, 2026 09:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Adds
owner_media_get, so an agent running in this app on a bundled harness can get one of its community's media blobs signed as its owner, matching the other owner read tools. The bytes stay in native memory. They are saved to a file only after protection has reviewed the answer and the owner binding, sign-in and agent still hold. Agents on remote Codex/Claude targets never see the tool and are refused it before any read.How it works
app_agent_owner_media_stage,src-tauri/src/app_agents/owner_media.rs)media_get.getauth (kind 24242) only through a purpose-limitedIdentityHost::sign_owner_media_get. It does not add a generic signer.Content-Lengththe full per-file limit is reserved, and chunks past the reservation are refused. The buffer grows fallibly and never past its reservation.owner-access.ts): after the tool-result review, one synchronous segment checks the held binding and the caller check, then invokes native publish.hold_ownerkeeps the owner signed in.commit_callertakes the existing lock order (IdentityHost → AgentTokens retired → incarnations → FI state → op), re-checks the agent's retirement (including a pending organization sign-out) and incarnation, takes the staged op, and writes the first chunk.ownerAccess.mediafor a remote target.ownerAccess.owner_media_getis listed. An existing local owner thread therefore starts fresh once instead of resuming with a stale tool list.Evidence
Rust: 10 new
owner_mediatests cover:They run against the loopback TLS community fixture, so the host→relay request is real. Result:
cargo test --libfiltered to owner_media, identity, relay, federated_identity::agent, app_agents and browser_permissions gave 490 passed, 0 failed, run on Linux Blox. The fence tests passed five repeated runs. Each of three mutants ofcommit_callermakes one of them fail: dropping the retirement check, dropping the deletion check, and writing after releasing the retirement lock.JS: tests in
owner-access.test.ts,owner.test.ts,codex/runtime.test.tsandclaude-code/execution.test.tscover:tool → stage → tool-result → publish/discard);The Claude remote test and the Codex stale-thread test fail without their fixes, as do the Rust pending-sign-out and buffer-capacity cases. Vitest across
src/buzz-mcp,src/features/agents,src/features/agent-harnessandsrc/bundled/{codex,claude-code,pi}passed: 2946 tests.Not exercised: the native publish path has not been run in the live app. The fence tests drive the real
publishand the real credential locks, not the WebView. A deletion or identity close that arrives inside the fence is ordered by the same locks, but no test observes it waiting.Overlap
Touches areas also changed by open PRs #2972, #2882, #2336, #2937, #1939, #2950, #2976, #2642, #2700, #1735, #1893, #2953, #2896, #2836 and #2473. Of these, #2882 (streaming protected evidence) is the closest. This PR doesn't stream full bytes to protection; the existing review sees the reply's metadata, path and inline image data only.
🤖 Generated with Claude Code
— Posted by Claude Code (claude-opus-5-5) on behalf of kylez