Skip to content

feat: private agents and sessions, and sharing (M3) - #7791

Merged
mmabrouk merged 72 commits into
release/v0.125.0from
feat/m3-agent-session-sharing
Oct 25, 2026
Merged

mmabrouk merged 72 commits into
release/v0.125.0from
feat/m3-agent-session-sharing

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Ships in v0.125.0. Merge before #7780 and #7789.

Context

Today every agent and every chat in a project is visible to every member of that project. A person cannot keep a draft agent or a private conversation to themselves, and cannot share one chat with one colleague.

This PR adds private agents and private sessions, and lets the owner share a chat with named project members as "Can view" or "Can send". It is milestone M3 of the sharing program (docs, M1, M2 and M4a are already in release/v0.124.0).

Changes

Who sees what

  • An agent is project (everyone in the project) or private (only its owner). A private agent leaves every list, every picker and every channel for other people. An unknown id and a hidden id get the same not-found answer.
  • A session is private by default when a person starts it, and project when an API key, a schedule without a person, or a channel starts it. The owner can share a private session with members (viewer = Can view, participant = Can send), or with the whole project, and can stop sharing.
  • Every entry point checks the agent and session policy as step 4 of the access decision: lists filter in SQL, single reads hide, the runner write routes check the run that the heartbeat admitted, and live streams recheck while they are open (a revoked grant closes the stream).
  • A channel (Slack, Telegram, WhatsApp) cannot bind a private agent. Making an installed agent private stops its new channel turns.
  • A project-visible web chat lets every member whose role can run chats read it, send to it and answer its approvals, owned or ownerless, also after the owner left (owner decision, release QA R3 option 2). Rename, archive, delete and sharing stay with the owner. A Slack chat stays read-only in Agenta: a channel thread that names a session id always makes that session project-visible and ownerless, whoever creates its row. A person's first send or heartbeat on such a row is refused before it takes a turn; the row stays, idle, for the channel.
  • The owner leaves the project: a private chat stays locked, a project chat stays open to members, a project agent becomes ownerless, and a project admin can take ownership.
  • Deleting a private session leaves a tombstone (session_trace_tombstones, the table the session-trace-privacy design defines). The session's records stay with tracing retention, so the id stays hidden from everyone but its former owner, and no session is created with it again.
  • POST /tools/call checks the agent or session that a reserved platform tool names before it runs (read_config, commit_revision, list_starters, create_app).

Schema and rollout

  • oss000000048 adds agent_access, session_grants, session_trace_tombstones, the policy columns on session_streams and the index ix_channel_threads_project_id_session_id (built concurrently, like the session index) (now after oss000000050, one head: oss000000049).
  • oss000000049 backfills every existing agent and session as project, with the owner rule of the contract. It reads each first turn with a LATERAL join after an ANALYZE, so one batch stays under a second at 1M sessions.
  • Old pods keep working during a rolling deploy: a row they write without a policy gets one on first access.

UI (/m)

  • The chat tab strip has Share, with a dialog for people, roles, general access and Copy share link.
  • The playground top bar has the agent privacy control (private, share with project, transfer ownership, take ownership).
  • The agent list shows the owner and a lock on private agents. Channel setup says which agents cannot connect and why.
  • /w creates project-visible chats and agents, as before. This is the one change under the frozen web/oss: /w still runs, and without it a person's new /w chat or agent would become private with the new backend default.

Cost (the send path costs what it cost in M2)

Per request, warm M2 M3 before the fix round M3 now
Live send: Postgres statements 24 26 (new session) 23
Live send: Redis commands, existing session 65 75 65
Live send: Redis commands, new session 63 73 60
GET /sessions/{id} Redis, API key / Bearer 4 / 6 5 / 8 4 / 6
POST /sessions/query, streams/query Redis, Bearer 3 4 3
GET /sessions/{id}/sharing Redis, API key / Bearer (new) 3 / 8 1 / 3
Steady heartbeat Redis 15 16 15
Send p50 to response headers, all editions and credentials 84 to 118 ms 1229 to 1439 ms 77 to 140 ms

How the send was measured: all 40 API requests of two live sends (a new session, then the same session) were captured with tcpdump on stack A. They were replayed one at a time against M2 (743bc49335) and M3 in one process, with the same Postgres, a dedicated Redis and warm caches. Every replayed status matched the capture.

What made the send equal again:

  • A runner write reads its turn's admission keys (running and admitted) in the request's one MGET, instead of one Lua script per write. The heartbeat renews the admission record (beat 30 s, TTL 3600 s). A write never renews it.
  • mounts/sign and interactions/query read the session's sharing entry in that same MGET.
  • A session with no row is answered from its one policy read. "No row" is never cached: a cached absence could authorize a row created a moment later.
  • A turn is inserted with one INSERT ... SELECT ... WHERE EXISTS statement, only when its stream is the row of its session (it was an insert plus a refresh). A session row is inserted after a per-id lock with one INSERT ... SELECT ... WHERE NOT EXISTS (tombstone) statement (it was an insert plus a refresh).
  • The send regression of the first QA round (about 1.2 s) came from the cache lock on a session with no row. That read now uses retry=False and never waits on the lock.

Changelog

  • New chats and agents in /m start private.
  • A chat shared with the project lets every member read it, send to it and answer its approvals. Rename, delete and sharing stay with the owner.
  • Deleting a private chat hides it from everyone else.

Tests / notes

Gate run on stack A after the rebase on release/v0.124.0 (29edb5f95e):

  • Unit: OSS 9246 passed, EE 10194 passed. SDK 3646, services 226.
  • Integration (sharing, sessions, memberships): OSS 266, EE 268.
  • Acceptance (sharing, sessions, channels, triggers, workflows, mounts, tools): OSS 327, EE 374.
  • Web: package unit tests pass (entities 2595, chat 1403, entity-ui 1445, sessions-ui 63, and the rest), mobile unit 672 passed, type-check clean for mobile, oss and ee. newChatShareButton failed once under load and passed in the next two runs.
  • Rollout from the pre-M3 dumps (alembic oss000000047): 047 -> 050 -> 048 -> 049 in one run. OSS: 050 18 ms, 048 25 ms, 049 33 ms (40 agents, 312 sessions). EE: 050 17 ms, 048 29 ms, 049 32 ms (39 agents, 243 sessions).
  • Tested at 50k and 1M synthetic sessions on a scratch Postgres: at 50k the backfill takes 1.6 s in 12 batches (max 0.24 s); at 1M it takes 78 s in 202 batches (max 0.84 s, whole run 87.5 s). A concurrent write probe waited at most 0.52 s and never hit its 2 s lock timeout. Before the ANALYZE + LATERAL fix, the first 1M batch hit the 60 s statement timeout.
  • Mixed versions: M2 pods on the M3 schema and M3 pods next to M2 pods were checked on EE.
  • CodeRabbit reviewed the PR in two filtered passes (it skips a PR over 300 files): pass 1 the 219 source files (17 threads, all fixed), pass 2 the 216 test files (4 threads and 2 nitpicks, all fixed). The temporary filter commit is removed.
  • Codex reviewed the fix rounds: the latency round (3 rounds, the last one has no must-fix), the send-path round (3 rounds, ready) and a security review of the full diff at xhigh effort (3 rounds, no blocking issue; summary in a comment below).

QA (headless Chromium, both editions, /m and /w):

Flow Result
Private agent, private chat, hidden == unknown PASS
Share Can view, Can send (approval as a sender), Stop sharing, Copy share link gives no access PASS
Live revocation (14 s), agent made private while open (56 s) PASS
Owner leaves, take ownership, re-add PASS
Agent list owner and lock, privacy control, transfer ownership PASS
Slack setup notice, private agent stops channel turns PASS
API key and schedule ownership, /w regression sweep, logs clean PASS
Defect Status
D1 Share button missing in a new chat until reload Fixed
D2 Copy share link throws on plain HTTP Fixed (selection fallback)
D3 OSS editor with a viewer organization role is denied By design (M1). A Can send grant for a role that cannot send now shows as view only
D4 Person's explicit private request at agent create ignored Fixed
D5 Refused send says only "try again" Fixed
D6 Agent overview ignores privacy Fixed
D7 Session row menu does not match the design Fixed (Open, Copy share link)
D8 Agent row menu has no "Privacy and owner" Follow-up (open design item)
D9 People picker opens by itself Fixed
D10 Take-ownership panel lacks the explanation Fixed
D11 Duplicate admin membership answers 500 Follow-up (not M3)
D12 Empty session list says filters hide everything Follow-up (no design text yet)

Recordings are in the first comment.

Follow-ups

  • A trigger claim inserts its session row with its own statement and does not apply the channel-thread rule. It is not reachable today (a trigger session id is a fresh UUID); move the claim onto the shared insert if that changes.
  • An API key can send into an ownerless channel (Slack) session: rule S3 allows every non-human principal there. This is the behavior before this PR. A later change should tell the channel's own runs apart from interactive API requests.
  • M9: the EE retention flush of tombstones (older than retention plus one day).
  • D8, D11, D12 above.
  • An agent with no access row (an agent without a creator, or an unknown id) makes /m read the revision once per 60 s budget. Count the existence in the cached agent lookup.
  • Some sharing tests still replace the decision and the cache lookup with mocks. Add behavioral tests for the memo race and an open chat whose agent disappears.

What to QA

  • /m as Alice: start a chat. Share it with Bob as Can view. Bob opens the link and sees the history, a "View only" chip and no composer.
  • Change Bob to Can send. Bob sends and the agent answers. Remove Bob while his chat is open: within about 15 s his composer is replaced by "You no longer have access to this chat".
  • Alice makes the agent private in the playground top bar. Bob's agent list no longer shows it, and the agent's id answers the not-found screen.
  • Regression: an API key chat and a Slack chat stay visible to the whole project, and /w lists and opens chats as before.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

📘 Docs preview

Status ✅ Ready
Preview https://pr-7791-agenta-docs-preview.mahmoud-637.workers.dev/docs/
Inspect Actions run
Commit 36ae78a777fa859c0a7c63ab2fb035436853f924

Pages changed in this pull request

This comment updates in place on every push.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • New Features
    • Agents and chats can now be private or shared with a project. Owners can manage agent visibility and ownership, and invite project members to chats with viewer or participant access.
    • New privacy indicators, sharing dialogs, member search, and access details make sharing status easier to understand.
    • Chats with limited access display read-only notices and restrict sending or approval actions as appropriate.
    • Channel settings explain when private agents cannot be connected and provide controls for sharing agents or turning eligible connections back on.
  • Documentation
    • Added guidance on sharing agents and chats, access limits, and Slack behavior.

This pull request adds private and project visibility for agents and sessions, session grants, ownership transfer, and project-member lookup. It adds storage and access checks, run admission at multiple execution boundaries, API routes, web sharing controls, and migration and test coverage.

Changes: Agent and session sharing

Layer / File(s) Summary
Sharing data and persistence
api/oss/src/core/sharing/*, api/oss/src/dbs/postgres/sharing/*, api/oss/databases/postgres/migrations/core_oss/versions/oss00000004*, api/oss/src/core/workflows/*, api/oss/src/dbs/postgres/workflows/dao.py, api/oss/src/core/sessions/streams/*, api/oss/src/dbs/postgres/sessions/streams/*, api/oss/src/core/memberships/*, api/oss/src/dbs/postgres/memberships/*
Adds access-policy and sharing DTOs, database tables and migrations, agent-ownership handling, and owner- and grant-scoped list queries.
Resource checks and sharing routes
api/oss/src/core/access/*, api/entrypoints/access.py, api/oss/src/apis/fastapi/sharing/*, api/entrypoints/routers.py, api/oss/src/apis/fastapi/{workflows,applications,evaluators,sessions,mounts,channels,agent_templates,legacy_variants}/*
Wires SharingService into AccessService and adds sharing routes. Resource checks now filter or hide inaccessible agents, sessions, mounts, and embedded references.
Run admission and execution continuity
api/oss/src/core/sharing/admission.py, api/oss/src/core/sessions/streams/service.py, api/oss/src/dbs/redis/sessions/*, api/oss/src/core/sessions/commands/*, api/oss/src/tasks/asyncio/*, api/oss/src/core/tools/*, api/entrypoints/worker_queues.py
Adds admission checks for heartbeats, template starts, queued inputs, approval resumes, channel and trigger dispatch, and child workflow calls. Redis records the admitted principal for a running turn.
Sharing client and web experience
web/packages/agenta-entities/src/sharing/*, web/packages/agenta-sessions-ui/src/sharing/*, web/packages/agenta-entity-ui/src/sharing/*, web/mobile/src/features/chat/*, web/mobile/src/features/agents/*, web/packages/agenta-settings-ui/src/channels/*, web/oss/src/components/AgentChatSlice/*
Adds agent and session sharing clients and controls, read-only chat states, private-resource markers, channel handling for private agents, and project visibility for new /w chats and agents.
Coverage and supporting docs
api/oss/tests/pytest/{unit,integration,acceptance}/**, web/*/tests/**, web/storybook/stories/entity-ui/Sharing*, docs/docs/guides/14-share-agents-and-chats.mdx, docs/design/sharing-program/*, openspec/changes/agent-session-sharing/*
Adds tests for persistence, visibility, admission, sharing writes, and UI behavior. Updates the design and user documentation for sharing and access rules.

Priority: High

Estimated code review effort: 5 (Critical) | ~90 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Request
  participant RunAdmission
  participant WorkflowsService
  participant AccessService
  participant SharingService
  Request->>RunAdmission: Submit run envelope and target
  RunAdmission->>WorkflowsService: Resolve agent reference
  RunAdmission->>AccessService: Check session and agent permissions
  AccessService->>SharingService: Evaluate resource policy
  SharingService-->>AccessService: Return policy decision
  AccessService-->>RunAdmission: Return access decision
  RunAdmission-->>Request: Continue or refuse run
Loading
Merge Risk: Low · up to c248a

The new denial test can pass even if private-agent access is allowed; scope the refusal to the admitted target before relying on this security regression test.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 38.15% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 865 functions across 102 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely summarizes the main change: private agents and sessions with sharing support.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description directly explains the private-agent, private-session, sharing, access-control, migration, UI, rollout, and testing changes reflected in the pull request.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Website preview

Preview URL: https://pr-7791-agenta-website-preview.mahmoud-637.workers.dev

Built from 36ae78a777fa859c0a7c63ab2fb035436853f924. This comment updates in place on every push.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: Live QA recordings of M3 on stack A (OSS, headless Chromium, a fresh profile per user, the real login page, /m). They cover: Alice makes an agent private and Bob no longer sees it; Alice shares a chat with Bob as Can view and then Can send; Bob loses access live while the chat is open; the chat chip and general access (Shared with project); the owner leaves and an admin takes ownership; ownership transfer; and a /w regression pass. All 37 recordings (OSS and EE) are kept in the QA folder.

A-alice-oss.mp4
A-bob-oss.mp4
B-alice2-oss.mp4
B-bob2-oss.mp4
C-bob-oss.mp4
F-bob-oss.mp4
E-dana-oss.mp4
T-oss.mp4
W-alice-oss.mp4

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai full review

This PR has more than 300 files. A temporary path filter in .coderabbit.yaml (last commit) limits this pass to the source files (219). A second pass will cover the tests, and the filter commit is removed before merge.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Item Value
Status stopped
Commit 36ae78a777fa859c0a7c63ab2fb035436853f924
Manual expiry (UTC) Not granted
CI deadline (UTC) Not granted
Workflow https://github.com/Agenta-AI/agenta/actions/runs/40241526175

PR closed or converted to draft. Environment absence verified; retained storage requires separate provider accounting.

Post /preview as a new comment to request a one-hour preview. Repeating it while active does not extend the hour.
Preview data is disposable. Expiry is enforced by the next successful cleanup sweep, not an exact timer.
Environment deletion stops its compute. Provider-retained storage and permanent services may still be billed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🧹 Nitpick comments: 4
web/packages/agenta-sessions-ui/src/sharing/SessionShareDialog.tsx: 1

111-113: Trivial · Maintainability & Code Quality · Low value

Shorten this comment to one line.

The rule allows at most one short line per comment, and this one runs three lines. Keep only the non-obvious reason.

♻️ Proposed fix
-    // An open confirmation acts only inside the open dialog, on a state that is known and still
-    // the owner's: a re-read that fails, loads an account name, or takes the ownership away
-    // closes it.
+    // Confirmations close when the state is unknown or no longer the owner's.

As per coding guidelines, web/AGENTS.md: "At most ONE short line per comment. No multi-line blocks narrating why in prose".

Source: Coding guidelines

web/mobile/src/features/chat/useAgentVisibilityRecheck.ts: 1

3-9: Trivial · Maintainability & Code Quality · Low value

Shorten this doc comment.

The rule allows at most one short line per comment. This block runs seven lines and narrates the flow. Keep the one non-obvious fact.

♻️ Proposed fix
-/**
- * Re-read the agent's latest revision each time the session's sharing recheck reads (the 60 s
- * budget, see `useChatAccess`'s `checkedAt`). The server answers a hidden agent like an unknown
- * one, so this is what turns "the owner made the agent private" into `agentHidden` while the
- * chat stays open: no separate timer, and nothing on the first read (the revision query has
- * just loaded then). `enabled` is false while no agent is bound, so nothing asks for an empty id.
- */
+/** Re-reads the agent revision on each sharing recheck; the server hides a private agent as unknown. */

