Fix delegated Content identity and receipts - #2797
Draft
3mdistal wants to merge 1 commit into
Draft
Conversation
Contributor
Visual recap — skippedThe visual recap job did not run for this pull request. This is informational only and does not block the PR. Recap skipped for |
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.
Problem
Alice should be able to ask Content's own AI, another app through
ask_app, or@agent-nativein a verified Slack direct message to change the same exact Content row under her own authority. The observed Slack DM instead reported a partial, misleading inventory: it omitted Alice's actual Personal feedback database and treated top-level system chrome as though it were ordinary user database inventory. Without the original trace, that symptom could come from the wrong principal, the wrong action, or the wrong interpretation, so this PR repairs and tests each boundary independently.Approach
Verified managed Slack DMs now resolve only to an exact member of the installation organization. They never borrow a deployment default, installation owner, or channel service identity. Managed channels keep their existing scoped service principal, so a mention there still cannot enter Alice's Personal space.
Content discovery now supports immutable space and database IDs and returns system-role collections separately from ordinary databases. Successful row and Blocks-field actions keep using the action contracts from PRs #2779 and #2781; this PR carries their read-back-verified, idempotent receipts through A2A and Dispatch without retaining private property values or block bodies.
What changed
ask_app, while keeping managed-channel mentions on the channel's service principal.spaceId/databaseIdContent inventory, with Files, Favorites, Workspaces, and othersystemRoledatabases returned in a separate collection.ask_appresults. Receipts retain the exact scope, row ID/link, revisions, affected IDs, andappliedversusreplayedresult, but exclude row values and block bodies.Safety and operations
There is no migration, flag, enablement, deploy, Slack send, or production Content write in this PR. Legacy signed artifact markers remain readable; new markers use a versioned envelope. Failed identity hydration is distinguishable from an unlinked or denied identity and performs no agent work. Rollback restores the prior routing and receipt presentation but cannot undo mutations already committed by Content actions; those actions' own idempotency and read-back contracts remain the side-effect authority.
This draft depends on the row mutation contract in #2779 and the Blocks mutation contract in #2781. It is intentionally based on
codex/content-feedback-block-actionsat7d992b6918c4971e3dac19fb3fbc68055dbfc3c8and does not absorb either dependency.Verification
ask_approuting, and structured receipt return.content_space_personal_dd0c011c68137c2ae7baa4d672932070, feedback database7uLr3ect3IIm/ documentFJk2OZ1SWcZ9, same-name decoy resistance, structural system-collection classification, and denial to a managed-channel principal without a hard-coded inventory count.git diff --checkpass.Real Slack, browser, provider, and production-connected acceptance was deliberately not run. Later acceptance must reproduce and attribute the original DM, verify same-thread replies and exact receipts, exercise delayed/retried delivery and partial failures/timeouts without replay, and compare DM access with managed-channel denial. That evidence remains pending rather than inferred from fixtures.
Review focus