As per coding guidelines, web/AGENTS.md: "At most ONE short line per comment. No multi-line blocks narrating why in prose".

Source: Coding guidelines

web/mobile/src/features/chat/useChatAccess.ts: 1

15-39: Trivial · Maintainability & Code Quality · Low value

Shorten this doc comment.

The rule allows at most one short line per comment. This block runs 24 lines and restates behavior that the code shows. Keep the non-obvious constraints, such as the 60 s recheck bound and the "controls wait while loading" rule, and cut the rest.

As per coding guidelines, web/AGENTS.md: "At most ONE short line per comment. No multi-line blocks narrating why in prose, no restating what the code shows."

Source: Coding guidelines

api/oss/src/core/sessions/streams/service.py: 1

673-682: Trivial · Maintainability & Code Quality · Quick win

Remove the duplicated comment block.

Lines 673-682 repeat Lines 664-672 word for word. The repeated text still says the tombstone check runs "before it touches ANY lock or the row", which is no longer true now that admission and row creation run first. Keep one short line that describes the current order in bind_turn_for_beat. The coding guidelines say: "Keep AI-generated in-code comments minimal… Prefer one terse line over a multi-line block."

Source: Coding guidelines


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 29edb5f and 02194da.

Files ignored due to path filters: 264
  • api/oss/tests/pytest/acceptance/channels/bridge_process/test_bridge_two_bridges.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/differential/test_slack_in_process_vs_bridged.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/support.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/test_channel_tools.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/test_channels_permissions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/__init__.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/support.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_agent_owner_by_commit.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_channel_sessions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_default_visibility.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_heartbeat_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_hidden_references.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_list_parity.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_owner_leaves.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_ownerless_creation.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_queued_and_resume_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_session_files_follow_session.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_shared_turns_authority.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_sharing_audit.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_shortcuts_closed.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_stream_sharing_state.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_trigger_claim_owner.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/access/test_run_principal_query_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/channels/test_channels_composition_seam.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/channels/test_channels_connection_write_path_integration.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/channels/test_channels_service_routing_dao.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/memberships/test_admin_membership_invalidation_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/memberships/test_hot_path_query_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/memberships/test_membership_parity_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_sessions_query_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_trigger_session_claim_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_turns_dao.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_wp5_dao_fanout.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/__init__.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_admission_settlement.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_list_scope_sql.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_project_members_query.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_resolve_agent_environment.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_runner_write_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_session_claim_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_backfill.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_dao_locks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_query_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_redis_round_trips.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_schema.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_workflows_dao_atomic.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_access_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_check_action_access_wrapper.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_decide.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_grant_exchange.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_organization_write.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_principal_invalidation.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_role_allows.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_run_principal_dtos.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/agent_templates/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/agent_templates/test_loader.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/agent_templates/test_router.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/applications/test_simple_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/apps/test_create_app.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_agent_tool_settings.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_edit_semantics.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_busy_thread.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_principal.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_live_qa_regressions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_rechecks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_request_reactions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_turn_context.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/whatsapp/test_whatsapp_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/embeds/test_embedded_agent_visibility.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/evaluators/test_simple_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/git/test_commit_revision_slug_conflict.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/memberships/test_query_project_members.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/migrations/test_sharing_backfill_plan.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/migrations/test_sharing_migration_gate.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/models/test_lifecycle_conventions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_cancel_cancels_pending_interactions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_cancel_stop_guard.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_command_matrix_inputs_data.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_current_session_tool.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_events_recheck_fresh_access.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_first_touch_race.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_is_current_turn.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_lock_races.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_mirrors_existing_row.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_parked_zombie.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_refused_turn_final_beat.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_replica_id_control_chars.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_run_credential.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_runner_token.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_stale_turn_end.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_binding.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_handover.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_inputs_run_envelope.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_insert_paths_require_access.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_interactions_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_live_relay.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_project_scoped_locks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_filters.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_references.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_search.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_windowing.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_respond_interaction_durable.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_resume_after_kill_revives_tombstone.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_runner_write_capability.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_cancel_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_last_message.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_response_sanitization.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_start_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_trigger_expansion.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_trigger_stamp.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_sessions_query_contract.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_sessions_root_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_fill_missing_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_fill_once.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_header_merge.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_references_storage.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard_integration.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_streams_dao_conflict.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_streams_read_runner_address.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_turns_dao_conflict.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_unchecked_row_recheck.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_endpoint.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_lifecycle_publish.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_publish.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_session_list_publish.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_worker_session_context_wiring.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_wp5_root_router.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/__init__.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_agent_create_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_commit_paths_owner.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_composition_roots.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_disclosure.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_initial_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_missing_session_cache.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_read_scope.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_resolve_agent_artifact_id.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_resource_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_route_checks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_send_path_reads.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_caches.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_fix_review.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_import_boundary.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_router_errors.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_writes.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_stream_agent_hidden.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_workflow_routes_scope.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/skills/test_import_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/skills/test_lifecycle_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/test_channel_adapters_entrypoint.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/test_simple_service_flag_normalization.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_catalog_action_identity.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_config_handlers.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_create_connection_errors.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_discovery.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_gateway_run_error_privacy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_gateway_run_route.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_gateway_search_route.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_oauth_callback_integration_cache.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_platform_handlers.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_resolve_gateway_connection.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_workflow_tool_call.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/test_triggers_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/test_triggers_principal.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/test_triggers_soft_delete_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_idempotent_create.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_invoke_detached.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_revision_read_workflow_fetch_dedup.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_static_catalog.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_workflow_access_not_cached.py is excluded by !**/tests/**
  • api/oss/tests/pytest/utils/cache.py is excluded by !**/tests/**
  • api/oss/tests/pytest/utils/memberships.py is excluded by !**/tests/**
  • api/oss/tests/pytest/utils/sharing.py is excluded by !**/tests/**
  • web/mobile/tests/unit/agentChannelSharing.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentListView.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/mobile/tests/unit/agentOverviewAccess.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentOwnerLabel.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/mobile/tests/unit/agentOwnerRoster.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentScreenRequests.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentVisibilityRecheck.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/chatAccess.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/chatOpenRoundTrips.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/disclosureProviderLabel.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/liveConversationReadOnly.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/newChatFromAgent.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/newChatShareButton.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sessionReadOnly.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sessionSharingControl.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sessionWorkspaceHiddenAgent.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/shareMenu.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sharingHostsRoster.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.test.ts is excluded by !**/*.test.ts
  • web/oss/src/components/AgentChatSlice/state/sessions.visibility.test.ts is excluded by !**/*.test.ts
  • web/oss/src/components/pages/agents/createAgentVisibility.test.tsx is excluded by !**/*.test.tsx
  • web/packages/agenta-api-client/src/generated/Client.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sessions/client/Client.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sessions/client/requests/SetSessionStreamHeaderRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/Client.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentTransferRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentVisibilityRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchAgentSharingRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchSessionSharingRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/QuerySharingMembersRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RestrictSessionToOwnerRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RevokeSessionGrantRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionGrantRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionVisibilityRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/TakeAgentOwnershipRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/exports.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/workflows/client/requests/TemplateLoadRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/AccessPolicy.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/AgentSharingResponse.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/AgentSharingState.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Application.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/ApplicationCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/DisclosedConnection.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/EffectiveRole.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Evaluator.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/EvaluatorCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/EventType.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/NotShareableReason.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Permission.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/ProjectMemberProfile.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionGrant.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionListItem.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionRole.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionSharingResponse.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionSharingState.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionStream.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/ShareDisclosure.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SharingMembersQueryRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SharingMembersResponse.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflow.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflowCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Visibility.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Workflow.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/WorkflowCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-chat/tests/unit/ApprovalCard.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-chat/tests/unit/model/sendRefusalAccess.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entities/tests/unit/sharing-api.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entities/tests/unit/sharing-recheck-budget.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entities/tests/unit/workflow-list-access.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entity-ui/tests/unit/AgentPrivacyControl.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-entity-ui/tests/unit/agentSharingCopy.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/SessionRowActionsOpen.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-sessions-ui/tests/unit/SessionShareDialog.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-sessions-ui/tests/unit/disclosureAccountNames.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/sharingCopy.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/useSessionActions.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-settings-ui/tests/unit/channelSharing.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-ui/tests/unit/copyToClipboard.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml
Files selected for processing: 220
  • .coderabbit.yaml
  • api/AGENTS.md
  • api/entrypoints/access.py
  • api/entrypoints/routers.py
  • api/entrypoints/worker_queues.py
  • api/oss/databases/postgres/migrations/core_oss/versions/oss000000048_add_agent_session_sharing.py
  • api/oss/databases/postgres/migrations/core_oss/versions/oss000000049_backfill_agent_session_sharing.py
  • api/oss/src/apis/fastapi/agent_templates/models.py
  • api/oss/src/apis/fastapi/agent_templates/router.py
  • api/oss/src/apis/fastapi/applications/router.py
  • api/oss/src/apis/fastapi/channels/router.py
  • api/oss/src/apis/fastapi/evaluators/router.py
  • api/oss/src/apis/fastapi/legacy_variants/router.py
  • api/oss/src/apis/fastapi/mounts/router.py
  • api/oss/src/apis/fastapi/sessions/router.py
  • api/oss/src/apis/fastapi/sessions/watch.py
  • api/oss/src/apis/fastapi/sharing/__init__.py
  • api/oss/src/apis/fastapi/sharing/models.py
  • api/oss/src/apis/fastapi/sharing/router.py
  • api/oss/src/apis/fastapi/sharing/utils.py
  • api/oss/src/apis/fastapi/tools/router.py
  • api/oss/src/apis/fastapi/workflows/exceptions.py
  • api/oss/src/apis/fastapi/workflows/router.py
  • api/oss/src/core/access/dtos.py
  • api/oss/src/core/access/interfaces.py
  • api/oss/src/core/access/permissions/types.py
  • api/oss/src/core/access/prefetch.py
  • api/oss/src/core/access/service.py
  • api/oss/src/core/agent_templates/loader.py
  • api/oss/src/core/applications/service.py
  • api/oss/src/core/channels/commands.py
  • api/oss/src/core/channels/dtos.py
  • api/oss/src/core/channels/interfaces.py
  • api/oss/src/core/channels/service.py
  • api/oss/src/core/embeds/service.py
  • api/oss/src/core/embeds/utils.py
  • api/oss/src/core/evaluators/defaults.py
  • api/oss/src/core/evaluators/service.py
  • api/oss/src/core/events/types.py
  • api/oss/src/core/memberships/dtos.py
  • api/oss/src/core/memberships/interfaces.py
  • api/oss/src/core/memberships/service.py
  • api/oss/src/core/mounts/dtos.py
  • api/oss/src/core/mounts/service.py
  • api/oss/src/core/sessions/commands/delivery.py
  • api/oss/src/core/sessions/commands/service.py
  • api/oss/src/core/sessions/service.py
  • api/oss/src/core/sessions/starts/service.py
  • api/oss/src/core/sessions/streams/dtos.py
  • api/oss/src/core/sessions/streams/interfaces.py
  • api/oss/src/core/sessions/streams/service.py
  • api/oss/src/core/sessions/turns/types.py
  • api/oss/src/core/sharing/__init__.py
  • api/oss/src/core/sharing/admission.py
  • api/oss/src/core/sharing/audit.py
  • api/oss/src/core/sharing/disclosure.py
  • api/oss/src/core/sharing/dtos.py
  • api/oss/src/core/sharing/interfaces.py
  • api/oss/src/core/sharing/service.py
  • api/oss/src/core/sharing/types.py
  • api/oss/src/core/skills/import_service.py
  • api/oss/src/core/skills/service.py
  • api/oss/src/core/tools/platform_handlers.py
  • api/oss/src/core/workflows/dtos.py
  • api/oss/src/core/workflows/interfaces.py
  • api/oss/src/core/workflows/service.py
  • api/oss/src/core/workflows/types.py
  • api/oss/src/dbs/postgres/channels/dao.py
  • api/oss/src/dbs/postgres/git/dao.py
  • api/oss/src/dbs/postgres/memberships/dao.py
  • api/oss/src/dbs/postgres/memberships/mappings.py
  • api/oss/src/dbs/postgres/sessions/streams/dao.py
  • api/oss/src/dbs/postgres/sessions/streams/dbes.py
  • api/oss/src/dbs/postgres/sessions/streams/mappings.py
  • api/oss/src/dbs/postgres/sessions/turns/dao.py
  • api/oss/src/dbs/postgres/sharing/__init__.py
  • api/oss/src/dbs/postgres/sharing/dao.py
  • api/oss/src/dbs/postgres/sharing/dbes.py
  • api/oss/src/dbs/postgres/sharing/mappings.py
  • api/oss/src/dbs/postgres/workflows/dao.py
  • api/oss/src/dbs/redis/sessions/contract.py
  • api/oss/src/dbs/redis/sessions/locks.py
  • api/oss/src/services/db_manager.py
  • api/oss/src/tasks/asyncio/channels/inbox.py
  • api/oss/src/tasks/asyncio/sessions/interactions_dispatcher.py
  • api/oss/src/tasks/asyncio/triggers/dispatcher.py
  • api/oss/src/utils/caching.py
  • api/pytest.ini
  • docs/design/sharing-program/CONTRACT.md
  • docs/design/sharing-program/interfaces/m3/entry-points.md
  • docs/design/sharing-program/interfaces/m3/interfaces.md
  • docs/design/sharing-program/interfaces/m3/technical-design.md
  • docs/docs/administration/access-control/03-rbac.mdx
  • docs/docs/guides/12-connect-slack.mdx
  • docs/docs/guides/14-share-agents-and-chats.mdx
  • openspec/changes/agent-session-sharing/design.md
  • openspec/changes/agent-session-sharing/proposal.md
  • openspec/changes/agent-session-sharing/specs/agent-session-sharing/spec.md
  • openspec/changes/agent-session-sharing/specs/sharing-access-boundaries/spec.md
  • openspec/changes/agent-session-sharing/tasks.md
  • web/AGENTS.md
  • web/mobile/src/features/agents/AgentCardBody.tsx
  • web/mobile/src/features/agents/AgentComposer.tsx
  • web/mobile/src/features/agents/AgentFilterMenu.tsx
  • web/mobile/src/features/agents/AgentListScreen.tsx
  • web/mobile/src/features/agents/AgentListTable.tsx
  • web/mobile/src/features/agents/AgentOverviewScreen.tsx
  • web/mobile/src/features/agents/AgentPrivateMarker.tsx
  • web/mobile/src/features/agents/AgentRowCells.tsx
  • web/mobile/src/features/agents/agentListView.ts
  • web/mobile/src/features/agents/myPrivateAgent.ts
  • web/mobile/src/features/agents/states/AgentNotFound.tsx
  • web/mobile/src/features/agents/useAgentOverviewAccess.ts
  • web/mobile/src/features/agents/useAgentOwners.ts
  • web/mobile/src/features/agents/useAgentPublishPanel.tsx
  • web/mobile/src/features/app/AppProviders.tsx
  • web/mobile/src/features/chat/AgentPrivacyHost.tsx
  • web/mobile/src/features/chat/ApprovalDock.tsx
  • web/mobile/src/features/chat/ChatScreen.tsx
  • web/mobile/src/features/chat/Composer.tsx
  • web/mobile/src/features/chat/LiveConversation.tsx
  • web/mobile/src/features/chat/ReadOnlyComposerNotice.tsx
  • web/mobile/src/features/chat/SessionShareHost.tsx
  • web/mobile/src/features/chat/SessionSharingControl.tsx
  • web/mobile/src/features/chat/SessionTabs.tsx
  • web/mobile/src/features/chat/SessionTopBar.tsx
  • web/mobile/src/features/chat/SessionWorkspace.tsx
  • web/mobile/src/features/chat/ShareMenu.tsx
  • web/mobile/src/features/chat/sessionReadOnly.ts
  • web/mobile/src/features/chat/shareDialogState.ts
  • web/mobile/src/features/chat/states/ChatNoAccess.tsx
  • web/mobile/src/features/chat/useAgentEntity.ts
  • web/mobile/src/features/chat/useAgentVisibilityRecheck.ts
  • web/mobile/src/features/chat/useChatAccess.ts
  • web/mobile/src/features/chat/useDisclosureProviderLabel.ts
  • web/mobile/src/features/chat/useSessionHeader.ts
  • web/mobile/src/features/chat/useSessionSharing.ts
  • web/mobile/src/features/chat/useSessionWatch.ts
  • web/mobile/src/features/home/pendingTask.ts
  • web/mobile/src/features/nav/useMobileNavItems.tsx
  • web/mobile/src/features/sessions/SessionRowCells.tsx
  • web/mobile/src/features/sessions/useSessionRowMenu.ts
  • web/mobile/src/features/settings/ChannelsTab.tsx
  • web/mobile/src/features/skills/SkillListScreen.tsx
  • web/mobile/src/lib/sharingCopy.ts
  • web/oss/src/components/AgentChatSlice/AgentConversation.tsx
  • web/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.ts
  • web/oss/src/components/AgentChatSlice/state/sessions.ts
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsx
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/useCommitHostAdapter.ts
  • web/oss/src/components/pages/agent-home/hooks/useCreateAgent.ts
  • web/packages/agenta-chat/src/components/ApprovalCard.tsx
  • web/packages/agenta-chat/src/model/error.ts
  • web/packages/agenta-entities/package.json
  • web/packages/agenta-entities/src/session/api/api.ts
  • web/packages/agenta-entities/src/session/core/schema.ts
  • web/packages/agenta-entities/src/session/index.ts
  • web/packages/agenta-entities/src/session/state/invalidate.ts
  • web/packages/agenta-entities/src/sharing/api.ts
  • web/packages/agenta-entities/src/sharing/core/keys.ts
  • web/packages/agenta-entities/src/sharing/core/schema.ts
  • web/packages/agenta-entities/src/sharing/index.ts
  • web/packages/agenta-entities/src/sharing/state/store.ts
  • web/packages/agenta-entities/src/workflow/api/api.ts
  • web/packages/agenta-entities/src/workflow/core/schema.ts
  • web/packages/agenta-entities/src/workflow/state/commit.ts
  • web/packages/agenta-entities/src/workflow/state/loadTemplate.ts
  • web/packages/agenta-entities/src/workflow/state/store.ts
  • web/packages/agenta-entity-ui/package.json
  • web/packages/agenta-entity-ui/src/sharing/AgentPrivacyControl.tsx
  • web/packages/agenta-entity-ui/src/sharing/AgentPrivacyDialog.tsx
  • web/packages/agenta-entity-ui/src/sharing/AgentTransferDialog.tsx
  • web/packages/agenta-entity-ui/src/sharing/copy.ts
  • web/packages/agenta-entity-ui/src/sharing/index.ts
  • web/packages/agenta-entity-ui/src/sharing/useAgentSharingWrites.ts
  • web/packages/agenta-home-ui/src/useCreateAgent.ts
  • web/packages/agenta-navigation/src/dynamic/sessionsSource.ts
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesButton.tsx
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesModal.tsx
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/types.ts
  • web/packages/agenta-sdk/src/resources.ts
  • web/packages/agenta-sessions-ui/package.json
  • web/packages/agenta-sessions-ui/src/SessionCardList.tsx
  • web/packages/agenta-sessions-ui/src/SessionRowActions.tsx
  • web/packages/agenta-sessions-ui/src/SessionTab.tsx
  • web/packages/agenta-sessions-ui/src/SessionTabRail.tsx
  • web/packages/agenta-sessions-ui/src/index.ts
  • web/packages/agenta-sessions-ui/src/sharing/MemberPicker.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionAccessChip.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionGrantRoleMenu.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionPrivacyMarker.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionShareButton.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionShareDialog.tsx
  • web/packages/agenta-sessions-ui/src/sharing/ShareDisclosureNotice.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SharingSurface.tsx
  • web/packages/agenta-sessions-ui/src/sharing/copy.ts
  • web/packages/agenta-sessions-ui/src/sharing/index.ts
  • web/packages/agenta-sessions-ui/src/sharing/people.tsx
  • web/packages/agenta-sessions-ui/src/sharing/result.ts
  • web/packages/agenta-sessions-ui/src/sharing/useSharingPerson.ts
  • web/packages/agenta-sessions-ui/src/useSessionActions.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.stories.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelsHubView.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsx
  • web/packages/agenta-settings-ui/src/channels/actions.ts
  • web/packages/agenta-settings-ui/src/channels/helpers.ts
  • web/packages/agenta-settings-ui/src/channels/index.ts
  • web/packages/agenta-settings-ui/src/channels/sharingCopy.ts
  • web/packages/agenta-settings-ui/src/channels/storyFixtures.tsx
  • web/packages/agenta-settings-ui/src/channels/types.ts
  • web/packages/agenta-settings-ui/src/channels/useChannelPanel.tsx
  • web/packages/agenta-settings-ui/src/index.ts
  • web/packages/agenta-ui/src/utils/copyToClipboard.ts
  • web/storybook/package.json
  • web/storybook/stories/entity-ui/SharingAgentPrivacy.stories.tsx
  • web/storybook/stories/entity-ui/SharingMemberPicker.stories.tsx
  • web/storybook/stories/entity-ui/SharingSessionDialog.stories.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment thread api/oss/src/core/channels/service.py Resolved
Comment on lines +1041 to +1069
if prior_stream is None:
# Only a run creates a session by heartbeat.
if envelope is None:
raise SessionCreationRequiresRunCredential(request.session_id)
await run_admission.admit_turn(
envelope=admission_envelope,
session_id=None,
project_id=project_id,
references=request.references,
)
try:
created_stream = await self._create_row(
project_id=project_id,
user_id=None,
stream=SessionStreamCreate(
session_id=request.session_id,
flags=SessionStreamFlags(
is_alive=True,
is_running=request.is_running,
is_attached=False,
),
turn_id=running_turn_id,
name=normalize_session_name(request.name),
references=request.references or None,
access=access,
),
# A channel session is the one its installation's run creates.
is_channel=envelope.context.origin == RunOrigin.INSTALLATION,
)

@coderabbitai coderabbitai Bot Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Data Integrity & Integration · Quick win

A delayed heartbeat from a displaced turn can now recreate a deleted session's row.

Before this change, the beat checked the tombstone before any row write. Now _admit_heartbeat inserts the row when prior_stream is None (Line 1052) before the tombstone check. The tombstone check now happens in bind_turn_for_beat at Line 693, after the insert.

Trigger:

  1. A session is deleted. Kill and delete tombstone its turns and remove the row.
  2. The still-running runner sends one more is_running=true beat with its run credential.
  3. prior_stream is None, so admission passes and _create_row inserts a row with is_alive=True, is_running=True and the dead turn_id.
  4. Only then does bind_turn_for_beat return None, and the beat is answered is_current_turn=False.

Result: the deleted session reappears in project lists as a running session, with a fresh sharing cache entry. It stays there until the orphan sweep collapses it. The comment at Line 664 also still claims the beat is refused "before it touches ANY lock or the row".

Fix: check the tombstone after admission and before the insert. is_turn_superseded still exists in locks.py, but confirm its signature first.

🐛 Proposed fix
             await run_admission.admit_turn(
                 envelope=admission_envelope,
                 session_id=None,
                 project_id=project_id,
                 references=request.references,
             )
+            # A displaced turn never creates a row: its beat is refused by the bind below.
+            if request.turn_id and await is_turn_superseded(
+                self._lock,
+                project_id=str(project_id),
+                session_id=request.session_id,
+                turn_id=request.turn_id,
+            ):
+                return None, None, None
             try:
                 created_stream = await self._create_row(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 The AI agent says: Fixed in 2a4d8fa and db0f028, without a new Redis call on the create path: (1) a session row is never created over a deleted private session's tombstone (the insert is one INSERT ... SELECT ... WHERE NOT EXISTS statement, serialized with the delete by a per-id lock); (2) when the bind script refuses a displaced turn's beat after that beat inserted the row of a deleted session, the row is deleted again, but only while it is the same row and still holds the zombie's turn. The duplicated comment is replaced with one that states the current order.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -e
fd '^AGENTS\.md$' -HI
ast-grep outline api/oss/src/dbs/postgres/sessions/streams/dao.py --match 'create|delete|lock' --view expanded
rg -n -C 12 'delete_row_if_unchanged|NOT EXISTS|not_exists|advisory|tombstone|async def create\(|async def hard_delete_by_session_id\(' api/oss/src/dbs/postgres/sessions/streams/dao.py
for f in AGENTS.md api/AGENTS.md; do
  if [ -f "$f" ]; then printf '\n--- %s ---\n' "$f"; cat "$f"; fi
done

Length of output: 1443


@mmabrouk The supplied service code includes the conditional cleanup and sharing-cache invalidation after bind refusal. It also updates the comment to describe the current order.

Repository verification failed because api/oss/src/dbs/postgres/sessions/streams/dao.py was absent from the sandbox checkout. I could not verify the insert guard, per-ID lock, or cleanup predicates. Please retry verification with the PR checkout available. This finding remains unverified.


📝 I couldn't check this conversation for new learnings, so no new learning was saved.


🧠 Learnings used
Learnt from: mmabrouk
Repo: Agenta-AI/agenta PR: 7437
File: api/oss/src/core/sessions/commands/service.py:1426-1426
Timestamp: 2026-10-07T16:41:18.949Z
Learning: In Agenta's Python session control code, `SessionCommandsService._judge_gone_replica` in `api/oss/src/core/sessions/commands/service.py` uses Redis `running` ownership to classify `replica_gone`. The ownership contract retains `running` during a short heartbeat interruption: its TTL is one hour and each beat refreshes it. Ownership removal occurs through the turn's end beat, settled Stop, takeover, or watchdog cleanup (90 seconds without beats by default). Settled Stop, takeover, and watchdog cleanup also tombstone the old turn to prevent it from reacquiring ownership through later beats. Do not infer that a health-check timeout alone removes `running`; when the target still owns it, `_judge_gone_replica` returns `unreachable`.

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
fd --hidden --type f '^\.coderabbit\.yaml$' --exclude .git --exec cat -- {}

Length of output: 1712


@mmabrouk I’ll trigger a full review under the current .coderabbit.yaml path filters. This pass excludes tests, lockfiles, and the generated API client. Tests remain for the second pass, and the temporary filter commit must be removed before merge.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments: 2
api/oss/src/core/sessions/streams/service.py: 1

673-681: Trivial · Maintainability & Code Quality · Low value

Delete the duplicated comment block.

Lines 673-681 repeat lines 664-672 word for word. The repeated text also says that the beat is refused "before it touches ANY lock or the row". That claim is no longer true, because _admit_heartbeat can insert the row first. Remove one copy and correct the remaining text. The coding guideline says: "Keep AI-generated in-code comments minimal... Prefer one terse line over a multi-line block."

Source: Coding guidelines

web/mobile/src/features/chat/LiveConversation.tsx: 1

296-301: Trivial · Maintainability & Code Quality · Low value

Shorten the new in-code comments to one line.

The new comments are multi-line blocks that narrate behavior. The block at Lines 1018-1033 is 16 lines long. Keep one short line for each non-obvious reason, such as "Access can go while the confirm dialog is open". Remove the narrative text.

As per coding guidelines: web/AGENTS.md: "Hard rule. At most ONE short line per comment. No multi-line blocks narrating why in prose".

Also applies to: 1018-1033

Source: Coding guidelines


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 29edb5f and 02194da.

Files ignored due to path filters: 264
  • api/oss/tests/pytest/acceptance/channels/bridge_process/test_bridge_two_bridges.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/differential/test_slack_in_process_vs_bridged.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/support.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/test_channel_tools.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/channels/test_channels_permissions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/__init__.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/support.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_agent_owner_by_commit.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_channel_sessions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_default_visibility.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_heartbeat_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_hidden_references.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_list_parity.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_owner_leaves.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_ownerless_creation.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_queued_and_resume_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_session_files_follow_session.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_shared_turns_authority.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_sharing_audit.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_shortcuts_closed.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_stream_sharing_state.py is excluded by !**/tests/**
  • api/oss/tests/pytest/acceptance/sharing/test_trigger_claim_owner.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/access/test_run_principal_query_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/channels/test_channels_composition_seam.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/channels/test_channels_connection_write_path_integration.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/channels/test_channels_service_routing_dao.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/memberships/test_admin_membership_invalidation_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/memberships/test_hot_path_query_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/memberships/test_membership_parity_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_sessions_query_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_trigger_session_claim_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_turns_dao.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sessions/test_wp5_dao_fanout.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/__init__.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_admission_settlement.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_list_scope_sql.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_project_members_query.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_resolve_agent_environment.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_runner_write_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_session_claim_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_backfill.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_dao_locks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_query_counts_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_redis_round_trips.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_sharing_schema.py is excluded by !**/tests/**
  • api/oss/tests/pytest/integration/sharing/test_workflows_dao_atomic.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_access_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_check_action_access_wrapper.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_decide.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_grant_exchange.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_organization_write.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_principal_invalidation.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_role_allows.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/access/test_run_principal_dtos.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/agent_templates/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/agent_templates/test_loader.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/agent_templates/test_router.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/applications/test_simple_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/apps/test_create_app.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_agent_tool_settings.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_edit_semantics.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_busy_thread.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_principal.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_live_qa_regressions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_rechecks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_request_reactions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/test_channels_turn_context.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/channels/whatsapp/test_whatsapp_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/embeds/test_embedded_agent_visibility.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/evaluators/test_simple_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/git/test_commit_revision_slug_conflict.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/memberships/test_query_project_members.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/migrations/test_sharing_backfill_plan.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/migrations/test_sharing_migration_gate.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/models/test_lifecycle_conventions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_cancel_cancels_pending_interactions.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_cancel_stop_guard.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_command_matrix_inputs_data.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_current_session_tool.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_events_recheck_fresh_access.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_first_touch_race.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_is_current_turn.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_lock_races.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_mirrors_existing_row.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_parked_zombie.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_refused_turn_final_beat.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_replica_id_control_chars.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_run_credential.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_runner_token.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_stale_turn_end.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_binding.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_handover.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_inputs_run_envelope.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_insert_paths_require_access.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_interactions_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_live_relay.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_project_scoped_locks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_filters.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_references.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_search.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_windowing.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_respond_interaction_durable.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_resume_after_kill_revives_tombstone.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_runner_write_capability.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_cancel_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_last_message.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_response_sanitization.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_start_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_trigger_expansion.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_session_trigger_stamp.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_sessions_query_contract.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_sessions_root_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_fill_missing_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_fill_once.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_header_merge.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_references_storage.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard_integration.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_streams_dao_conflict.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_streams_read_runner_address.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_turns_dao_conflict.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_unchecked_row_recheck.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_endpoint.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_lifecycle_publish.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_publish.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_watch_session_list_publish.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_worker_session_context_wiring.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sessions/test_wp5_root_router.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/__init__.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_admission.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_agent_create_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_commit_paths_owner.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_composition_roots.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_disclosure.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_initial_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_missing_session_cache.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_read_scope.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_resolve_agent_artifact_id.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_resource_policy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_route_checks.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_send_path_reads.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_caches.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_fix_review.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_import_boundary.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_router_errors.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_sharing_writes.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_stream_agent_hidden.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/sharing/test_workflow_routes_scope.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/skills/test_import_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/skills/test_lifecycle_service.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/test_channel_adapters_entrypoint.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/test_simple_service_flag_normalization.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_catalog_action_identity.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_config_handlers.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_create_connection_errors.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_discovery.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_gateway_run_error_privacy.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_gateway_run_route.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_gateway_search_route.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_oauth_callback_integration_cache.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_platform_handlers.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_resolve_gateway_connection.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/tools/test_workflow_tool_call.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/conftest.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/test_triggers_dispatcher.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/test_triggers_principal.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/triggers/test_triggers_soft_delete_postgres.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_idempotent_create.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_invoke_detached.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_revision_read_workflow_fetch_dedup.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_static_catalog.py is excluded by !**/tests/**
  • api/oss/tests/pytest/unit/workflows/test_workflow_access_not_cached.py is excluded by !**/tests/**
  • api/oss/tests/pytest/utils/cache.py is excluded by !**/tests/**
  • api/oss/tests/pytest/utils/memberships.py is excluded by !**/tests/**
  • api/oss/tests/pytest/utils/sharing.py is excluded by !**/tests/**
  • web/mobile/tests/unit/agentChannelSharing.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentListView.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/mobile/tests/unit/agentOverviewAccess.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentOwnerLabel.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/mobile/tests/unit/agentOwnerRoster.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentScreenRequests.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/agentVisibilityRecheck.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/chatAccess.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/chatOpenRoundTrips.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/disclosureProviderLabel.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/liveConversationReadOnly.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/newChatFromAgent.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/newChatShareButton.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sessionReadOnly.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sessionSharingControl.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sessionWorkspaceHiddenAgent.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/shareMenu.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/mobile/tests/unit/sharingHostsRoster.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.test.ts is excluded by !**/*.test.ts
  • web/oss/src/components/AgentChatSlice/state/sessions.visibility.test.ts is excluded by !**/*.test.ts
  • web/oss/src/components/pages/agents/createAgentVisibility.test.tsx is excluded by !**/*.test.tsx
  • web/packages/agenta-api-client/src/generated/Client.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sessions/client/Client.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sessions/client/requests/SetSessionStreamHeaderRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/Client.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentTransferRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentVisibilityRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchAgentSharingRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchSessionSharingRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/QuerySharingMembersRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RestrictSessionToOwnerRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RevokeSessionGrantRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionGrantRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionVisibilityRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/TakeAgentOwnershipRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/exports.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/resources/workflows/client/requests/TemplateLoadRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/AccessPolicy.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/AgentSharingResponse.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/AgentSharingState.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Application.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/ApplicationCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/DisclosedConnection.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/EffectiveRole.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Evaluator.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/EvaluatorCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/EventType.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/NotShareableReason.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Permission.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/ProjectMemberProfile.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionGrant.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionListItem.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionRole.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionSharingResponse.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionSharingState.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SessionStream.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/ShareDisclosure.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SharingMembersQueryRequest.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SharingMembersResponse.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflow.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflowCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Visibility.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/Workflow.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/WorkflowCreate.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-api-client/src/generated/api/types/index.ts is excluded by !**/generated/**, !web/packages/agenta-api-client/src/generated/**
  • web/packages/agenta-chat/tests/unit/ApprovalCard.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-chat/tests/unit/model/sendRefusalAccess.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entities/tests/unit/sharing-api.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entities/tests/unit/sharing-recheck-budget.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entities/tests/unit/workflow-list-access.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-entity-ui/tests/unit/AgentPrivacyControl.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-entity-ui/tests/unit/agentSharingCopy.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/SessionRowActionsOpen.render.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-sessions-ui/tests/unit/SessionShareDialog.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-sessions-ui/tests/unit/disclosureAccountNames.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/sharingCopy.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/useSessionActions.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/packages/agenta-settings-ui/tests/unit/channelSharing.test.tsx is excluded by !**/tests/**, !**/*.test.tsx
  • web/packages/agenta-ui/tests/unit/copyToClipboard.test.ts is excluded by !**/tests/**, !**/*.test.ts
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml
Files selected for processing: 220
  • .coderabbit.yaml
  • api/AGENTS.md
  • api/entrypoints/access.py
  • api/entrypoints/routers.py
  • api/entrypoints/worker_queues.py
  • api/oss/databases/postgres/migrations/core_oss/versions/oss000000048_add_agent_session_sharing.py
  • api/oss/databases/postgres/migrations/core_oss/versions/oss000000049_backfill_agent_session_sharing.py
  • api/oss/src/apis/fastapi/agent_templates/models.py
  • api/oss/src/apis/fastapi/agent_templates/router.py
  • api/oss/src/apis/fastapi/applications/router.py
  • api/oss/src/apis/fastapi/channels/router.py
  • api/oss/src/apis/fastapi/evaluators/router.py
  • api/oss/src/apis/fastapi/legacy_variants/router.py
  • api/oss/src/apis/fastapi/mounts/router.py
  • api/oss/src/apis/fastapi/sessions/router.py
  • api/oss/src/apis/fastapi/sessions/watch.py
  • api/oss/src/apis/fastapi/sharing/__init__.py
  • api/oss/src/apis/fastapi/sharing/models.py
  • api/oss/src/apis/fastapi/sharing/router.py
  • api/oss/src/apis/fastapi/sharing/utils.py
  • api/oss/src/apis/fastapi/tools/router.py
  • api/oss/src/apis/fastapi/workflows/exceptions.py
  • api/oss/src/apis/fastapi/workflows/router.py
  • api/oss/src/core/access/dtos.py
  • api/oss/src/core/access/interfaces.py
  • api/oss/src/core/access/permissions/types.py
  • api/oss/src/core/access/prefetch.py
  • api/oss/src/core/access/service.py
  • api/oss/src/core/agent_templates/loader.py
  • api/oss/src/core/applications/service.py
  • api/oss/src/core/channels/commands.py
  • api/oss/src/core/channels/dtos.py
  • api/oss/src/core/channels/interfaces.py
  • api/oss/src/core/channels/service.py
  • api/oss/src/core/embeds/service.py
  • api/oss/src/core/embeds/utils.py
  • api/oss/src/core/evaluators/defaults.py
  • api/oss/src/core/evaluators/service.py
  • api/oss/src/core/events/types.py
  • api/oss/src/core/memberships/dtos.py
  • api/oss/src/core/memberships/interfaces.py
  • api/oss/src/core/memberships/service.py
  • api/oss/src/core/mounts/dtos.py
  • api/oss/src/core/mounts/service.py
  • api/oss/src/core/sessions/commands/delivery.py
  • api/oss/src/core/sessions/commands/service.py
  • api/oss/src/core/sessions/service.py
  • api/oss/src/core/sessions/starts/service.py
  • api/oss/src/core/sessions/streams/dtos.py
  • api/oss/src/core/sessions/streams/interfaces.py
  • api/oss/src/core/sessions/streams/service.py
  • api/oss/src/core/sessions/turns/types.py
  • api/oss/src/core/sharing/__init__.py
  • api/oss/src/core/sharing/admission.py
  • api/oss/src/core/sharing/audit.py
  • api/oss/src/core/sharing/disclosure.py
  • api/oss/src/core/sharing/dtos.py
  • api/oss/src/core/sharing/interfaces.py
  • api/oss/src/core/sharing/service.py
  • api/oss/src/core/sharing/types.py
  • api/oss/src/core/skills/import_service.py
  • api/oss/src/core/skills/service.py
  • api/oss/src/core/tools/platform_handlers.py
  • api/oss/src/core/workflows/dtos.py
  • api/oss/src/core/workflows/interfaces.py
  • api/oss/src/core/workflows/service.py
  • api/oss/src/core/workflows/types.py
  • api/oss/src/dbs/postgres/channels/dao.py
  • api/oss/src/dbs/postgres/git/dao.py
  • api/oss/src/dbs/postgres/memberships/dao.py
  • api/oss/src/dbs/postgres/memberships/mappings.py
  • api/oss/src/dbs/postgres/sessions/streams/dao.py
  • api/oss/src/dbs/postgres/sessions/streams/dbes.py
  • api/oss/src/dbs/postgres/sessions/streams/mappings.py
  • api/oss/src/dbs/postgres/sessions/turns/dao.py
  • api/oss/src/dbs/postgres/sharing/__init__.py
  • api/oss/src/dbs/postgres/sharing/dao.py
  • api/oss/src/dbs/postgres/sharing/dbes.py
  • api/oss/src/dbs/postgres/sharing/mappings.py
  • api/oss/src/dbs/postgres/workflows/dao.py
  • api/oss/src/dbs/redis/sessions/contract.py
  • api/oss/src/dbs/redis/sessions/locks.py
  • api/oss/src/services/db_manager.py
  • api/oss/src/tasks/asyncio/channels/inbox.py
  • api/oss/src/tasks/asyncio/sessions/interactions_dispatcher.py
  • api/oss/src/tasks/asyncio/triggers/dispatcher.py
  • api/oss/src/utils/caching.py
  • api/pytest.ini
  • docs/design/sharing-program/CONTRACT.md
  • docs/design/sharing-program/interfaces/m3/entry-points.md
  • docs/design/sharing-program/interfaces/m3/interfaces.md
  • docs/design/sharing-program/interfaces/m3/technical-design.md
  • docs/docs/administration/access-control/03-rbac.mdx
  • docs/docs/guides/12-connect-slack.mdx
  • docs/docs/guides/14-share-agents-and-chats.mdx
  • openspec/changes/agent-session-sharing/design.md
  • openspec/changes/agent-session-sharing/proposal.md
  • openspec/changes/agent-session-sharing/specs/agent-session-sharing/spec.md
  • openspec/changes/agent-session-sharing/specs/sharing-access-boundaries/spec.md
  • openspec/changes/agent-session-sharing/tasks.md
  • web/AGENTS.md
  • web/mobile/src/features/agents/AgentCardBody.tsx
  • web/mobile/src/features/agents/AgentComposer.tsx
  • web/mobile/src/features/agents/AgentFilterMenu.tsx
  • web/mobile/src/features/agents/AgentListScreen.tsx
  • web/mobile/src/features/agents/AgentListTable.tsx
  • web/mobile/src/features/agents/AgentOverviewScreen.tsx
  • web/mobile/src/features/agents/AgentPrivateMarker.tsx
  • web/mobile/src/features/agents/AgentRowCells.tsx
  • web/mobile/src/features/agents/agentListView.ts
  • web/mobile/src/features/agents/myPrivateAgent.ts
  • web/mobile/src/features/agents/states/AgentNotFound.tsx
  • web/mobile/src/features/agents/useAgentOverviewAccess.ts
  • web/mobile/src/features/agents/useAgentOwners.ts
  • web/mobile/src/features/agents/useAgentPublishPanel.tsx
  • web/mobile/src/features/app/AppProviders.tsx
  • web/mobile/src/features/chat/AgentPrivacyHost.tsx
  • web/mobile/src/features/chat/ApprovalDock.tsx
  • web/mobile/src/features/chat/ChatScreen.tsx
  • web/mobile/src/features/chat/Composer.tsx
  • web/mobile/src/features/chat/LiveConversation.tsx
  • web/mobile/src/features/chat/ReadOnlyComposerNotice.tsx
  • web/mobile/src/features/chat/SessionShareHost.tsx
  • web/mobile/src/features/chat/SessionSharingControl.tsx
  • web/mobile/src/features/chat/SessionTabs.tsx
  • web/mobile/src/features/chat/SessionTopBar.tsx
  • web/mobile/src/features/chat/SessionWorkspace.tsx
  • web/mobile/src/features/chat/ShareMenu.tsx
  • web/mobile/src/features/chat/sessionReadOnly.ts
  • web/mobile/src/features/chat/shareDialogState.ts
  • web/mobile/src/features/chat/states/ChatNoAccess.tsx
  • web/mobile/src/features/chat/useAgentEntity.ts
  • web/mobile/src/features/chat/useAgentVisibilityRecheck.ts
  • web/mobile/src/features/chat/useChatAccess.ts
  • web/mobile/src/features/chat/useDisclosureProviderLabel.ts
  • web/mobile/src/features/chat/useSessionHeader.ts
  • web/mobile/src/features/chat/useSessionSharing.ts
  • web/mobile/src/features/chat/useSessionWatch.ts
  • web/mobile/src/features/home/pendingTask.ts
  • web/mobile/src/features/nav/useMobileNavItems.tsx
  • web/mobile/src/features/sessions/SessionRowCells.tsx
  • web/mobile/src/features/sessions/useSessionRowMenu.ts
  • web/mobile/src/features/settings/ChannelsTab.tsx
  • web/mobile/src/features/skills/SkillListScreen.tsx
  • web/mobile/src/lib/sharingCopy.ts
  • web/oss/src/components/AgentChatSlice/AgentConversation.tsx
  • web/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.ts
  • web/oss/src/components/AgentChatSlice/state/sessions.ts
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsx
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/useCommitHostAdapter.ts
  • web/oss/src/components/pages/agent-home/hooks/useCreateAgent.ts
  • web/packages/agenta-chat/src/components/ApprovalCard.tsx
  • web/packages/agenta-chat/src/model/error.ts
  • web/packages/agenta-entities/package.json
  • web/packages/agenta-entities/src/session/api/api.ts
  • web/packages/agenta-entities/src/session/core/schema.ts
  • web/packages/agenta-entities/src/session/index.ts
  • web/packages/agenta-entities/src/session/state/invalidate.ts
  • web/packages/agenta-entities/src/sharing/api.ts
  • web/packages/agenta-entities/src/sharing/core/keys.ts
  • web/packages/agenta-entities/src/sharing/core/schema.ts
  • web/packages/agenta-entities/src/sharing/index.ts
  • web/packages/agenta-entities/src/sharing/state/store.ts
  • web/packages/agenta-entities/src/workflow/api/api.ts
  • web/packages/agenta-entities/src/workflow/core/schema.ts
  • web/packages/agenta-entities/src/workflow/state/commit.ts
  • web/packages/agenta-entities/src/workflow/state/loadTemplate.ts
  • web/packages/agenta-entities/src/workflow/state/store.ts
  • web/packages/agenta-entity-ui/package.json
  • web/packages/agenta-entity-ui/src/sharing/AgentPrivacyControl.tsx
  • web/packages/agenta-entity-ui/src/sharing/AgentPrivacyDialog.tsx
  • web/packages/agenta-entity-ui/src/sharing/AgentTransferDialog.tsx
  • web/packages/agenta-entity-ui/src/sharing/copy.ts
  • web/packages/agenta-entity-ui/src/sharing/index.ts
  • web/packages/agenta-entity-ui/src/sharing/useAgentSharingWrites.ts
  • web/packages/agenta-home-ui/src/useCreateAgent.ts
  • web/packages/agenta-navigation/src/dynamic/sessionsSource.ts
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesButton.tsx
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesModal.tsx
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/types.ts
  • web/packages/agenta-sdk/src/resources.ts
  • web/packages/agenta-sessions-ui/package.json
  • web/packages/agenta-sessions-ui/src/SessionCardList.tsx
  • web/packages/agenta-sessions-ui/src/SessionRowActions.tsx
  • web/packages/agenta-sessions-ui/src/SessionTab.tsx
  • web/packages/agenta-sessions-ui/src/SessionTabRail.tsx
  • web/packages/agenta-sessions-ui/src/index.ts
  • web/packages/agenta-sessions-ui/src/sharing/MemberPicker.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionAccessChip.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionGrantRoleMenu.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionPrivacyMarker.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionShareButton.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SessionShareDialog.tsx
  • web/packages/agenta-sessions-ui/src/sharing/ShareDisclosureNotice.tsx
  • web/packages/agenta-sessions-ui/src/sharing/SharingSurface.tsx
  • web/packages/agenta-sessions-ui/src/sharing/copy.ts
  • web/packages/agenta-sessions-ui/src/sharing/index.ts
  • web/packages/agenta-sessions-ui/src/sharing/people.tsx
  • web/packages/agenta-sessions-ui/src/sharing/result.ts
  • web/packages/agenta-sessions-ui/src/sharing/useSharingPerson.ts
  • web/packages/agenta-sessions-ui/src/useSessionActions.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.stories.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelsHubView.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsx
  • web/packages/agenta-settings-ui/src/channels/actions.ts
  • web/packages/agenta-settings-ui/src/channels/helpers.ts
  • web/packages/agenta-settings-ui/src/channels/index.ts
  • web/packages/agenta-settings-ui/src/channels/sharingCopy.ts
  • web/packages/agenta-settings-ui/src/channels/storyFixtures.tsx
  • web/packages/agenta-settings-ui/src/channels/types.ts
  • web/packages/agenta-settings-ui/src/channels/useChannelPanel.tsx
  • web/packages/agenta-settings-ui/src/index.ts
  • web/packages/agenta-ui/src/utils/copyToClipboard.ts
  • web/storybook/package.json
  • web/storybook/stories/entity-ui/SharingAgentPrivacy.stories.tsx
  • web/storybook/stories/entity-ui/SharingMemberPicker.stories.tsx
  • web/storybook/stories/entity-ui/SharingSessionDialog.stories.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@mmabrouk
mmabrouk force-pushed the feat/m3-agent-session-sharing branch from 02194da to db0f028 Compare October 25, 2026 04:02
@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: Security review of this PR, as a substitute for CodeRabbit on a PR over 300 files. CodeRabbit reviews it in two filtered passes (sources, then tests), and its silence on the excluded files is not a pass.

How. Codex (gpt-6-astra, reasoning effort xhigh, read-only) reviewed the access, sharing, admission, heartbeat and migration code of the full diff. It then re-checked each fix commit, up to 3 rounds. The last round answered "no blocking issue".

Found and fixed

# Severity Problem Fix (commit)
1 high POST /tools/call reserved tools trusted the variant id in the arguments: a member could read or commit another owner's private agent through read_config / commit_revision, and read its starters through list_starters The route checks the named agent before the handler runs. A hidden agent answers as an unknown one. A commit writes only the checked variant and that variant's own agent. create_app checks the session it writes to (7bad7f6, 2a4d8fa, db0f028)
2 high Deleting a private session kept its records (tracing retention), and the missing row read as an unknown, allowed session, so anyone who knew the id could read the transcript The session delete writes a session_trace_tombstones row (the M9 table, now created in oss000000048) in the statement that deletes the stream row. The former owner may read the id, nobody may write to it, and everyone else gets the hidden answer. The session decision reads the row and the tombstone in one statement, so a missing session still costs one read (7bad7f6)
3 high A session could be created again over a tombstone (heartbeat create, or a create that raced the delete) The insert is one INSERT ... SELECT ... WHERE NOT EXISTS (tombstone) statement, taken after a per-id advisory lock that the delete also takes. Covered by a two-connection race test (2a4d8fa, db0f028)
4 medium The turns cursor (windowing.next) was looked up across the project, so a hidden turn's id changed the page The cursor must be a turn of the queried session (across sessions: of a session the caller may read). Otherwise the answer is 400, the same for hidden and unknown turns (7bad7f6)
5 medium A displaced turn's late beat could bring back a deleted session's row The row is deleted again, but only while it is the inserted row and still holds that turn (2a4d8fa, db0f028)

Cost. The replay of all API requests of two live sends, against M2: Postgres 23/23 per send against 24/24, and Redis 60/65 against 63/65.

Follow-up (M9). The EE retention flush of tombstones (older than retention plus one day) does not exist yet.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai full review

Pass 2 of 2: the temporary path filter in .coderabbit.yaml now selects the test files only (216). Pass 1 covered the sources; its 17 threads are answered above. The filter commit is removed when this pass is clean.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
fd --hidden --type f '^\.coderabbit\.yaml$' --exclude .git --exec cat -- {}

Length of output: 257


🏁 Script executed:

#!/bin/bash
fd --hidden --no-ignore --type f '^\.coderabbit\.yaml$' --exclude .git --exec cat -- {}

Length of output: 269


@mmabrouk I’ll trigger the full review for Pass 2, intended to cover the 216 test files. The configuration search returned no .coderabbit.yaml, so I could not verify the test-only filters. Please confirm that the temporary configuration is present on the PR branch.

Files excluded from either pass are not verified by that pass. Remove the temporary filter commit before merge.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments: 1
api/oss/tests/pytest/unit/tools/test_workflow_tool_call.py: 1

303-304: Trivial · Security & Privacy · Quick win

Check the admitted principal in the child-run admission test, not only the origin.

The comment on Line 303 says that the child runs as its parent with the same principal. The test checks only context.origin. The admission decides from envelope.authority.principal. Suppose the router admits the child with a wrong or upgraded principal. This test still passes. The AGENTS.md invariant says the minted envelope "never upgrades a principal". Compare the admitted authority with the parent envelope's authority.

Proposed assertion
     # The child runs as its parent: same principal, origin child.
+    parent = request.state.run_envelope
+    assert admitted["envelope"].authority == parent.authority
+    assert admitted["envelope"].sender == parent.sender
     assert admitted["envelope"].context.origin.value == "child"

This follows the retrieved learning that tests of identity-sensitive operations "assert the actual field(s) that determine the resulting identity/authorization outcome".

Source: Learnings


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 29edb5f and db0f028.

Files ignored due to path filters: 274
  • .coderabbit.yaml is excluded by none and included by none
  • api/AGENTS.md is excluded by none and included by none
  • api/entrypoints/access.py is excluded by none and included by none
  • api/entrypoints/routers.py is excluded by none and included by none
  • api/entrypoints/worker_queues.py is excluded by none and included by none
  • api/oss/databases/postgres/migrations/core_oss/versions/oss000000048_add_agent_session_sharing.py is excluded by none and included by none
  • api/oss/databases/postgres/migrations/core_oss/versions/oss000000049_backfill_agent_session_sharing.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/agent_templates/models.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/agent_templates/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/applications/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/channels/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/evaluators/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/legacy_variants/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/mounts/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/sessions/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/sessions/watch.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/sharing/__init__.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/sharing/models.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/sharing/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/sharing/utils.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/tools/router.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/workflows/exceptions.py is excluded by none and included by none
  • api/oss/src/apis/fastapi/workflows/router.py is excluded by none and included by none
  • api/oss/src/core/access/dtos.py is excluded by none and included by none
  • api/oss/src/core/access/interfaces.py is excluded by none and included by none
  • api/oss/src/core/access/permissions/types.py is excluded by none and included by none
  • api/oss/src/core/access/prefetch.py is excluded by none and included by none
  • api/oss/src/core/access/service.py is excluded by none and included by none
  • api/oss/src/core/agent_templates/loader.py is excluded by none and included by none
  • api/oss/src/core/applications/service.py is excluded by none and included by none
  • api/oss/src/core/channels/commands.py is excluded by none and included by none
  • api/oss/src/core/channels/dtos.py is excluded by none and included by none
  • api/oss/src/core/channels/interfaces.py is excluded by none and included by none
  • api/oss/src/core/channels/service.py is excluded by none and included by none
  • api/oss/src/core/embeds/service.py is excluded by none and included by none
  • api/oss/src/core/embeds/utils.py is excluded by none and included by none
  • api/oss/src/core/evaluators/defaults.py is excluded by none and included by none
  • api/oss/src/core/evaluators/service.py is excluded by none and included by none
  • api/oss/src/core/events/types.py is excluded by none and included by none
  • api/oss/src/core/memberships/dtos.py is excluded by none and included by none
  • api/oss/src/core/memberships/interfaces.py is excluded by none and included by none
  • api/oss/src/core/memberships/service.py is excluded by none and included by none
  • api/oss/src/core/mounts/dtos.py is excluded by none and included by none
  • api/oss/src/core/mounts/service.py is excluded by none and included by none
  • api/oss/src/core/sessions/commands/delivery.py is excluded by none and included by none
  • api/oss/src/core/sessions/commands/service.py is excluded by none and included by none
  • api/oss/src/core/sessions/service.py is excluded by none and included by none
  • api/oss/src/core/sessions/starts/service.py is excluded by none and included by none
  • api/oss/src/core/sessions/streams/dtos.py is excluded by none and included by none
  • api/oss/src/core/sessions/streams/interfaces.py is excluded by none and included by none
  • api/oss/src/core/sessions/streams/service.py is excluded by none and included by none
  • api/oss/src/core/sessions/streams/types.py is excluded by none and included by none
  • api/oss/src/core/sessions/turns/types.py is excluded by none and included by none
  • api/oss/src/core/sharing/__init__.py is excluded by none and included by none
  • api/oss/src/core/sharing/admission.py is excluded by none and included by none
  • api/oss/src/core/sharing/audit.py is excluded by none and included by none
  • api/oss/src/core/sharing/disclosure.py is excluded by none and included by none
  • api/oss/src/core/sharing/dtos.py is excluded by none and included by none
  • api/oss/src/core/sharing/interfaces.py is excluded by none and included by none
  • api/oss/src/core/sharing/service.py is excluded by none and included by none
  • api/oss/src/core/sharing/types.py is excluded by none and included by none
  • api/oss/src/core/skills/import_service.py is excluded by none and included by none
  • api/oss/src/core/skills/service.py is excluded by none and included by none
  • api/oss/src/core/tools/platform_handlers.py is excluded by none and included by none
  • api/oss/src/core/workflows/dtos.py is excluded by none and included by none
  • api/oss/src/core/workflows/interfaces.py is excluded by none and included by none
  • api/oss/src/core/workflows/service.py is excluded by none and included by none
  • api/oss/src/core/workflows/types.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/channels/dao.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/git/dao.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/memberships/dao.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/memberships/mappings.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sessions/streams/dao.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sessions/streams/dbes.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sessions/streams/mappings.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sessions/turns/dao.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sharing/__init__.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sharing/dao.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sharing/dbes.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/sharing/mappings.py is excluded by none and included by none
  • api/oss/src/dbs/postgres/workflows/dao.py is excluded by none and included by none
  • api/oss/src/dbs/redis/sessions/contract.py is excluded by none and included by none
  • api/oss/src/dbs/redis/sessions/locks.py is excluded by none and included by none
  • api/oss/src/services/db_manager.py is excluded by none and included by none
  • api/oss/src/tasks/asyncio/channels/inbox.py is excluded by none and included by none
  • api/oss/src/tasks/asyncio/sessions/interactions_dispatcher.py is excluded by none and included by none
  • api/oss/src/tasks/asyncio/triggers/dispatcher.py is excluded by none and included by none
  • api/oss/src/utils/caching.py is excluded by none and included by none
  • api/pytest.ini is excluded by none and included by none
  • docs/design/sharing-program/CONTRACT.md is excluded by none and included by none
  • docs/design/sharing-program/interfaces/m3/entry-points.md is excluded by none and included by none
  • docs/design/sharing-program/interfaces/m3/interfaces.md is excluded by none and included by none
  • docs/design/sharing-program/interfaces/m3/technical-design.md is excluded by none and included by none
  • docs/docs/administration/access-control/03-rbac.mdx is excluded by none and included by none
  • docs/docs/guides/12-connect-slack.mdx is excluded by none and included by none
  • docs/docs/guides/14-share-agents-and-chats.mdx is excluded by none and included by none
  • openspec/changes/agent-session-sharing/design.md is excluded by none and included by none
  • openspec/changes/agent-session-sharing/proposal.md is excluded by none and included by none
  • openspec/changes/agent-session-sharing/specs/agent-session-sharing/spec.md is excluded by none and included by none
  • openspec/changes/agent-session-sharing/specs/sharing-access-boundaries/spec.md is excluded by none and included by none
  • openspec/changes/agent-session-sharing/tasks.md is excluded by none and included by none
  • openspec/changes/session-trace-privacy/design.md is excluded by none and included by none
  • web/AGENTS.md is excluded by none and included by none
  • web/mobile/src/features/agents/AgentCardBody.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/AgentComposer.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/AgentFilterMenu.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/AgentListScreen.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/AgentListTable.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/AgentOverviewScreen.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/AgentPrivateMarker.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/AgentRowCells.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/agentListView.ts is excluded by none and included by none
  • web/mobile/src/features/agents/myPrivateAgent.ts is excluded by none and included by none
  • web/mobile/src/features/agents/states/AgentNotFound.tsx is excluded by none and included by none
  • web/mobile/src/features/agents/useAgentOverviewAccess.ts is excluded by none and included by none
  • web/mobile/src/features/agents/useAgentOwners.ts is excluded by none and included by none
  • web/mobile/src/features/agents/useAgentPublishPanel.tsx is excluded by none and included by none
  • web/mobile/src/features/app/AppProviders.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/AgentPrivacyDialogHost.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/AgentPrivacyHost.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/ApprovalDock.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/ChatScreen.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/Composer.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/LiveConversation.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/ReadOnlyComposerNotice.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/SessionShareDialogBound.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/SessionShareHost.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/SessionSharingControl.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/SessionTabs.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/SessionTopBar.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/SessionWorkspace.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/ShareMenu.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/sessionReadOnly.ts is excluded by none and included by none
  • web/mobile/src/features/chat/shareDialogState.ts is excluded by none and included by none
  • web/mobile/src/features/chat/states/ChatNoAccess.tsx is excluded by none and included by none
  • web/mobile/src/features/chat/useAgentEntity.ts is excluded by none and included by none
  • web/mobile/src/features/chat/useAgentPrivacyProps.ts is excluded by none and included by none
  • web/mobile/src/features/chat/useAgentVisibilityRecheck.ts is excluded by none and included by none
  • web/mobile/src/features/chat/useChatAccess.ts is excluded by none and included by none
  • web/mobile/src/features/chat/useDisclosureProviderLabel.ts is excluded by none and included by none
  • web/mobile/src/features/chat/useSessionHeader.ts is excluded by none and included by none
  • web/mobile/src/features/chat/useSessionSharing.ts is excluded by none and included by none
  • web/mobile/src/features/chat/useSessionWatch.ts is excluded by none and included by none
  • web/mobile/src/features/home/pendingTask.ts is excluded by none and included by none
  • web/mobile/src/features/nav/useMobileNavItems.tsx is excluded by none and included by none
  • web/mobile/src/features/sessions/SessionRowCells.tsx is excluded by none and included by none
  • web/mobile/src/features/sessions/useSessionRowMenu.ts is excluded by none and included by none
  • web/mobile/src/features/settings/ChannelsTab.tsx is excluded by none and included by none
  • web/mobile/src/features/skills/SkillListScreen.tsx is excluded by none and included by none
  • web/mobile/src/lib/sharingCopy.ts is excluded by none and included by none
  • web/oss/src/components/AgentChatSlice/AgentConversation.tsx is excluded by none and included by none
  • web/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.ts is excluded by none and included by none
  • web/oss/src/components/AgentChatSlice/state/sessions.ts is excluded by none and included by none
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsx is excluded by none and included by none
  • web/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/useCommitHostAdapter.ts is excluded by none and included by none
  • web/oss/src/components/pages/agent-home/hooks/useCreateAgent.ts is excluded by none and included by none
  • web/packages/agenta-api-client/src/generated/Client.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/index.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sessions/client/Client.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sessions/client/requests/SetSessionStreamHeaderRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/Client.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/index.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentTransferRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentVisibilityRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchAgentSharingRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchSessionSharingRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/QuerySharingMembersRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RestrictSessionToOwnerRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RevokeSessionGrantRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionGrantRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionVisibilityRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/TakeAgentOwnershipRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/index.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/exports.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/sharing/index.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/resources/workflows/client/requests/TemplateLoadRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/AccessPolicy.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/AgentSharingResponse.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/AgentSharingState.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/Application.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/ApplicationCreate.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/DisclosedConnection.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/EffectiveRole.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/Evaluator.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/EvaluatorCreate.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/EventType.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/NotShareableReason.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/Permission.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/ProjectMemberProfile.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SessionGrant.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SessionListItem.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SessionRole.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SessionSharingResponse.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SessionSharingState.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SessionStream.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/ShareDisclosure.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SharingMembersQueryRequest.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SharingMembersResponse.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflow.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflowCreate.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/Visibility.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/Workflow.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/WorkflowCreate.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-api-client/src/generated/api/types/index.ts is excluded by !**/generated/** and included by none
  • web/packages/agenta-chat/src/components/ApprovalCard.tsx is excluded by none and included by none
  • web/packages/agenta-chat/src/model/error.ts is excluded by none and included by none
  • web/packages/agenta-entities/package.json is excluded by none and included by none
  • web/packages/agenta-entities/src/session/api/api.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/session/core/schema.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/session/index.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/session/state/invalidate.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/sharing/api.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/sharing/core/keys.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/sharing/core/schema.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/sharing/index.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/sharing/state/store.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/workflow/api/api.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/workflow/core/schema.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/workflow/state/commit.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/workflow/state/loadTemplate.ts is excluded by none and included by none
  • web/packages/agenta-entities/src/workflow/state/store.ts is excluded by none and included by none
  • web/packages/agenta-entity-ui/package.json is excluded by none and included by none
  • web/packages/agenta-entity-ui/src/sharing/AgentPrivacyControl.tsx is excluded by none and included by none
  • web/packages/agenta-entity-ui/src/sharing/AgentPrivacyDialog.tsx is excluded by none and included by none
  • web/packages/agenta-entity-ui/src/sharing/AgentTransferDialog.tsx is excluded by none and included by none
  • web/packages/agenta-entity-ui/src/sharing/copy.ts is excluded by none and included by none
  • web/packages/agenta-entity-ui/src/sharing/index.ts is excluded by none and included by none
  • web/packages/agenta-entity-ui/src/sharing/useAgentSharingWrites.ts is excluded by none and included by none
  • web/packages/agenta-home-ui/src/useCreateAgent.ts is excluded by none and included by none
  • web/packages/agenta-navigation/src/dynamic/sessionsSource.ts is excluded by none and included by none
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesButton.tsx is excluded by none and included by none
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesModal.tsx is excluded by none and included by none
  • web/packages/agenta-playground-ui/src/components/CommitVariantChanges/types.ts is excluded by none and included by none
  • web/packages/agenta-sdk/src/resources.ts is excluded by none and included by none
  • web/packages/agenta-sessions-ui/package.json is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/SessionCardList.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/SessionRowActions.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/SessionTab.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/SessionTabRail.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/index.ts is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/MemberPicker.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/SessionAccessChip.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/SessionGrantRoleMenu.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/SessionPrivacyMarker.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/SessionShareButton.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/SessionShareDialog.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/ShareDisclosureNotice.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/SharingSurface.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/copy.ts is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/index.ts is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/people.tsx is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/result.ts is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/sharing/useSharingPerson.ts is excluded by none and included by none
  • web/packages/agenta-sessions-ui/src/useSessionActions.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.stories.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/ChannelsHubView.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/actions.ts is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/helpers.ts is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/index.ts is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/sharingCopy.ts is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/storyFixtures.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/types.ts is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/channels/useChannelPanel.tsx is excluded by none and included by none
  • web/packages/agenta-settings-ui/src/index.ts is excluded by none and included by none
  • web/packages/agenta-ui/src/utils/copyToClipboard.ts is excluded by none and included by none
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml and included by none
  • web/storybook/package.json is excluded by none and included by none
  • web/storybook/stories/entity-ui/SharingAgentPrivacy.stories.tsx is excluded by none and included by none
  • web/storybook/stories/entity-ui/SharingMemberPicker.stories.tsx is excluded by none and included by none
  • web/storybook/stories/entity-ui/SharingSessionDialog.stories.tsx is excluded by none and included by none
Files selected for processing: 216
  • api/oss/tests/pytest/acceptance/channels/bridge_process/test_bridge_two_bridges.py
  • api/oss/tests/pytest/acceptance/channels/differential/test_slack_in_process_vs_bridged.py
  • api/oss/tests/pytest/acceptance/channels/support.py
  • api/oss/tests/pytest/acceptance/channels/test_channel_tools.py
  • api/oss/tests/pytest/acceptance/channels/test_channels_permissions.py
  • api/oss/tests/pytest/acceptance/sharing/__init__.py
  • api/oss/tests/pytest/acceptance/sharing/conftest.py
  • api/oss/tests/pytest/acceptance/sharing/support.py
  • api/oss/tests/pytest/acceptance/sharing/test_agent_owner_by_commit.py
  • api/oss/tests/pytest/acceptance/sharing/test_channel_sessions.py
  • api/oss/tests/pytest/acceptance/sharing/test_default_visibility.py
  • api/oss/tests/pytest/acceptance/sharing/test_heartbeat_admission.py
  • api/oss/tests/pytest/acceptance/sharing/test_hidden_references.py
  • api/oss/tests/pytest/acceptance/sharing/test_list_parity.py
  • api/oss/tests/pytest/acceptance/sharing/test_owner_leaves.py
  • api/oss/tests/pytest/acceptance/sharing/test_ownerless_creation.py
  • api/oss/tests/pytest/acceptance/sharing/test_queued_and_resume_admission.py
  • api/oss/tests/pytest/acceptance/sharing/test_session_files_follow_session.py
  • api/oss/tests/pytest/acceptance/sharing/test_shared_turns_authority.py
  • api/oss/tests/pytest/acceptance/sharing/test_sharing_audit.py
  • api/oss/tests/pytest/acceptance/sharing/test_shortcuts_closed.py
  • api/oss/tests/pytest/acceptance/sharing/test_stream_sharing_state.py
  • api/oss/tests/pytest/acceptance/sharing/test_trigger_claim_owner.py
  • api/oss/tests/pytest/integration/access/test_run_principal_query_counts_postgres.py
  • api/oss/tests/pytest/integration/channels/test_channels_composition_seam.py
  • api/oss/tests/pytest/integration/channels/test_channels_connection_write_path_integration.py
  • api/oss/tests/pytest/integration/channels/test_channels_service_routing_dao.py
  • api/oss/tests/pytest/integration/memberships/test_admin_membership_invalidation_postgres.py
  • api/oss/tests/pytest/integration/memberships/test_hot_path_query_counts_postgres.py
  • api/oss/tests/pytest/integration/memberships/test_membership_parity_postgres.py
  • api/oss/tests/pytest/integration/sessions/test_sessions_query_postgres.py
  • api/oss/tests/pytest/integration/sessions/test_trigger_session_claim_postgres.py
  • api/oss/tests/pytest/integration/sessions/test_turns_dao.py
  • api/oss/tests/pytest/integration/sessions/test_wp5_dao_fanout.py
  • api/oss/tests/pytest/integration/sharing/__init__.py
  • api/oss/tests/pytest/integration/sharing/conftest.py
  • api/oss/tests/pytest/integration/sharing/test_admission_settlement.py
  • api/oss/tests/pytest/integration/sharing/test_list_scope_sql.py
  • api/oss/tests/pytest/integration/sharing/test_project_members_query.py
  • api/oss/tests/pytest/integration/sharing/test_resolve_agent_environment.py
  • api/oss/tests/pytest/integration/sharing/test_runner_write_counts_postgres.py
  • api/oss/tests/pytest/integration/sharing/test_session_claim_policy.py
  • api/oss/tests/pytest/integration/sharing/test_session_tombstones.py
  • api/oss/tests/pytest/integration/sharing/test_sharing_backfill.py
  • api/oss/tests/pytest/integration/sharing/test_sharing_dao_locks.py
  • api/oss/tests/pytest/integration/sharing/test_sharing_query_counts_postgres.py
  • api/oss/tests/pytest/integration/sharing/test_sharing_redis_round_trips.py
  • api/oss/tests/pytest/integration/sharing/test_sharing_schema.py
  • api/oss/tests/pytest/integration/sharing/test_workflows_dao_atomic.py
  • api/oss/tests/pytest/unit/access/test_access_service.py
  • api/oss/tests/pytest/unit/access/test_check_action_access_wrapper.py
  • api/oss/tests/pytest/unit/access/test_decide.py
  • api/oss/tests/pytest/unit/access/test_grant_exchange.py
  • api/oss/tests/pytest/unit/access/test_organization_write.py
  • api/oss/tests/pytest/unit/access/test_principal_invalidation.py
  • api/oss/tests/pytest/unit/access/test_role_allows.py
  • api/oss/tests/pytest/unit/access/test_run_principal_dtos.py
  • api/oss/tests/pytest/unit/agent_templates/conftest.py
  • api/oss/tests/pytest/unit/agent_templates/test_loader.py
  • api/oss/tests/pytest/unit/agent_templates/test_router.py
  • api/oss/tests/pytest/unit/applications/test_simple_service.py
  • api/oss/tests/pytest/unit/apps/test_create_app.py
  • api/oss/tests/pytest/unit/channels/test_channels_agent_tool_settings.py
  • api/oss/tests/pytest/unit/channels/test_channels_edit_semantics.py
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_busy_thread.py
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_dispatcher.py
  • api/oss/tests/pytest/unit/channels/test_channels_inbox_principal.py
  • api/oss/tests/pytest/unit/channels/test_channels_live_qa_regressions.py
  • api/oss/tests/pytest/unit/channels/test_channels_rechecks.py
  • api/oss/tests/pytest/unit/channels/test_channels_request_reactions.py
  • api/oss/tests/pytest/unit/channels/test_channels_turn_context.py
  • api/oss/tests/pytest/unit/channels/whatsapp/test_whatsapp_dispatcher.py
  • api/oss/tests/pytest/unit/conftest.py
  • api/oss/tests/pytest/unit/embeds/test_embedded_agent_visibility.py
  • api/oss/tests/pytest/unit/evaluators/test_simple_service.py
  • api/oss/tests/pytest/unit/git/test_commit_revision_slug_conflict.py
  • api/oss/tests/pytest/unit/memberships/test_query_project_members.py
  • api/oss/tests/pytest/unit/migrations/test_sharing_backfill_plan.py
  • api/oss/tests/pytest/unit/migrations/test_sharing_migration_gate.py
  • api/oss/tests/pytest/unit/models/test_lifecycle_conventions.py
  • api/oss/tests/pytest/unit/sessions/test_cancel_cancels_pending_interactions.py
  • api/oss/tests/pytest/unit/sessions/test_cancel_stop_guard.py
  • api/oss/tests/pytest/unit/sessions/test_command_matrix_inputs_data.py
  • api/oss/tests/pytest/unit/sessions/test_current_session_tool.py
  • api/oss/tests/pytest/unit/sessions/test_events_recheck_fresh_access.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_admission.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_first_touch_race.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_is_current_turn.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_lock_races.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_mirrors_existing_row.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_parked_zombie.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_refused_turn_final_beat.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_replica_id_control_chars.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_run_credential.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_runner_token.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_stale_turn_end.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_binding.py
  • api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_handover.py
  • api/oss/tests/pytest/unit/sessions/test_inputs_run_envelope.py
  • api/oss/tests/pytest/unit/sessions/test_insert_paths_require_access.py
  • api/oss/tests/pytest/unit/sessions/test_interactions_dispatcher.py
  • api/oss/tests/pytest/unit/sessions/test_live_relay.py
  • api/oss/tests/pytest/unit/sessions/test_project_scoped_locks.py
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_filters.py
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_references.py
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_search.py
  • api/oss/tests/pytest/unit/sessions/test_query_sessions_windowing.py
  • api/oss/tests/pytest/unit/sessions/test_respond_interaction_durable.py
  • api/oss/tests/pytest/unit/sessions/test_resume_after_kill_revives_tombstone.py
  • api/oss/tests/pytest/unit/sessions/test_runner_write_capability.py
  • api/oss/tests/pytest/unit/sessions/test_session_cancel_admission.py
  • api/oss/tests/pytest/unit/sessions/test_session_last_message.py
  • api/oss/tests/pytest/unit/sessions/test_session_response_sanitization.py
  • api/oss/tests/pytest/unit/sessions/test_session_start_service.py
  • api/oss/tests/pytest/unit/sessions/test_session_trigger_expansion.py
  • api/oss/tests/pytest/unit/sessions/test_session_trigger_stamp.py
  • api/oss/tests/pytest/unit/sessions/test_sessions_query_contract.py
  • api/oss/tests/pytest/unit/sessions/test_sessions_root_service.py
  • api/oss/tests/pytest/unit/sessions/test_stream_fill_missing_postgres.py
  • api/oss/tests/pytest/unit/sessions/test_stream_fill_once.py
  • api/oss/tests/pytest/unit/sessions/test_stream_header_merge.py
  • api/oss/tests/pytest/unit/sessions/test_stream_references_storage.py
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard.py
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard_integration.py
  • api/oss/tests/pytest/unit/sessions/test_streams_dao_conflict.py
  • api/oss/tests/pytest/unit/sessions/test_streams_read_runner_address.py
  • api/oss/tests/pytest/unit/sessions/test_turns_dao_conflict.py
  • api/oss/tests/pytest/unit/sessions/test_unchecked_row_recheck.py
  • api/oss/tests/pytest/unit/sessions/test_watch_endpoint.py
  • api/oss/tests/pytest/unit/sessions/test_watch_lifecycle_publish.py
  • api/oss/tests/pytest/unit/sessions/test_watch_publish.py
  • api/oss/tests/pytest/unit/sessions/test_watch_session_list_publish.py
  • api/oss/tests/pytest/unit/sessions/test_worker_session_context_wiring.py
  • api/oss/tests/pytest/unit/sessions/test_wp5_root_router.py
  • api/oss/tests/pytest/unit/sharing/__init__.py
  • api/oss/tests/pytest/unit/sharing/test_admission.py
  • api/oss/tests/pytest/unit/sharing/test_agent_create_policy.py
  • api/oss/tests/pytest/unit/sharing/test_commit_paths_owner.py
  • api/oss/tests/pytest/unit/sharing/test_composition_roots.py
  • api/oss/tests/pytest/unit/sharing/test_disclosure.py
  • api/oss/tests/pytest/unit/sharing/test_initial_policy.py
  • api/oss/tests/pytest/unit/sharing/test_missing_session_cache.py
  • api/oss/tests/pytest/unit/sharing/test_read_scope.py
  • api/oss/tests/pytest/unit/sharing/test_resolve_agent_artifact_id.py
  • api/oss/tests/pytest/unit/sharing/test_resource_policy.py
  • api/oss/tests/pytest/unit/sharing/test_route_checks.py
  • api/oss/tests/pytest/unit/sharing/test_send_path_reads.py
  • api/oss/tests/pytest/unit/sharing/test_sharing_caches.py
  • api/oss/tests/pytest/unit/sharing/test_sharing_fix_review.py
  • api/oss/tests/pytest/unit/sharing/test_sharing_import_boundary.py
  • api/oss/tests/pytest/unit/sharing/test_sharing_router_errors.py
  • api/oss/tests/pytest/unit/sharing/test_sharing_writes.py
  • api/oss/tests/pytest/unit/sharing/test_stream_agent_hidden.py
  • api/oss/tests/pytest/unit/sharing/test_workflow_routes_scope.py
  • api/oss/tests/pytest/unit/skills/test_import_service.py
  • api/oss/tests/pytest/unit/skills/test_lifecycle_service.py
  • api/oss/tests/pytest/unit/test_channel_adapters_entrypoint.py
  • api/oss/tests/pytest/unit/test_simple_service_flag_normalization.py
  • api/oss/tests/pytest/unit/tools/test_catalog_action_identity.py
  • api/oss/tests/pytest/unit/tools/test_config_handlers.py
  • api/oss/tests/pytest/unit/tools/test_create_connection_errors.py
  • api/oss/tests/pytest/unit/tools/test_discovery.py
  • api/oss/tests/pytest/unit/tools/test_gateway_run_error_privacy.py
  • api/oss/tests/pytest/unit/tools/test_gateway_run_route.py
  • api/oss/tests/pytest/unit/tools/test_gateway_search_route.py
  • api/oss/tests/pytest/unit/tools/test_oauth_callback_integration_cache.py
  • api/oss/tests/pytest/unit/tools/test_platform_handlers.py
  • api/oss/tests/pytest/unit/tools/test_resolve_gateway_connection.py
  • api/oss/tests/pytest/unit/tools/test_workflow_tool_call.py
  • api/oss/tests/pytest/unit/triggers/conftest.py
  • api/oss/tests/pytest/unit/triggers/test_triggers_dispatcher.py
  • api/oss/tests/pytest/unit/triggers/test_triggers_principal.py
  • api/oss/tests/pytest/unit/triggers/test_triggers_soft_delete_postgres.py
  • api/oss/tests/pytest/unit/workflows/test_idempotent_create.py
  • api/oss/tests/pytest/unit/workflows/test_invoke_detached.py
  • api/oss/tests/pytest/unit/workflows/test_revision_read_workflow_fetch_dedup.py
  • api/oss/tests/pytest/unit/workflows/test_static_catalog.py
  • api/oss/tests/pytest/unit/workflows/test_workflow_access_not_cached.py
  • api/oss/tests/pytest/utils/cache.py
  • api/oss/tests/pytest/utils/memberships.py
  • api/oss/tests/pytest/utils/sharing.py
  • web/mobile/tests/unit/agentChannelSharing.render.test.tsx
  • web/mobile/tests/unit/agentListView.test.ts
  • web/mobile/tests/unit/agentOverviewAccess.render.test.tsx
  • web/mobile/tests/unit/agentOwnerLabel.test.ts
  • web/mobile/tests/unit/agentOwnerRoster.render.test.tsx
  • web/mobile/tests/unit/agentScreenRequests.render.test.tsx
  • web/mobile/tests/unit/agentVisibilityRecheck.render.test.tsx
  • web/mobile/tests/unit/chatAccess.render.test.tsx
  • web/mobile/tests/unit/chatOpenRoundTrips.render.test.tsx
  • web/mobile/tests/unit/disclosureProviderLabel.render.test.tsx
  • web/mobile/tests/unit/liveConversationReadOnly.render.test.tsx
  • web/mobile/tests/unit/newChatFromAgent.render.test.tsx
  • web/mobile/tests/unit/newChatShareButton.render.test.tsx
  • web/mobile/tests/unit/sessionReadOnly.render.test.tsx
  • web/mobile/tests/unit/sessionSharingControl.render.test.tsx
  • web/mobile/tests/unit/sessionWorkspaceHiddenAgent.render.test.tsx
  • web/mobile/tests/unit/shareMenu.render.test.tsx
  • web/mobile/tests/unit/sharingHostsRoster.render.test.tsx
  • web/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.test.ts
  • web/oss/src/components/AgentChatSlice/state/sessions.visibility.test.ts
  • web/oss/src/components/pages/agents/createAgentVisibility.test.tsx
  • web/packages/agenta-chat/tests/unit/ApprovalCard.test.tsx
  • web/packages/agenta-chat/tests/unit/model/sendRefusalAccess.test.ts
  • web/packages/agenta-entities/tests/unit/sharing-api.test.ts
  • web/packages/agenta-entities/tests/unit/sharing-recheck-budget.test.ts
  • web/packages/agenta-entities/tests/unit/workflow-list-access.test.ts
  • web/packages/agenta-entity-ui/tests/unit/AgentPrivacyControl.render.test.tsx
  • web/packages/agenta-entity-ui/tests/unit/agentSharingCopy.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/SessionRowActionsOpen.render.test.tsx
  • web/packages/agenta-sessions-ui/tests/unit/SessionShareDialog.test.tsx
  • web/packages/agenta-sessions-ui/tests/unit/disclosureAccountNames.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/sharingCopy.test.ts
  • web/packages/agenta-sessions-ui/tests/unit/useSessionActions.test.ts
  • web/packages/agenta-settings-ui/tests/unit/channelSharing.test.tsx
  • web/packages/agenta-ui/tests/unit/copyToClipboard.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai review

Pass 2, round 2: the 4 test threads and the nitpick are fixed in c248a87 (replies above).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments: 1
api/oss/tests/pytest/unit/tools/test_workflow_tool_call.py: 1

311-338: Trivial · Maintainability & Code Quality · Quick win

Scope the private-agent refusal stub to the admitted target.

The refusal in this test ignores the request target. The stub raises AdmissionDenied for every admission call, so the test passes whether or not the admitted request names workflow.variant.private-agent. The router resolves the child's target inside admit_request, which this test never runs. The test therefore checks only that an AdmissionDenied becomes an access_denied tool result. It does not exercise the private-agent access decision.

Make the refusal apply only when the admitted request.references names the private agent. Also assert the admission call that the test depends on:

Suggested fix
     workflows = FakeWorkflowsService(outputs={"ok": True})
     admission = RecordingRunAdmission(
-        refuse=lambda method, kwargs: AdmissionDenied(
+        refuse=lambda method, kwargs: None if not _targets_private_agent(kwargs["request"].references) else AdmissionDenied(
             decision=Decision(allowed=False, reason=DecisionReason.RESOURCE_DENIED),
             readable=False,
             boundary=kwargs["boundary"],
         )
     )
     response = await _router(workflows, admission)._call_workflow_tool(
         request=_request(),
         body=_call("workflow.variant.private-agent", {}),
     )

+    assert admission.methods() == ["admit_request"]
     assert workflows.calls == []

_targets_private_agent is a placeholder. Build its matcher from the references value that the router produces for the workflow.variant.private-agent slug. The decision-level check still needs a test that uses the real RunAdmission with a rule-based access service. This comment covers only the stubbed test.


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between db0f028 and c248a87.

Files selected for processing: 4
  • api/oss/tests/pytest/acceptance/sharing/test_hidden_references.py
  • api/oss/tests/pytest/acceptance/sharing/test_list_parity.py
  • api/oss/tests/pytest/unit/tools/test_workflow_tool_call.py
  • web/mobile/tests/unit/newChatShareButton.render.test.tsx
Files skipped from review as they are similar to previous changes: 1
  • web/mobile/tests/unit/newChatShareButton.render.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

@mmabrouk I’ll trigger the next review pass for the fixes reported in c248a87bd5, covering the four test threads and the nitpick.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mmabrouk
mmabrouk force-pushed the feat/m3-agent-session-sharing branch from c248a87 to 7faf496 Compare October 25, 2026 05:13
@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: Both CodeRabbit passes are done. Pass 1 (sources, 219 files): 17 threads, all fixed and answered. Pass 2 (tests, 216 files): 4 threads, all fixed. Of its 2 nitpicks, the child-run admission test now checks the admitted principal (c248a87) and refuses only the private agent's admission (7faf496). The temporary .coderabbit.yaml filter commit is removed from the branch (7faf496); .coderabbit.yaml equals the base branch again.

@mmabrouk mmabrouk added the lgtm This PR has been approved by a maintainer label Oct 25, 2026
@mmabrouk
mmabrouk force-pushed the feat/m3-agent-session-sharing branch from 7faf496 to 4ea3726 Compare October 25, 2026 17:28
@mmabrouk
mmabrouk changed the base branch from release/v0.124.0 to release/v0.125.0 October 25, 2026 17:28
@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: Rebased onto release/v0.125.0 (4cc099f) with GitButler (target change, but pull): no conflicted commits. The new head is 4ea372687b, and the PR base is release/v0.125.0.

  • Lane diff: 489 files, the same list as the diff against 29edb5f95e. No file the new base changed is an M3 file.
  • Migrations: one core_oss head oss000000049 (050 -> 048 -> 049).
  • Unit: OSS 9261 passed, EE 10219 passed.
  • Integration (sharing, sessions, memberships, including the statement-count tests): OSS 266, EE 268.
  • Acceptance (sharing, sessions, tools): EE 139 passed. OSS 91 passed and 1 timed out while the Fern build loaded the box; that file reran green twice (9/9).
  • Mobile unit: 672 passed; tsc clean.
  • Fern: regenerated from the stack A EE spec over HTTP. One generated change (the MountCredentials doc comment from M4a), committed as 4ea372687b.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: Release QA fixes R1 and R2 are pushed. Head 0544f0b3d1, three commits on top of 4ea372687b.

Problem. A person's event subscription, child run (agent tool) and evaluation run run as that person (a human principal). They create an ownerless, project-visible session (CONTRACT section 7). Rule S3 ("humans only read an ownerless session") refused their own heartbeats, runner writes and next turns. The result was a subscription session with no output, and child or evaluation sessions stuck running.

Fix (CONTRACT section 7 unchanged):

  • AccessService.decide takes the run context of a server-built envelope. check_request passes it only for a run credential, a server-signed Secret.
  • S3 now admits a human principal on an ownerless session only when that context's origin is subscription, child or evaluation. A person sending interactively (web, browser Bearer, API key) still only reads an ownerless session. The origin opens no owned session.
  • The turn admission record now carries the signed origin (<kind>:<id>:<origin>). Neither continuity shortcut (heartbeat, runner write) lets the same person's web or browser request ride a server run's admitted turn.
  • No round trip is added. The replay of two live sends gives Postgres 23/23 and Redis 60/65, against M2's 24/24 and 63/65.

Tests.

  • New integration tests (test_server_run_ownerless_sessions.py) cover the subscription through the real dispatcher claim, and the child and evaluation runs through the real heartbeat. They use the real RunAdmission, AccessService and SharingService over Postgres and Redis. All of them failed before the fix. Two cases that must stay refused are also covered.
  • Unit tests cover every origin and the admission record.
  • Unit: OSS 9273, EE 10231 passed. Integration (with the statement-count tests): OSS 272, EE 274 passed. Acceptance (sharing, sessions, tools, triggers): OSS 132, EE 179 passed.

Codex review (xhigh, 3 rounds): the last round answered "no blocking issue". Round 1 found the continuity bypass (fixed by the origin in the record). Its mixed-version concern does not apply, because v0.125.0 is the first release with admission records. Follow-up, not blocking: a person's server run can still write other ownerless sessions of its project, as an API key or an installation already can. The spec now says so; binding the run to its session id comes later.

R4. An API key that started a pre-M2 session cannot continue it after oss000000049, which gives the session to its creator. The conductor has the read-only production count query and the fix options.

Agenta Product Agent added 17 commits October 25, 2026 22:19
…, so the turns of a session with no row are none
…w, in the one insert statement, and a turn for a session the check found no row for is refused
…ce policy and the routers their run admission, and the events recheck test runs the real session check
…nd channel tests survive a closed event loop and a cold agent run
…ted private session leaves a tombstone that keeps its id hidden from everyone but its former owner (read in the one missing-session read), and a turns cursor must be a turn of the queried session
…), a displaced turn's late beat removes the row it inserted, the reserved tools pin the committed variant and check list_starters by its agent, and the CodeRabbit pass 1 items
…by a per-id lock, the zombie cleanup removes only an unchanged row, and a tool commit takes its agent from the checked variant
…rry the acceptance markers, and the child-run admission test checks the admitted principal
…agent's admission and checks the admission ran
… run in the ownerless sessions they create (the signed run origin, never a client field); a person sending interactively still only reads an ownerless session
… a person's server run never opens its turn to the same person's web or browser requests
…e QA R3, option 2)

Owner decision 2026-10-25: option 2. In a project-visible web session,
members with the project capability read, send and answer approvals, owned
or ownerless, also after the owner left. Project access takes precedence over
a Viewer grant. A send still needs agent access for the sender. Rename,
archive, delete and sharing changes stay with the owner; an ownerless session
keeps today's EDIT_SESSIONS rule. Channel (Slack) sessions and private
sessions and grants keep their rules.

Channel sessions stay closed to people on every insertion path: the session
row insert reads, in the same statement, whether a channel thread names the
session id. If one does, it writes the channel policy (project-visible,
ownerless) whoever creates the row, and the cache entry records a channel
session. A person's first heartbeat that lands on such a row is checked
against it and refused, and the row it inserted is removed. No added Postgres
statement or Redis command on any existing path (count tests and the
send-path replay).

Tests: the production-copy rehearsal shapes F1 (empty creatorless session),
F3a (single child-run turn with a human sender) and F3b (pre-principal chat:
the second sender sends and approves; rename, archive and delete stay with
the backfilled owner), a member approves in a project session, channel
sessions stay read-only (rename before the first beat, by an API key and by
a person, and a person's first beat), and the Option 1 tests flipped.

Copy for owner review (new or changed strings):
- tooltipProject: "Everyone in the project can view and send"
- panelNoOwnerCanSend: "This chat was started by an API key or an automation,
  so it has no owner. Everyone in the project can read it and send to it."
- panelOwnerLeftCanSend: "{owner} left this project. Everyone in the project
  can still read this chat and send to it."
- generalProjectDescription: "Everyone in {project} can view this chat and send
  to it."
- panelYouViewOnly reuses the approved sentence "You can view this chat, but
  you cannot send to it." for a reader whose project role cannot send.
- removed: the old ownerless and owner-left "no one can send" panel lines.
- the user guide lines about project sharing, owner leaves, API keys and Slack
@mmabrouk
mmabrouk force-pushed the feat/m3-agent-session-sharing branch from c51663f to 22b76ac Compare October 25, 2026 21:24
@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Release QA R3: option 2 is in (head 22b76ac129, rebased on release/v0.125.0 after #7804).

The owner chose option 2. A project-visible web chat now lets every member whose role can run chats read it, send to it and answer its approvals. This holds for owned and ownerless chats, and also after the owner left. Rename, archive, delete and sharing stay with the owner. An ownerless chat keeps today's edit rule.

What else changed in this commit:

  • A Slack chat stays read-only for people on every way a session row is created. The row insert reads, in the same statement, whether a channel thread names the session id. If one does, the row gets the channel policy (project-visible, no owner), whoever creates it. A person's first heartbeat on such a row is checked and refused, and the row it inserted is removed. Codex found these two paths (rename before the first beat, first heartbeat) in review rounds 1 to 3. Both existed before option 2.
  • Project access takes precedence over a Viewer grant in my_role.
  • The access chip no longer says "no one can send". A reader whose role cannot send sees "You can view this chat, but you cannot send to it." (the approved sentence).

Tests added: the rehearsal shapes F1, F3a and F3b, a member approving in a project chat, and three channel regressions. Each regression fails without its fix. I also flipped the option 1 tests.

Results on stack A:

  • Unit: OSS 9274 passed, EE 10232 passed.
  • Integration and count tests: OSS 406 passed, EE 419 passed.
  • Acceptance sharing, channels and sessions: OSS 125 passed. EE 155 passed on the first run. The 17 tests that failed on read timeouts (box load about 57) all passed on rerun.
  • Mobile: 672 passed, tsc clean. sessions-ui: 67 passed.
  • Send-path replay: Postgres 23 and 23 (M2: 24 and 24), Redis 60 and 65 (M2: 63 and 65). Every request costs the same as before option 2.
  • openspec validate --strict: valid.

The PR body now has a Changelog section. One line differs from the brief: "An API key cannot continue a private chat that a person owns". With option 2, an API key can continue a project-visible chat that a person owns.

…the row idle and takes no turn

The channel inbox writes a channel thread before its session's first heartbeat. A
person's first send, steer, start or heartbeat for that session id inserts the row
with the channel policy (project-visible, ownerless) and is then checked against it:
- send and steer run the route's recheck before any liveness read, lock or
  displacement (or hand back the turn's locks when the row was created after them);
- a heartbeat runs a session-only check (its agent target was already checked);
- a template start checks the row before any claim.
A refusal keeps the row (it is the channel session's own row, which the channel's
run adopts), clears the refused request's flags and turn id with an UPDATE guarded
by row id and the turn id the insert wrote, publishes the row to the project's
lists, and deletes nothing. A rename of the kept row keeps the ownerless edit rule.

oss000000048 (unreleased) adds ix_channel_threads_project_id_session_id, built
concurrently in the autocommit block with the same validity check as the session
index; the schema rerun test copies channel_threads into its scratch schema.

Counts: the normal create and send are unchanged (HB_CREATE, SEND, send-path
replay). A refused first beat or send costs its normal statements plus the one
guarded UPDATE. Tests for each case fail without their fix.
@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Channel first-touch fix is in (head 36ae78a777, on release/v0.125.0).

A review of 22b76ac129 found that the earlier fix deleted the row after a refused first heartbeat. That delete could erase a concurrent rename. The new commit 36ae78a777 replaces it.

Here is how it works now. A channel thread names a session id that has no row yet. A person's first send, steer, start or heartbeat for that id inserts the row with the channel policy: project-visible, no owner.

  • The request is then checked against that row before it takes a lock, displaces a turn or claims an input, and it is refused.
  • The row stays, because it is the channel session's own row, and the channel's run adopts it.
  • The refusal clears the refused request's flags and turn id with one guarded UPDATE. It also publishes the row to the project's lists. It deletes nothing.

Other changes:

  • oss000000048 adds ix_channel_threads_project_id_session_id, built with CREATE INDEX CONCURRENTLY in the autocommit block, with the same validity check as the session index.
  • The heartbeat check does not resolve the agent target a second time.

On 1M sessions and 200k channel threads on a scratch Postgres (box load about 60):

  • The new index builds in 1.37 s.
  • The session index builds in 1.29 s.
  • 047 to 049 runs in 139 s.
  • The write probe saw no lock error.

Tests:

  • A browser Bearer and a web Secret first send are refused with 403 and leave an idle ownerless row.
  • A first heartbeat, with or without a turn id, is refused and leaves an idle, listed row. A rename and a later run's adoption both survive.
  • A template start is checked before any claim.
  • Each test fails without its fix. I checked that by removing each fix.

Results on stack A:

  • Integration and count tests: OSS 409 passed, EE 422 passed.
  • Acceptance (sharing, channels, sessions): OSS 128 passed, EE 179 passed.
  • Unit: OSS 9306 passed, EE 10264 passed.
  • The send-path replay is unchanged request by request: Postgres 23 and 23, Redis 60 and 65.
  • A refused first beat or send costs its normal statements plus one UPDATE.

Codex xhigh reviewed this in 3 rounds and closed with "no blocking issue". I added two items to the PR follow-ups: an API key can send into an ownerless channel session (pre-existing), and trigger claims skip the channel rule (not reachable today).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer needs-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant