Repository navigation
feat: private agents and sessions, and sharing (M3) - #7791
Conversation
📘 Docs preview
Pages changed in this pull request This comment updates in place on every push. |
📝 Summary
Merge Risk:
|
Website previewPreview URL: https://pr-7791-agenta-website-preview.mahmoud-637.workers.dev Built from |
|
🤖 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.mp4A-bob-oss.mp4B-alice2-oss.mp4B-bob2-oss.mp4C-bob-oss.mp4F-bob-oss.mp4E-dana-oss.mp4T-oss.mp4W-alice-oss.mp4 |
|
🤖 The AI agent says: @coderabbitai full review This PR has more than 300 files. A temporary path filter in |
Railway Preview Environment
PR closed or converted to draft. Environment absence verified; retained storage requires separate provider accounting. Post |
There was a problem hiding this comment.
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-
- Source mode: Auto
- Repository: Agenta-AI/agenta
- Branch: feat/m3-agent-session-sharing
- File: .coderabbit.yaml
- Commit: 02194da
- Layers: Repository YAML (base), Organization UI (inherited)
- Review profile: CHILL
- Plan: Advanced
- Run ID:
63652f9f-ac96-454d-bf65-1866a54423ee
Files ignored due to path filters: 264-
api/oss/tests/pytest/acceptance/channels/bridge_process/test_bridge_two_bridges.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/differential/test_slack_in_process_vs_bridged.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/support.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/test_channel_tools.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/test_channels_permissions.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/__init__.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/support.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_agent_owner_by_commit.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_channel_sessions.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_default_visibility.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_heartbeat_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_hidden_references.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_list_parity.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_owner_leaves.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_ownerless_creation.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_queued_and_resume_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_session_files_follow_session.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_shared_turns_authority.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_sharing_audit.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_shortcuts_closed.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_stream_sharing_state.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_trigger_claim_owner.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/access/test_run_principal_query_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/channels/test_channels_composition_seam.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/channels/test_channels_connection_write_path_integration.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/channels/test_channels_service_routing_dao.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/memberships/test_admin_membership_invalidation_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/memberships/test_hot_path_query_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/memberships/test_membership_parity_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_sessions_query_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_trigger_session_claim_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_turns_dao.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_wp5_dao_fanout.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/__init__.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_admission_settlement.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_list_scope_sql.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_project_members_query.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_resolve_agent_environment.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_runner_write_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_session_claim_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_backfill.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_dao_locks.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_query_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_redis_round_trips.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_schema.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_workflows_dao_atomic.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_access_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_check_action_access_wrapper.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_decide.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_grant_exchange.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_organization_write.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_principal_invalidation.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_role_allows.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_run_principal_dtos.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/agent_templates/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/agent_templates/test_loader.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/agent_templates/test_router.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/applications/test_simple_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/apps/test_create_app.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_agent_tool_settings.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_edit_semantics.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_inbox_busy_thread.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_inbox_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_inbox_principal.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_live_qa_regressions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_rechecks.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_request_reactions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_turn_context.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/whatsapp/test_whatsapp_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/embeds/test_embedded_agent_visibility.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/evaluators/test_simple_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/git/test_commit_revision_slug_conflict.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/memberships/test_query_project_members.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/migrations/test_sharing_backfill_plan.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/migrations/test_sharing_migration_gate.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/models/test_lifecycle_conventions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_cancel_cancels_pending_interactions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_cancel_stop_guard.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_command_matrix_inputs_data.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_current_session_tool.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_events_recheck_fresh_access.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_first_touch_race.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_is_current_turn.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_lock_races.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_mirrors_existing_row.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_parked_zombie.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_refused_turn_final_beat.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_replica_id_control_chars.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_run_credential.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_runner_token.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_stale_turn_end.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_binding.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_handover.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_inputs_run_envelope.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_insert_paths_require_access.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_interactions_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_live_relay.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_project_scoped_locks.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_filters.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_references.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_search.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_windowing.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_respond_interaction_durable.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_resume_after_kill_revives_tombstone.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_runner_write_capability.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_cancel_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_last_message.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_response_sanitization.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_start_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_trigger_expansion.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_trigger_stamp.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_sessions_query_contract.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_sessions_root_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_fill_missing_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_fill_once.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_header_merge.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_references_storage.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_rename_guard.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_rename_guard_integration.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_streams_dao_conflict.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_streams_read_runner_address.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_turns_dao_conflict.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_unchecked_row_recheck.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_endpoint.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_lifecycle_publish.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_publish.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_session_list_publish.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_worker_session_context_wiring.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_wp5_root_router.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/__init__.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_agent_create_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_commit_paths_owner.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_composition_roots.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_disclosure.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_initial_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_missing_session_cache.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_read_scope.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_resolve_agent_artifact_id.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_resource_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_route_checks.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_send_path_reads.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_caches.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_fix_review.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_import_boundary.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_router_errors.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_writes.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_stream_agent_hidden.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_workflow_routes_scope.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/skills/test_import_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/skills/test_lifecycle_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/test_channel_adapters_entrypoint.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/test_simple_service_flag_normalization.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_catalog_action_identity.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_config_handlers.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_create_connection_errors.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_discovery.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_gateway_run_error_privacy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_gateway_run_route.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_gateway_search_route.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_oauth_callback_integration_cache.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_platform_handlers.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_resolve_gateway_connection.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_workflow_tool_call.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/test_triggers_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/test_triggers_principal.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/test_triggers_soft_delete_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_idempotent_create.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_invoke_detached.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_revision_read_workflow_fetch_dedup.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_static_catalog.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_workflow_access_not_cached.pyis excluded by!**/tests/**api/oss/tests/pytest/utils/cache.pyis excluded by!**/tests/**api/oss/tests/pytest/utils/memberships.pyis excluded by!**/tests/**api/oss/tests/pytest/utils/sharing.pyis excluded by!**/tests/**web/mobile/tests/unit/agentChannelSharing.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentListView.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/mobile/tests/unit/agentOverviewAccess.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentOwnerLabel.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/mobile/tests/unit/agentOwnerRoster.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentScreenRequests.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentVisibilityRecheck.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/chatAccess.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/chatOpenRoundTrips.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/disclosureProviderLabel.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/liveConversationReadOnly.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/newChatFromAgent.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/newChatShareButton.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sessionReadOnly.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sessionSharingControl.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sessionWorkspaceHiddenAgent.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/shareMenu.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sharingHostsRoster.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.test.tsis excluded by!**/*.test.tsweb/oss/src/components/AgentChatSlice/state/sessions.visibility.test.tsis excluded by!**/*.test.tsweb/oss/src/components/pages/agents/createAgentVisibility.test.tsxis excluded by!**/*.test.tsxweb/packages/agenta-api-client/src/generated/Client.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sessions/client/Client.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sessions/client/requests/SetSessionStreamHeaderRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/Client.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentTransferRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentVisibilityRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchAgentSharingRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchSessionSharingRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/QuerySharingMembersRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RestrictSessionToOwnerRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RevokeSessionGrantRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionGrantRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionVisibilityRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/TakeAgentOwnershipRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/exports.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/workflows/client/requests/TemplateLoadRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/AccessPolicy.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/AgentSharingResponse.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/AgentSharingState.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Application.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/ApplicationCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/DisclosedConnection.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/EffectiveRole.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Evaluator.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/EvaluatorCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/EventType.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/NotShareableReason.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Permission.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/ProjectMemberProfile.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionGrant.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionListItem.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionRole.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionSharingResponse.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionSharingState.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionStream.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/ShareDisclosure.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SharingMembersQueryRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SharingMembersResponse.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflow.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflowCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Visibility.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Workflow.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/WorkflowCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-chat/tests/unit/ApprovalCard.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-chat/tests/unit/model/sendRefusalAccess.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entities/tests/unit/sharing-api.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entities/tests/unit/sharing-recheck-budget.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entities/tests/unit/workflow-list-access.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entity-ui/tests/unit/AgentPrivacyControl.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-entity-ui/tests/unit/agentSharingCopy.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-sessions-ui/tests/unit/SessionRowActionsOpen.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-sessions-ui/tests/unit/SessionShareDialog.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-sessions-ui/tests/unit/disclosureAccountNames.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-sessions-ui/tests/unit/sharingCopy.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-sessions-ui/tests/unit/useSessionActions.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-settings-ui/tests/unit/channelSharing.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-ui/tests/unit/copyToClipboard.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/pnpm-lock.yaml
Files selected for processing: 220-
.coderabbit.yamlapi/AGENTS.mdapi/entrypoints/access.pyapi/entrypoints/routers.pyapi/entrypoints/worker_queues.pyapi/oss/databases/postgres/migrations/core_oss/versions/oss000000048_add_agent_session_sharing.pyapi/oss/databases/postgres/migrations/core_oss/versions/oss000000049_backfill_agent_session_sharing.pyapi/oss/src/apis/fastapi/agent_templates/models.pyapi/oss/src/apis/fastapi/agent_templates/router.pyapi/oss/src/apis/fastapi/applications/router.pyapi/oss/src/apis/fastapi/channels/router.pyapi/oss/src/apis/fastapi/evaluators/router.pyapi/oss/src/apis/fastapi/legacy_variants/router.pyapi/oss/src/apis/fastapi/mounts/router.pyapi/oss/src/apis/fastapi/sessions/router.pyapi/oss/src/apis/fastapi/sessions/watch.pyapi/oss/src/apis/fastapi/sharing/__init__.pyapi/oss/src/apis/fastapi/sharing/models.pyapi/oss/src/apis/fastapi/sharing/router.pyapi/oss/src/apis/fastapi/sharing/utils.pyapi/oss/src/apis/fastapi/tools/router.pyapi/oss/src/apis/fastapi/workflows/exceptions.pyapi/oss/src/apis/fastapi/workflows/router.pyapi/oss/src/core/access/dtos.pyapi/oss/src/core/access/interfaces.pyapi/oss/src/core/access/permissions/types.pyapi/oss/src/core/access/prefetch.pyapi/oss/src/core/access/service.pyapi/oss/src/core/agent_templates/loader.pyapi/oss/src/core/applications/service.pyapi/oss/src/core/channels/commands.pyapi/oss/src/core/channels/dtos.pyapi/oss/src/core/channels/interfaces.pyapi/oss/src/core/channels/service.pyapi/oss/src/core/embeds/service.pyapi/oss/src/core/embeds/utils.pyapi/oss/src/core/evaluators/defaults.pyapi/oss/src/core/evaluators/service.pyapi/oss/src/core/events/types.pyapi/oss/src/core/memberships/dtos.pyapi/oss/src/core/memberships/interfaces.pyapi/oss/src/core/memberships/service.pyapi/oss/src/core/mounts/dtos.pyapi/oss/src/core/mounts/service.pyapi/oss/src/core/sessions/commands/delivery.pyapi/oss/src/core/sessions/commands/service.pyapi/oss/src/core/sessions/service.pyapi/oss/src/core/sessions/starts/service.pyapi/oss/src/core/sessions/streams/dtos.pyapi/oss/src/core/sessions/streams/interfaces.pyapi/oss/src/core/sessions/streams/service.pyapi/oss/src/core/sessions/turns/types.pyapi/oss/src/core/sharing/__init__.pyapi/oss/src/core/sharing/admission.pyapi/oss/src/core/sharing/audit.pyapi/oss/src/core/sharing/disclosure.pyapi/oss/src/core/sharing/dtos.pyapi/oss/src/core/sharing/interfaces.pyapi/oss/src/core/sharing/service.pyapi/oss/src/core/sharing/types.pyapi/oss/src/core/skills/import_service.pyapi/oss/src/core/skills/service.pyapi/oss/src/core/tools/platform_handlers.pyapi/oss/src/core/workflows/dtos.pyapi/oss/src/core/workflows/interfaces.pyapi/oss/src/core/workflows/service.pyapi/oss/src/core/workflows/types.pyapi/oss/src/dbs/postgres/channels/dao.pyapi/oss/src/dbs/postgres/git/dao.pyapi/oss/src/dbs/postgres/memberships/dao.pyapi/oss/src/dbs/postgres/memberships/mappings.pyapi/oss/src/dbs/postgres/sessions/streams/dao.pyapi/oss/src/dbs/postgres/sessions/streams/dbes.pyapi/oss/src/dbs/postgres/sessions/streams/mappings.pyapi/oss/src/dbs/postgres/sessions/turns/dao.pyapi/oss/src/dbs/postgres/sharing/__init__.pyapi/oss/src/dbs/postgres/sharing/dao.pyapi/oss/src/dbs/postgres/sharing/dbes.pyapi/oss/src/dbs/postgres/sharing/mappings.pyapi/oss/src/dbs/postgres/workflows/dao.pyapi/oss/src/dbs/redis/sessions/contract.pyapi/oss/src/dbs/redis/sessions/locks.pyapi/oss/src/services/db_manager.pyapi/oss/src/tasks/asyncio/channels/inbox.pyapi/oss/src/tasks/asyncio/sessions/interactions_dispatcher.pyapi/oss/src/tasks/asyncio/triggers/dispatcher.pyapi/oss/src/utils/caching.pyapi/pytest.inidocs/design/sharing-program/CONTRACT.mddocs/design/sharing-program/interfaces/m3/entry-points.mddocs/design/sharing-program/interfaces/m3/interfaces.mddocs/design/sharing-program/interfaces/m3/technical-design.mddocs/docs/administration/access-control/03-rbac.mdxdocs/docs/guides/12-connect-slack.mdxdocs/docs/guides/14-share-agents-and-chats.mdxopenspec/changes/agent-session-sharing/design.mdopenspec/changes/agent-session-sharing/proposal.mdopenspec/changes/agent-session-sharing/specs/agent-session-sharing/spec.mdopenspec/changes/agent-session-sharing/specs/sharing-access-boundaries/spec.mdopenspec/changes/agent-session-sharing/tasks.mdweb/AGENTS.mdweb/mobile/src/features/agents/AgentCardBody.tsxweb/mobile/src/features/agents/AgentComposer.tsxweb/mobile/src/features/agents/AgentFilterMenu.tsxweb/mobile/src/features/agents/AgentListScreen.tsxweb/mobile/src/features/agents/AgentListTable.tsxweb/mobile/src/features/agents/AgentOverviewScreen.tsxweb/mobile/src/features/agents/AgentPrivateMarker.tsxweb/mobile/src/features/agents/AgentRowCells.tsxweb/mobile/src/features/agents/agentListView.tsweb/mobile/src/features/agents/myPrivateAgent.tsweb/mobile/src/features/agents/states/AgentNotFound.tsxweb/mobile/src/features/agents/useAgentOverviewAccess.tsweb/mobile/src/features/agents/useAgentOwners.tsweb/mobile/src/features/agents/useAgentPublishPanel.tsxweb/mobile/src/features/app/AppProviders.tsxweb/mobile/src/features/chat/AgentPrivacyHost.tsxweb/mobile/src/features/chat/ApprovalDock.tsxweb/mobile/src/features/chat/ChatScreen.tsxweb/mobile/src/features/chat/Composer.tsxweb/mobile/src/features/chat/LiveConversation.tsxweb/mobile/src/features/chat/ReadOnlyComposerNotice.tsxweb/mobile/src/features/chat/SessionShareHost.tsxweb/mobile/src/features/chat/SessionSharingControl.tsxweb/mobile/src/features/chat/SessionTabs.tsxweb/mobile/src/features/chat/SessionTopBar.tsxweb/mobile/src/features/chat/SessionWorkspace.tsxweb/mobile/src/features/chat/ShareMenu.tsxweb/mobile/src/features/chat/sessionReadOnly.tsweb/mobile/src/features/chat/shareDialogState.tsweb/mobile/src/features/chat/states/ChatNoAccess.tsxweb/mobile/src/features/chat/useAgentEntity.tsweb/mobile/src/features/chat/useAgentVisibilityRecheck.tsweb/mobile/src/features/chat/useChatAccess.tsweb/mobile/src/features/chat/useDisclosureProviderLabel.tsweb/mobile/src/features/chat/useSessionHeader.tsweb/mobile/src/features/chat/useSessionSharing.tsweb/mobile/src/features/chat/useSessionWatch.tsweb/mobile/src/features/home/pendingTask.tsweb/mobile/src/features/nav/useMobileNavItems.tsxweb/mobile/src/features/sessions/SessionRowCells.tsxweb/mobile/src/features/sessions/useSessionRowMenu.tsweb/mobile/src/features/settings/ChannelsTab.tsxweb/mobile/src/features/skills/SkillListScreen.tsxweb/mobile/src/lib/sharingCopy.tsweb/oss/src/components/AgentChatSlice/AgentConversation.tsxweb/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.tsweb/oss/src/components/AgentChatSlice/state/sessions.tsweb/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsxweb/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/useCommitHostAdapter.tsweb/oss/src/components/pages/agent-home/hooks/useCreateAgent.tsweb/packages/agenta-chat/src/components/ApprovalCard.tsxweb/packages/agenta-chat/src/model/error.tsweb/packages/agenta-entities/package.jsonweb/packages/agenta-entities/src/session/api/api.tsweb/packages/agenta-entities/src/session/core/schema.tsweb/packages/agenta-entities/src/session/index.tsweb/packages/agenta-entities/src/session/state/invalidate.tsweb/packages/agenta-entities/src/sharing/api.tsweb/packages/agenta-entities/src/sharing/core/keys.tsweb/packages/agenta-entities/src/sharing/core/schema.tsweb/packages/agenta-entities/src/sharing/index.tsweb/packages/agenta-entities/src/sharing/state/store.tsweb/packages/agenta-entities/src/workflow/api/api.tsweb/packages/agenta-entities/src/workflow/core/schema.tsweb/packages/agenta-entities/src/workflow/state/commit.tsweb/packages/agenta-entities/src/workflow/state/loadTemplate.tsweb/packages/agenta-entities/src/workflow/state/store.tsweb/packages/agenta-entity-ui/package.jsonweb/packages/agenta-entity-ui/src/sharing/AgentPrivacyControl.tsxweb/packages/agenta-entity-ui/src/sharing/AgentPrivacyDialog.tsxweb/packages/agenta-entity-ui/src/sharing/AgentTransferDialog.tsxweb/packages/agenta-entity-ui/src/sharing/copy.tsweb/packages/agenta-entity-ui/src/sharing/index.tsweb/packages/agenta-entity-ui/src/sharing/useAgentSharingWrites.tsweb/packages/agenta-home-ui/src/useCreateAgent.tsweb/packages/agenta-navigation/src/dynamic/sessionsSource.tsweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesButton.tsxweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesModal.tsxweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/types.tsweb/packages/agenta-sdk/src/resources.tsweb/packages/agenta-sessions-ui/package.jsonweb/packages/agenta-sessions-ui/src/SessionCardList.tsxweb/packages/agenta-sessions-ui/src/SessionRowActions.tsxweb/packages/agenta-sessions-ui/src/SessionTab.tsxweb/packages/agenta-sessions-ui/src/SessionTabRail.tsxweb/packages/agenta-sessions-ui/src/index.tsweb/packages/agenta-sessions-ui/src/sharing/MemberPicker.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionAccessChip.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionGrantRoleMenu.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionPrivacyMarker.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionShareButton.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionShareDialog.tsxweb/packages/agenta-sessions-ui/src/sharing/ShareDisclosureNotice.tsxweb/packages/agenta-sessions-ui/src/sharing/SharingSurface.tsxweb/packages/agenta-sessions-ui/src/sharing/copy.tsweb/packages/agenta-sessions-ui/src/sharing/index.tsweb/packages/agenta-sessions-ui/src/sharing/people.tsxweb/packages/agenta-sessions-ui/src/sharing/result.tsweb/packages/agenta-sessions-ui/src/sharing/useSharingPerson.tsweb/packages/agenta-sessions-ui/src/useSessionActions.tsxweb/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.stories.tsxweb/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.tsxweb/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsxweb/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsxweb/packages/agenta-settings-ui/src/channels/ChannelsHubView.tsxweb/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsxweb/packages/agenta-settings-ui/src/channels/actions.tsweb/packages/agenta-settings-ui/src/channels/helpers.tsweb/packages/agenta-settings-ui/src/channels/index.tsweb/packages/agenta-settings-ui/src/channels/sharingCopy.tsweb/packages/agenta-settings-ui/src/channels/storyFixtures.tsxweb/packages/agenta-settings-ui/src/channels/types.tsweb/packages/agenta-settings-ui/src/channels/useChannelPanel.tsxweb/packages/agenta-settings-ui/src/index.tsweb/packages/agenta-ui/src/utils/copyToClipboard.tsweb/storybook/package.jsonweb/storybook/stories/entity-ui/SharingAgentPrivacy.stories.tsxweb/storybook/stories/entity-ui/SharingMemberPicker.stories.tsxweb/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.
-
| 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, | ||
| ) |
There was a problem hiding this comment.
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:
- A session is deleted. Kill and delete tombstone its turns and remove the row.
- The still-running runner sends one more
is_running=truebeat with its run credential. prior_streamisNone, so admission passes and_create_rowinserts a row withis_alive=True,is_running=Trueand the deadturn_id.- Only then does
bind_turn_for_beatreturnNone, and the beat is answeredis_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(
There was a problem hiding this comment.
🤖 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.
There was a problem hiding this comment.
🧩 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.
🧩 Analysis chain
✅ Action performed
|
There was a problem hiding this comment.
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_heartbeatcan 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-
- Source mode: Auto
- Repository: Agenta-AI/agenta
- Branch: feat/m3-agent-session-sharing
- File: .coderabbit.yaml
- Commit: 02194da
- Layers: Repository YAML (base), Organization UI (inherited)
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9cd982bc-36cf-4840-af33-8d6eea8d2623
Files ignored due to path filters: 264-
api/oss/tests/pytest/acceptance/channels/bridge_process/test_bridge_two_bridges.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/differential/test_slack_in_process_vs_bridged.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/support.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/test_channel_tools.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/channels/test_channels_permissions.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/__init__.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/support.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_agent_owner_by_commit.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_channel_sessions.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_default_visibility.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_heartbeat_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_hidden_references.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_list_parity.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_owner_leaves.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_ownerless_creation.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_queued_and_resume_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_session_files_follow_session.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_shared_turns_authority.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_sharing_audit.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_shortcuts_closed.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_stream_sharing_state.pyis excluded by!**/tests/**api/oss/tests/pytest/acceptance/sharing/test_trigger_claim_owner.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/access/test_run_principal_query_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/channels/test_channels_composition_seam.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/channels/test_channels_connection_write_path_integration.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/channels/test_channels_service_routing_dao.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/memberships/test_admin_membership_invalidation_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/memberships/test_hot_path_query_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/memberships/test_membership_parity_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_sessions_query_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_trigger_session_claim_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_turns_dao.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sessions/test_wp5_dao_fanout.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/__init__.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_admission_settlement.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_list_scope_sql.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_project_members_query.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_resolve_agent_environment.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_runner_write_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_session_claim_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_backfill.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_dao_locks.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_query_counts_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_redis_round_trips.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_sharing_schema.pyis excluded by!**/tests/**api/oss/tests/pytest/integration/sharing/test_workflows_dao_atomic.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_access_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_check_action_access_wrapper.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_decide.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_grant_exchange.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_organization_write.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_principal_invalidation.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_role_allows.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/access/test_run_principal_dtos.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/agent_templates/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/agent_templates/test_loader.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/agent_templates/test_router.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/applications/test_simple_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/apps/test_create_app.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_agent_tool_settings.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_edit_semantics.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_inbox_busy_thread.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_inbox_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_inbox_principal.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_live_qa_regressions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_rechecks.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_request_reactions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/test_channels_turn_context.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/channels/whatsapp/test_whatsapp_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/embeds/test_embedded_agent_visibility.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/evaluators/test_simple_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/git/test_commit_revision_slug_conflict.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/memberships/test_query_project_members.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/migrations/test_sharing_backfill_plan.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/migrations/test_sharing_migration_gate.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/models/test_lifecycle_conventions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_cancel_cancels_pending_interactions.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_cancel_stop_guard.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_command_matrix_inputs_data.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_current_session_tool.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_events_recheck_fresh_access.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_first_touch_race.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_is_current_turn.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_lock_races.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_mirrors_existing_row.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_parked_zombie.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_refused_turn_final_beat.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_replica_id_control_chars.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_run_credential.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_runner_token.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_stale_turn_end.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_binding.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_heartbeat_turn_handover.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_inputs_run_envelope.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_insert_paths_require_access.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_interactions_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_live_relay.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_project_scoped_locks.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_filters.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_references.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_search.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_query_sessions_windowing.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_respond_interaction_durable.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_resume_after_kill_revives_tombstone.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_runner_write_capability.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_cancel_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_last_message.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_response_sanitization.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_start_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_trigger_expansion.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_session_trigger_stamp.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_sessions_query_contract.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_sessions_root_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_fill_missing_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_fill_once.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_header_merge.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_references_storage.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_rename_guard.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_stream_rename_guard_integration.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_streams_dao_conflict.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_streams_read_runner_address.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_turns_dao_conflict.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_unchecked_row_recheck.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_endpoint.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_lifecycle_publish.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_publish.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_watch_session_list_publish.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_worker_session_context_wiring.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sessions/test_wp5_root_router.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/__init__.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_admission.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_agent_create_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_commit_paths_owner.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_composition_roots.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_disclosure.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_initial_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_missing_session_cache.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_read_scope.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_resolve_agent_artifact_id.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_resource_policy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_route_checks.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_send_path_reads.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_caches.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_fix_review.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_import_boundary.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_router_errors.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_sharing_writes.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_stream_agent_hidden.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/sharing/test_workflow_routes_scope.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/skills/test_import_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/skills/test_lifecycle_service.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/test_channel_adapters_entrypoint.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/test_simple_service_flag_normalization.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_catalog_action_identity.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_config_handlers.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_create_connection_errors.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_discovery.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_gateway_run_error_privacy.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_gateway_run_route.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_gateway_search_route.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_oauth_callback_integration_cache.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_platform_handlers.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_resolve_gateway_connection.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/tools/test_workflow_tool_call.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/conftest.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/test_triggers_dispatcher.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/test_triggers_principal.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/triggers/test_triggers_soft_delete_postgres.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_idempotent_create.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_invoke_detached.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_revision_read_workflow_fetch_dedup.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_static_catalog.pyis excluded by!**/tests/**api/oss/tests/pytest/unit/workflows/test_workflow_access_not_cached.pyis excluded by!**/tests/**api/oss/tests/pytest/utils/cache.pyis excluded by!**/tests/**api/oss/tests/pytest/utils/memberships.pyis excluded by!**/tests/**api/oss/tests/pytest/utils/sharing.pyis excluded by!**/tests/**web/mobile/tests/unit/agentChannelSharing.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentListView.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/mobile/tests/unit/agentOverviewAccess.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentOwnerLabel.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/mobile/tests/unit/agentOwnerRoster.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentScreenRequests.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/agentVisibilityRecheck.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/chatAccess.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/chatOpenRoundTrips.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/disclosureProviderLabel.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/liveConversationReadOnly.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/newChatFromAgent.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/newChatShareButton.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sessionReadOnly.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sessionSharingControl.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sessionWorkspaceHiddenAgent.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/shareMenu.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/mobile/tests/unit/sharingHostsRoster.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.test.tsis excluded by!**/*.test.tsweb/oss/src/components/AgentChatSlice/state/sessions.visibility.test.tsis excluded by!**/*.test.tsweb/oss/src/components/pages/agents/createAgentVisibility.test.tsxis excluded by!**/*.test.tsxweb/packages/agenta-api-client/src/generated/Client.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sessions/client/Client.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sessions/client/requests/SetSessionStreamHeaderRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/Client.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentTransferRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentVisibilityRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchAgentSharingRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchSessionSharingRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/QuerySharingMembersRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RestrictSessionToOwnerRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RevokeSessionGrantRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionGrantRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionVisibilityRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/TakeAgentOwnershipRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/exports.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/sharing/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/resources/workflows/client/requests/TemplateLoadRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/AccessPolicy.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/AgentSharingResponse.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/AgentSharingState.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Application.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/ApplicationCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/DisclosedConnection.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/EffectiveRole.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Evaluator.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/EvaluatorCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/EventType.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/NotShareableReason.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Permission.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/ProjectMemberProfile.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionGrant.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionListItem.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionRole.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionSharingResponse.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionSharingState.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SessionStream.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/ShareDisclosure.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SharingMembersQueryRequest.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SharingMembersResponse.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflow.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/SimpleWorkflowCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Visibility.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/Workflow.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/WorkflowCreate.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-api-client/src/generated/api/types/index.tsis excluded by!**/generated/**,!web/packages/agenta-api-client/src/generated/**web/packages/agenta-chat/tests/unit/ApprovalCard.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-chat/tests/unit/model/sendRefusalAccess.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entities/tests/unit/sharing-api.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entities/tests/unit/sharing-recheck-budget.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entities/tests/unit/workflow-list-access.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-entity-ui/tests/unit/AgentPrivacyControl.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-entity-ui/tests/unit/agentSharingCopy.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-sessions-ui/tests/unit/SessionRowActionsOpen.render.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-sessions-ui/tests/unit/SessionShareDialog.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-sessions-ui/tests/unit/disclosureAccountNames.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-sessions-ui/tests/unit/sharingCopy.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-sessions-ui/tests/unit/useSessionActions.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/packages/agenta-settings-ui/tests/unit/channelSharing.test.tsxis excluded by!**/tests/**,!**/*.test.tsxweb/packages/agenta-ui/tests/unit/copyToClipboard.test.tsis excluded by!**/tests/**,!**/*.test.tsweb/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/pnpm-lock.yaml
Files selected for processing: 220-
.coderabbit.yamlapi/AGENTS.mdapi/entrypoints/access.pyapi/entrypoints/routers.pyapi/entrypoints/worker_queues.pyapi/oss/databases/postgres/migrations/core_oss/versions/oss000000048_add_agent_session_sharing.pyapi/oss/databases/postgres/migrations/core_oss/versions/oss000000049_backfill_agent_session_sharing.pyapi/oss/src/apis/fastapi/agent_templates/models.pyapi/oss/src/apis/fastapi/agent_templates/router.pyapi/oss/src/apis/fastapi/applications/router.pyapi/oss/src/apis/fastapi/channels/router.pyapi/oss/src/apis/fastapi/evaluators/router.pyapi/oss/src/apis/fastapi/legacy_variants/router.pyapi/oss/src/apis/fastapi/mounts/router.pyapi/oss/src/apis/fastapi/sessions/router.pyapi/oss/src/apis/fastapi/sessions/watch.pyapi/oss/src/apis/fastapi/sharing/__init__.pyapi/oss/src/apis/fastapi/sharing/models.pyapi/oss/src/apis/fastapi/sharing/router.pyapi/oss/src/apis/fastapi/sharing/utils.pyapi/oss/src/apis/fastapi/tools/router.pyapi/oss/src/apis/fastapi/workflows/exceptions.pyapi/oss/src/apis/fastapi/workflows/router.pyapi/oss/src/core/access/dtos.pyapi/oss/src/core/access/interfaces.pyapi/oss/src/core/access/permissions/types.pyapi/oss/src/core/access/prefetch.pyapi/oss/src/core/access/service.pyapi/oss/src/core/agent_templates/loader.pyapi/oss/src/core/applications/service.pyapi/oss/src/core/channels/commands.pyapi/oss/src/core/channels/dtos.pyapi/oss/src/core/channels/interfaces.pyapi/oss/src/core/channels/service.pyapi/oss/src/core/embeds/service.pyapi/oss/src/core/embeds/utils.pyapi/oss/src/core/evaluators/defaults.pyapi/oss/src/core/evaluators/service.pyapi/oss/src/core/events/types.pyapi/oss/src/core/memberships/dtos.pyapi/oss/src/core/memberships/interfaces.pyapi/oss/src/core/memberships/service.pyapi/oss/src/core/mounts/dtos.pyapi/oss/src/core/mounts/service.pyapi/oss/src/core/sessions/commands/delivery.pyapi/oss/src/core/sessions/commands/service.pyapi/oss/src/core/sessions/service.pyapi/oss/src/core/sessions/starts/service.pyapi/oss/src/core/sessions/streams/dtos.pyapi/oss/src/core/sessions/streams/interfaces.pyapi/oss/src/core/sessions/streams/service.pyapi/oss/src/core/sessions/turns/types.pyapi/oss/src/core/sharing/__init__.pyapi/oss/src/core/sharing/admission.pyapi/oss/src/core/sharing/audit.pyapi/oss/src/core/sharing/disclosure.pyapi/oss/src/core/sharing/dtos.pyapi/oss/src/core/sharing/interfaces.pyapi/oss/src/core/sharing/service.pyapi/oss/src/core/sharing/types.pyapi/oss/src/core/skills/import_service.pyapi/oss/src/core/skills/service.pyapi/oss/src/core/tools/platform_handlers.pyapi/oss/src/core/workflows/dtos.pyapi/oss/src/core/workflows/interfaces.pyapi/oss/src/core/workflows/service.pyapi/oss/src/core/workflows/types.pyapi/oss/src/dbs/postgres/channels/dao.pyapi/oss/src/dbs/postgres/git/dao.pyapi/oss/src/dbs/postgres/memberships/dao.pyapi/oss/src/dbs/postgres/memberships/mappings.pyapi/oss/src/dbs/postgres/sessions/streams/dao.pyapi/oss/src/dbs/postgres/sessions/streams/dbes.pyapi/oss/src/dbs/postgres/sessions/streams/mappings.pyapi/oss/src/dbs/postgres/sessions/turns/dao.pyapi/oss/src/dbs/postgres/sharing/__init__.pyapi/oss/src/dbs/postgres/sharing/dao.pyapi/oss/src/dbs/postgres/sharing/dbes.pyapi/oss/src/dbs/postgres/sharing/mappings.pyapi/oss/src/dbs/postgres/workflows/dao.pyapi/oss/src/dbs/redis/sessions/contract.pyapi/oss/src/dbs/redis/sessions/locks.pyapi/oss/src/services/db_manager.pyapi/oss/src/tasks/asyncio/channels/inbox.pyapi/oss/src/tasks/asyncio/sessions/interactions_dispatcher.pyapi/oss/src/tasks/asyncio/triggers/dispatcher.pyapi/oss/src/utils/caching.pyapi/pytest.inidocs/design/sharing-program/CONTRACT.mddocs/design/sharing-program/interfaces/m3/entry-points.mddocs/design/sharing-program/interfaces/m3/interfaces.mddocs/design/sharing-program/interfaces/m3/technical-design.mddocs/docs/administration/access-control/03-rbac.mdxdocs/docs/guides/12-connect-slack.mdxdocs/docs/guides/14-share-agents-and-chats.mdxopenspec/changes/agent-session-sharing/design.mdopenspec/changes/agent-session-sharing/proposal.mdopenspec/changes/agent-session-sharing/specs/agent-session-sharing/spec.mdopenspec/changes/agent-session-sharing/specs/sharing-access-boundaries/spec.mdopenspec/changes/agent-session-sharing/tasks.mdweb/AGENTS.mdweb/mobile/src/features/agents/AgentCardBody.tsxweb/mobile/src/features/agents/AgentComposer.tsxweb/mobile/src/features/agents/AgentFilterMenu.tsxweb/mobile/src/features/agents/AgentListScreen.tsxweb/mobile/src/features/agents/AgentListTable.tsxweb/mobile/src/features/agents/AgentOverviewScreen.tsxweb/mobile/src/features/agents/AgentPrivateMarker.tsxweb/mobile/src/features/agents/AgentRowCells.tsxweb/mobile/src/features/agents/agentListView.tsweb/mobile/src/features/agents/myPrivateAgent.tsweb/mobile/src/features/agents/states/AgentNotFound.tsxweb/mobile/src/features/agents/useAgentOverviewAccess.tsweb/mobile/src/features/agents/useAgentOwners.tsweb/mobile/src/features/agents/useAgentPublishPanel.tsxweb/mobile/src/features/app/AppProviders.tsxweb/mobile/src/features/chat/AgentPrivacyHost.tsxweb/mobile/src/features/chat/ApprovalDock.tsxweb/mobile/src/features/chat/ChatScreen.tsxweb/mobile/src/features/chat/Composer.tsxweb/mobile/src/features/chat/LiveConversation.tsxweb/mobile/src/features/chat/ReadOnlyComposerNotice.tsxweb/mobile/src/features/chat/SessionShareHost.tsxweb/mobile/src/features/chat/SessionSharingControl.tsxweb/mobile/src/features/chat/SessionTabs.tsxweb/mobile/src/features/chat/SessionTopBar.tsxweb/mobile/src/features/chat/SessionWorkspace.tsxweb/mobile/src/features/chat/ShareMenu.tsxweb/mobile/src/features/chat/sessionReadOnly.tsweb/mobile/src/features/chat/shareDialogState.tsweb/mobile/src/features/chat/states/ChatNoAccess.tsxweb/mobile/src/features/chat/useAgentEntity.tsweb/mobile/src/features/chat/useAgentVisibilityRecheck.tsweb/mobile/src/features/chat/useChatAccess.tsweb/mobile/src/features/chat/useDisclosureProviderLabel.tsweb/mobile/src/features/chat/useSessionHeader.tsweb/mobile/src/features/chat/useSessionSharing.tsweb/mobile/src/features/chat/useSessionWatch.tsweb/mobile/src/features/home/pendingTask.tsweb/mobile/src/features/nav/useMobileNavItems.tsxweb/mobile/src/features/sessions/SessionRowCells.tsxweb/mobile/src/features/sessions/useSessionRowMenu.tsweb/mobile/src/features/settings/ChannelsTab.tsxweb/mobile/src/features/skills/SkillListScreen.tsxweb/mobile/src/lib/sharingCopy.tsweb/oss/src/components/AgentChatSlice/AgentConversation.tsxweb/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.tsweb/oss/src/components/AgentChatSlice/state/sessions.tsweb/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsxweb/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/useCommitHostAdapter.tsweb/oss/src/components/pages/agent-home/hooks/useCreateAgent.tsweb/packages/agenta-chat/src/components/ApprovalCard.tsxweb/packages/agenta-chat/src/model/error.tsweb/packages/agenta-entities/package.jsonweb/packages/agenta-entities/src/session/api/api.tsweb/packages/agenta-entities/src/session/core/schema.tsweb/packages/agenta-entities/src/session/index.tsweb/packages/agenta-entities/src/session/state/invalidate.tsweb/packages/agenta-entities/src/sharing/api.tsweb/packages/agenta-entities/src/sharing/core/keys.tsweb/packages/agenta-entities/src/sharing/core/schema.tsweb/packages/agenta-entities/src/sharing/index.tsweb/packages/agenta-entities/src/sharing/state/store.tsweb/packages/agenta-entities/src/workflow/api/api.tsweb/packages/agenta-entities/src/workflow/core/schema.tsweb/packages/agenta-entities/src/workflow/state/commit.tsweb/packages/agenta-entities/src/workflow/state/loadTemplate.tsweb/packages/agenta-entities/src/workflow/state/store.tsweb/packages/agenta-entity-ui/package.jsonweb/packages/agenta-entity-ui/src/sharing/AgentPrivacyControl.tsxweb/packages/agenta-entity-ui/src/sharing/AgentPrivacyDialog.tsxweb/packages/agenta-entity-ui/src/sharing/AgentTransferDialog.tsxweb/packages/agenta-entity-ui/src/sharing/copy.tsweb/packages/agenta-entity-ui/src/sharing/index.tsweb/packages/agenta-entity-ui/src/sharing/useAgentSharingWrites.tsweb/packages/agenta-home-ui/src/useCreateAgent.tsweb/packages/agenta-navigation/src/dynamic/sessionsSource.tsweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesButton.tsxweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesModal.tsxweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/types.tsweb/packages/agenta-sdk/src/resources.tsweb/packages/agenta-sessions-ui/package.jsonweb/packages/agenta-sessions-ui/src/SessionCardList.tsxweb/packages/agenta-sessions-ui/src/SessionRowActions.tsxweb/packages/agenta-sessions-ui/src/SessionTab.tsxweb/packages/agenta-sessions-ui/src/SessionTabRail.tsxweb/packages/agenta-sessions-ui/src/index.tsweb/packages/agenta-sessions-ui/src/sharing/MemberPicker.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionAccessChip.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionGrantRoleMenu.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionPrivacyMarker.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionShareButton.tsxweb/packages/agenta-sessions-ui/src/sharing/SessionShareDialog.tsxweb/packages/agenta-sessions-ui/src/sharing/ShareDisclosureNotice.tsxweb/packages/agenta-sessions-ui/src/sharing/SharingSurface.tsxweb/packages/agenta-sessions-ui/src/sharing/copy.tsweb/packages/agenta-sessions-ui/src/sharing/index.tsweb/packages/agenta-sessions-ui/src/sharing/people.tsxweb/packages/agenta-sessions-ui/src/sharing/result.tsweb/packages/agenta-sessions-ui/src/sharing/useSharingPerson.tsweb/packages/agenta-sessions-ui/src/useSessionActions.tsxweb/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.stories.tsxweb/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.tsxweb/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsxweb/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsxweb/packages/agenta-settings-ui/src/channels/ChannelsHubView.tsxweb/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsxweb/packages/agenta-settings-ui/src/channels/actions.tsweb/packages/agenta-settings-ui/src/channels/helpers.tsweb/packages/agenta-settings-ui/src/channels/index.tsweb/packages/agenta-settings-ui/src/channels/sharingCopy.tsweb/packages/agenta-settings-ui/src/channels/storyFixtures.tsxweb/packages/agenta-settings-ui/src/channels/types.tsweb/packages/agenta-settings-ui/src/channels/useChannelPanel.tsxweb/packages/agenta-settings-ui/src/index.tsweb/packages/agenta-ui/src/utils/copyToClipboard.tsweb/storybook/package.jsonweb/storybook/stories/entity-ui/SharingAgentPrivacy.stories.tsxweb/storybook/stories/entity-ui/SharingMemberPicker.stories.tsxweb/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.
-
02194da to
db0f028
Compare
|
🤖 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
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. |
|
🤖 The AI agent says: @coderabbitai full review Pass 2 of 2: the temporary path filter in |
🧩 Analysis chain
Files excluded from either pass are not verified by that pass. Remove the temporary filter commit before merge. ✅ Action performed
|
There was a problem hiding this comment.
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 fromenvelope.authority.principal. Suppose the router admits the child with a wrong or upgraded principal. This test still passes. TheAGENTS.mdinvariant 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-
- Source mode: Auto
- Repository: Agenta-AI/agenta
- Branch: feat/m3-agent-session-sharing
- File: .coderabbit.yaml
- Commit: db0f028
- Layers: Repository YAML (base), Organization UI (inherited)
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9e6bc191-4221-4011-b932-3a5e414879d6
Files ignored due to path filters: 274-
.coderabbit.yamlis excluded by none and included by noneapi/AGENTS.mdis excluded by none and included by noneapi/entrypoints/access.pyis excluded by none and included by noneapi/entrypoints/routers.pyis excluded by none and included by noneapi/entrypoints/worker_queues.pyis excluded by none and included by noneapi/oss/databases/postgres/migrations/core_oss/versions/oss000000048_add_agent_session_sharing.pyis excluded by none and included by noneapi/oss/databases/postgres/migrations/core_oss/versions/oss000000049_backfill_agent_session_sharing.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/agent_templates/models.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/agent_templates/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/applications/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/channels/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/evaluators/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/legacy_variants/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/mounts/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/sessions/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/sessions/watch.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/sharing/__init__.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/sharing/models.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/sharing/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/sharing/utils.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/tools/router.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/workflows/exceptions.pyis excluded by none and included by noneapi/oss/src/apis/fastapi/workflows/router.pyis excluded by none and included by noneapi/oss/src/core/access/dtos.pyis excluded by none and included by noneapi/oss/src/core/access/interfaces.pyis excluded by none and included by noneapi/oss/src/core/access/permissions/types.pyis excluded by none and included by noneapi/oss/src/core/access/prefetch.pyis excluded by none and included by noneapi/oss/src/core/access/service.pyis excluded by none and included by noneapi/oss/src/core/agent_templates/loader.pyis excluded by none and included by noneapi/oss/src/core/applications/service.pyis excluded by none and included by noneapi/oss/src/core/channels/commands.pyis excluded by none and included by noneapi/oss/src/core/channels/dtos.pyis excluded by none and included by noneapi/oss/src/core/channels/interfaces.pyis excluded by none and included by noneapi/oss/src/core/channels/service.pyis excluded by none and included by noneapi/oss/src/core/embeds/service.pyis excluded by none and included by noneapi/oss/src/core/embeds/utils.pyis excluded by none and included by noneapi/oss/src/core/evaluators/defaults.pyis excluded by none and included by noneapi/oss/src/core/evaluators/service.pyis excluded by none and included by noneapi/oss/src/core/events/types.pyis excluded by none and included by noneapi/oss/src/core/memberships/dtos.pyis excluded by none and included by noneapi/oss/src/core/memberships/interfaces.pyis excluded by none and included by noneapi/oss/src/core/memberships/service.pyis excluded by none and included by noneapi/oss/src/core/mounts/dtos.pyis excluded by none and included by noneapi/oss/src/core/mounts/service.pyis excluded by none and included by noneapi/oss/src/core/sessions/commands/delivery.pyis excluded by none and included by noneapi/oss/src/core/sessions/commands/service.pyis excluded by none and included by noneapi/oss/src/core/sessions/service.pyis excluded by none and included by noneapi/oss/src/core/sessions/starts/service.pyis excluded by none and included by noneapi/oss/src/core/sessions/streams/dtos.pyis excluded by none and included by noneapi/oss/src/core/sessions/streams/interfaces.pyis excluded by none and included by noneapi/oss/src/core/sessions/streams/service.pyis excluded by none and included by noneapi/oss/src/core/sessions/streams/types.pyis excluded by none and included by noneapi/oss/src/core/sessions/turns/types.pyis excluded by none and included by noneapi/oss/src/core/sharing/__init__.pyis excluded by none and included by noneapi/oss/src/core/sharing/admission.pyis excluded by none and included by noneapi/oss/src/core/sharing/audit.pyis excluded by none and included by noneapi/oss/src/core/sharing/disclosure.pyis excluded by none and included by noneapi/oss/src/core/sharing/dtos.pyis excluded by none and included by noneapi/oss/src/core/sharing/interfaces.pyis excluded by none and included by noneapi/oss/src/core/sharing/service.pyis excluded by none and included by noneapi/oss/src/core/sharing/types.pyis excluded by none and included by noneapi/oss/src/core/skills/import_service.pyis excluded by none and included by noneapi/oss/src/core/skills/service.pyis excluded by none and included by noneapi/oss/src/core/tools/platform_handlers.pyis excluded by none and included by noneapi/oss/src/core/workflows/dtos.pyis excluded by none and included by noneapi/oss/src/core/workflows/interfaces.pyis excluded by none and included by noneapi/oss/src/core/workflows/service.pyis excluded by none and included by noneapi/oss/src/core/workflows/types.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/channels/dao.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/git/dao.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/memberships/dao.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/memberships/mappings.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sessions/streams/dao.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sessions/streams/dbes.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sessions/streams/mappings.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sessions/turns/dao.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sharing/__init__.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sharing/dao.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sharing/dbes.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/sharing/mappings.pyis excluded by none and included by noneapi/oss/src/dbs/postgres/workflows/dao.pyis excluded by none and included by noneapi/oss/src/dbs/redis/sessions/contract.pyis excluded by none and included by noneapi/oss/src/dbs/redis/sessions/locks.pyis excluded by none and included by noneapi/oss/src/services/db_manager.pyis excluded by none and included by noneapi/oss/src/tasks/asyncio/channels/inbox.pyis excluded by none and included by noneapi/oss/src/tasks/asyncio/sessions/interactions_dispatcher.pyis excluded by none and included by noneapi/oss/src/tasks/asyncio/triggers/dispatcher.pyis excluded by none and included by noneapi/oss/src/utils/caching.pyis excluded by none and included by noneapi/pytest.iniis excluded by none and included by nonedocs/design/sharing-program/CONTRACT.mdis excluded by none and included by nonedocs/design/sharing-program/interfaces/m3/entry-points.mdis excluded by none and included by nonedocs/design/sharing-program/interfaces/m3/interfaces.mdis excluded by none and included by nonedocs/design/sharing-program/interfaces/m3/technical-design.mdis excluded by none and included by nonedocs/docs/administration/access-control/03-rbac.mdxis excluded by none and included by nonedocs/docs/guides/12-connect-slack.mdxis excluded by none and included by nonedocs/docs/guides/14-share-agents-and-chats.mdxis excluded by none and included by noneopenspec/changes/agent-session-sharing/design.mdis excluded by none and included by noneopenspec/changes/agent-session-sharing/proposal.mdis excluded by none and included by noneopenspec/changes/agent-session-sharing/specs/agent-session-sharing/spec.mdis excluded by none and included by noneopenspec/changes/agent-session-sharing/specs/sharing-access-boundaries/spec.mdis excluded by none and included by noneopenspec/changes/agent-session-sharing/tasks.mdis excluded by none and included by noneopenspec/changes/session-trace-privacy/design.mdis excluded by none and included by noneweb/AGENTS.mdis excluded by none and included by noneweb/mobile/src/features/agents/AgentCardBody.tsxis excluded by none and included by noneweb/mobile/src/features/agents/AgentComposer.tsxis excluded by none and included by noneweb/mobile/src/features/agents/AgentFilterMenu.tsxis excluded by none and included by noneweb/mobile/src/features/agents/AgentListScreen.tsxis excluded by none and included by noneweb/mobile/src/features/agents/AgentListTable.tsxis excluded by none and included by noneweb/mobile/src/features/agents/AgentOverviewScreen.tsxis excluded by none and included by noneweb/mobile/src/features/agents/AgentPrivateMarker.tsxis excluded by none and included by noneweb/mobile/src/features/agents/AgentRowCells.tsxis excluded by none and included by noneweb/mobile/src/features/agents/agentListView.tsis excluded by none and included by noneweb/mobile/src/features/agents/myPrivateAgent.tsis excluded by none and included by noneweb/mobile/src/features/agents/states/AgentNotFound.tsxis excluded by none and included by noneweb/mobile/src/features/agents/useAgentOverviewAccess.tsis excluded by none and included by noneweb/mobile/src/features/agents/useAgentOwners.tsis excluded by none and included by noneweb/mobile/src/features/agents/useAgentPublishPanel.tsxis excluded by none and included by noneweb/mobile/src/features/app/AppProviders.tsxis excluded by none and included by noneweb/mobile/src/features/chat/AgentPrivacyDialogHost.tsxis excluded by none and included by noneweb/mobile/src/features/chat/AgentPrivacyHost.tsxis excluded by none and included by noneweb/mobile/src/features/chat/ApprovalDock.tsxis excluded by none and included by noneweb/mobile/src/features/chat/ChatScreen.tsxis excluded by none and included by noneweb/mobile/src/features/chat/Composer.tsxis excluded by none and included by noneweb/mobile/src/features/chat/LiveConversation.tsxis excluded by none and included by noneweb/mobile/src/features/chat/ReadOnlyComposerNotice.tsxis excluded by none and included by noneweb/mobile/src/features/chat/SessionShareDialogBound.tsxis excluded by none and included by noneweb/mobile/src/features/chat/SessionShareHost.tsxis excluded by none and included by noneweb/mobile/src/features/chat/SessionSharingControl.tsxis excluded by none and included by noneweb/mobile/src/features/chat/SessionTabs.tsxis excluded by none and included by noneweb/mobile/src/features/chat/SessionTopBar.tsxis excluded by none and included by noneweb/mobile/src/features/chat/SessionWorkspace.tsxis excluded by none and included by noneweb/mobile/src/features/chat/ShareMenu.tsxis excluded by none and included by noneweb/mobile/src/features/chat/sessionReadOnly.tsis excluded by none and included by noneweb/mobile/src/features/chat/shareDialogState.tsis excluded by none and included by noneweb/mobile/src/features/chat/states/ChatNoAccess.tsxis excluded by none and included by noneweb/mobile/src/features/chat/useAgentEntity.tsis excluded by none and included by noneweb/mobile/src/features/chat/useAgentPrivacyProps.tsis excluded by none and included by noneweb/mobile/src/features/chat/useAgentVisibilityRecheck.tsis excluded by none and included by noneweb/mobile/src/features/chat/useChatAccess.tsis excluded by none and included by noneweb/mobile/src/features/chat/useDisclosureProviderLabel.tsis excluded by none and included by noneweb/mobile/src/features/chat/useSessionHeader.tsis excluded by none and included by noneweb/mobile/src/features/chat/useSessionSharing.tsis excluded by none and included by noneweb/mobile/src/features/chat/useSessionWatch.tsis excluded by none and included by noneweb/mobile/src/features/home/pendingTask.tsis excluded by none and included by noneweb/mobile/src/features/nav/useMobileNavItems.tsxis excluded by none and included by noneweb/mobile/src/features/sessions/SessionRowCells.tsxis excluded by none and included by noneweb/mobile/src/features/sessions/useSessionRowMenu.tsis excluded by none and included by noneweb/mobile/src/features/settings/ChannelsTab.tsxis excluded by none and included by noneweb/mobile/src/features/skills/SkillListScreen.tsxis excluded by none and included by noneweb/mobile/src/lib/sharingCopy.tsis excluded by none and included by noneweb/oss/src/components/AgentChatSlice/AgentConversation.tsxis excluded by none and included by noneweb/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.tsis excluded by none and included by noneweb/oss/src/components/AgentChatSlice/state/sessions.tsis excluded by none and included by noneweb/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/CommitVariantChangesButton/index.tsxis excluded by none and included by noneweb/oss/src/components/Playground/Components/Modals/CommitVariantChangesModal/assets/useCommitHostAdapter.tsis excluded by none and included by noneweb/oss/src/components/pages/agent-home/hooks/useCreateAgent.tsis excluded by none and included by noneweb/packages/agenta-api-client/src/generated/Client.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/index.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sessions/client/Client.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sessions/client/requests/SetSessionStreamHeaderRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/Client.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/index.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentTransferRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/AgentVisibilityRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchAgentSharingRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/FetchSessionSharingRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/QuerySharingMembersRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RestrictSessionToOwnerRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/RevokeSessionGrantRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionGrantRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/SessionVisibilityRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/TakeAgentOwnershipRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/client/requests/index.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/exports.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/sharing/index.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/resources/workflows/client/requests/TemplateLoadRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/AccessPolicy.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/AgentSharingResponse.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/AgentSharingState.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/Application.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/ApplicationCreate.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/DisclosedConnection.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/EffectiveRole.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/Evaluator.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/EvaluatorCreate.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/EventType.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/NotShareableReason.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/Permission.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/ProjectMemberProfile.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SessionGrant.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SessionListItem.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SessionRole.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SessionSharingResponse.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SessionSharingState.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SessionStream.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/ShareDisclosure.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SharingMembersQueryRequest.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SharingMembersResponse.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SimpleWorkflow.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/SimpleWorkflowCreate.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/Visibility.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/Workflow.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/WorkflowCreate.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-api-client/src/generated/api/types/index.tsis excluded by!**/generated/**and included by noneweb/packages/agenta-chat/src/components/ApprovalCard.tsxis excluded by none and included by noneweb/packages/agenta-chat/src/model/error.tsis excluded by none and included by noneweb/packages/agenta-entities/package.jsonis excluded by none and included by noneweb/packages/agenta-entities/src/session/api/api.tsis excluded by none and included by noneweb/packages/agenta-entities/src/session/core/schema.tsis excluded by none and included by noneweb/packages/agenta-entities/src/session/index.tsis excluded by none and included by noneweb/packages/agenta-entities/src/session/state/invalidate.tsis excluded by none and included by noneweb/packages/agenta-entities/src/sharing/api.tsis excluded by none and included by noneweb/packages/agenta-entities/src/sharing/core/keys.tsis excluded by none and included by noneweb/packages/agenta-entities/src/sharing/core/schema.tsis excluded by none and included by noneweb/packages/agenta-entities/src/sharing/index.tsis excluded by none and included by noneweb/packages/agenta-entities/src/sharing/state/store.tsis excluded by none and included by noneweb/packages/agenta-entities/src/workflow/api/api.tsis excluded by none and included by noneweb/packages/agenta-entities/src/workflow/core/schema.tsis excluded by none and included by noneweb/packages/agenta-entities/src/workflow/state/commit.tsis excluded by none and included by noneweb/packages/agenta-entities/src/workflow/state/loadTemplate.tsis excluded by none and included by noneweb/packages/agenta-entities/src/workflow/state/store.tsis excluded by none and included by noneweb/packages/agenta-entity-ui/package.jsonis excluded by none and included by noneweb/packages/agenta-entity-ui/src/sharing/AgentPrivacyControl.tsxis excluded by none and included by noneweb/packages/agenta-entity-ui/src/sharing/AgentPrivacyDialog.tsxis excluded by none and included by noneweb/packages/agenta-entity-ui/src/sharing/AgentTransferDialog.tsxis excluded by none and included by noneweb/packages/agenta-entity-ui/src/sharing/copy.tsis excluded by none and included by noneweb/packages/agenta-entity-ui/src/sharing/index.tsis excluded by none and included by noneweb/packages/agenta-entity-ui/src/sharing/useAgentSharingWrites.tsis excluded by none and included by noneweb/packages/agenta-home-ui/src/useCreateAgent.tsis excluded by none and included by noneweb/packages/agenta-navigation/src/dynamic/sessionsSource.tsis excluded by none and included by noneweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesButton.tsxis excluded by none and included by noneweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/CommitVariantChangesModal.tsxis excluded by none and included by noneweb/packages/agenta-playground-ui/src/components/CommitVariantChanges/types.tsis excluded by none and included by noneweb/packages/agenta-sdk/src/resources.tsis excluded by none and included by noneweb/packages/agenta-sessions-ui/package.jsonis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/SessionCardList.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/SessionRowActions.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/SessionTab.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/SessionTabRail.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/index.tsis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/MemberPicker.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/SessionAccessChip.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/SessionGrantRoleMenu.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/SessionPrivacyMarker.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/SessionShareButton.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/SessionShareDialog.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/ShareDisclosureNotice.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/SharingSurface.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/copy.tsis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/index.tsis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/people.tsxis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/result.tsis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/sharing/useSharingPerson.tsis excluded by none and included by noneweb/packages/agenta-sessions-ui/src/useSessionActions.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.stories.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/ChannelAgentPicker.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/ChannelsHubView.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/actions.tsis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/helpers.tsis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/index.tsis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/sharingCopy.tsis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/storyFixtures.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/types.tsis excluded by none and included by noneweb/packages/agenta-settings-ui/src/channels/useChannelPanel.tsxis excluded by none and included by noneweb/packages/agenta-settings-ui/src/index.tsis excluded by none and included by noneweb/packages/agenta-ui/src/utils/copyToClipboard.tsis excluded by none and included by noneweb/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/pnpm-lock.yamland included by noneweb/storybook/package.jsonis excluded by none and included by noneweb/storybook/stories/entity-ui/SharingAgentPrivacy.stories.tsxis excluded by none and included by noneweb/storybook/stories/entity-ui/SharingMemberPicker.stories.tsxis excluded by none and included by noneweb/storybook/stories/entity-ui/SharingSessionDialog.stories.tsxis excluded by none and included by none
Files selected for processing: 216-
api/oss/tests/pytest/acceptance/channels/bridge_process/test_bridge_two_bridges.pyapi/oss/tests/pytest/acceptance/channels/differential/test_slack_in_process_vs_bridged.pyapi/oss/tests/pytest/acceptance/channels/support.pyapi/oss/tests/pytest/acceptance/channels/test_channel_tools.pyapi/oss/tests/pytest/acceptance/channels/test_channels_permissions.pyapi/oss/tests/pytest/acceptance/sharing/__init__.pyapi/oss/tests/pytest/acceptance/sharing/conftest.pyapi/oss/tests/pytest/acceptance/sharing/support.pyapi/oss/tests/pytest/acceptance/sharing/test_agent_owner_by_commit.pyapi/oss/tests/pytest/acceptance/sharing/test_channel_sessions.pyapi/oss/tests/pytest/acceptance/sharing/test_default_visibility.pyapi/oss/tests/pytest/acceptance/sharing/test_heartbeat_admission.pyapi/oss/tests/pytest/acceptance/sharing/test_hidden_references.pyapi/oss/tests/pytest/acceptance/sharing/test_list_parity.pyapi/oss/tests/pytest/acceptance/sharing/test_owner_leaves.pyapi/oss/tests/pytest/acceptance/sharing/test_ownerless_creation.pyapi/oss/tests/pytest/acceptance/sharing/test_queued_and_resume_admission.pyapi/oss/tests/pytest/acceptance/sharing/test_session_files_follow_session.pyapi/oss/tests/pytest/acceptance/sharing/test_shared_turns_authority.pyapi/oss/tests/pytest/acceptance/sharing/test_sharing_audit.pyapi/oss/tests/pytest/acceptance/sharing/test_shortcuts_closed.pyapi/oss/tests/pytest/acceptance/sharing/test_stream_sharing_state.pyapi/oss/tests/pytest/acceptance/sharing/test_trigger_claim_owner.pyapi/oss/tests/pytest/integration/access/test_run_principal_query_counts_postgres.pyapi/oss/tests/pytest/integration/channels/test_channels_composition_seam.pyapi/oss/tests/pytest/integration/channels/test_channels_connection_write_path_integration.pyapi/oss/tests/pytest/integration/channels/test_channels_service_routing_dao.pyapi/oss/tests/pytest/integration/memberships/test_admin_membership_invalidation_postgres.pyapi/oss/tests/pytest/integration/memberships/test_hot_path_query_counts_postgres.pyapi/oss/tests/pytest/integration/memberships/test_membership_parity_postgres.pyapi/oss/tests/pytest/integration/sessions/test_sessions_query_postgres.pyapi/oss/tests/pytest/integration/sessions/test_trigger_session_claim_postgres.pyapi/oss/tests/pytest/integration/sessions/test_turns_dao.pyapi/oss/tests/pytest/integration/sessions/test_wp5_dao_fanout.pyapi/oss/tests/pytest/integration/sharing/__init__.pyapi/oss/tests/pytest/integration/sharing/conftest.pyapi/oss/tests/pytest/integration/sharing/test_admission_settlement.pyapi/oss/tests/pytest/integration/sharing/test_list_scope_sql.pyapi/oss/tests/pytest/integration/sharing/test_project_members_query.pyapi/oss/tests/pytest/integration/sharing/test_resolve_agent_environment.pyapi/oss/tests/pytest/integration/sharing/test_runner_write_counts_postgres.pyapi/oss/tests/pytest/integration/sharing/test_session_claim_policy.pyapi/oss/tests/pytest/integration/sharing/test_session_tombstones.pyapi/oss/tests/pytest/integration/sharing/test_sharing_backfill.pyapi/oss/tests/pytest/integration/sharing/test_sharing_dao_locks.pyapi/oss/tests/pytest/integration/sharing/test_sharing_query_counts_postgres.pyapi/oss/tests/pytest/integration/sharing/test_sharing_redis_round_trips.pyapi/oss/tests/pytest/integration/sharing/test_sharing_schema.pyapi/oss/tests/pytest/integration/sharing/test_workflows_dao_atomic.pyapi/oss/tests/pytest/unit/access/test_access_service.pyapi/oss/tests/pytest/unit/access/test_check_action_access_wrapper.pyapi/oss/tests/pytest/unit/access/test_decide.pyapi/oss/tests/pytest/unit/access/test_grant_exchange.pyapi/oss/tests/pytest/unit/access/test_organization_write.pyapi/oss/tests/pytest/unit/access/test_principal_invalidation.pyapi/oss/tests/pytest/unit/access/test_role_allows.pyapi/oss/tests/pytest/unit/access/test_run_principal_dtos.pyapi/oss/tests/pytest/unit/agent_templates/conftest.pyapi/oss/tests/pytest/unit/agent_templates/test_loader.pyapi/oss/tests/pytest/unit/agent_templates/test_router.pyapi/oss/tests/pytest/unit/applications/test_simple_service.pyapi/oss/tests/pytest/unit/apps/test_create_app.pyapi/oss/tests/pytest/unit/channels/test_channels_agent_tool_settings.pyapi/oss/tests/pytest/unit/channels/test_channels_edit_semantics.pyapi/oss/tests/pytest/unit/channels/test_channels_inbox_busy_thread.pyapi/oss/tests/pytest/unit/channels/test_channels_inbox_dispatcher.pyapi/oss/tests/pytest/unit/channels/test_channels_inbox_principal.pyapi/oss/tests/pytest/unit/channels/test_channels_live_qa_regressions.pyapi/oss/tests/pytest/unit/channels/test_channels_rechecks.pyapi/oss/tests/pytest/unit/channels/test_channels_request_reactions.pyapi/oss/tests/pytest/unit/channels/test_channels_turn_context.pyapi/oss/tests/pytest/unit/channels/whatsapp/test_whatsapp_dispatcher.pyapi/oss/tests/pytest/unit/conftest.pyapi/oss/tests/pytest/unit/embeds/test_embedded_agent_visibility.pyapi/oss/tests/pytest/unit/evaluators/test_simple_service.pyapi/oss/tests/pytest/unit/git/test_commit_revision_slug_conflict.pyapi/oss/tests/pytest/unit/memberships/test_query_project_members.pyapi/oss/tests/pytest/unit/migrations/test_sharing_backfill_plan.pyapi/oss/tests/pytest/unit/migrations/test_sharing_migration_gate.pyapi/oss/tests/pytest/unit/models/test_lifecycle_conventions.pyapi/oss/tests/pytest/unit/sessions/test_cancel_cancels_pending_interactions.pyapi/oss/tests/pytest/unit/sessions/test_cancel_stop_guard.pyapi/oss/tests/pytest/unit/sessions/test_command_matrix_inputs_data.pyapi/oss/tests/pytest/unit/sessions/test_current_session_tool.pyapi/oss/tests/pytest/unit/sessions/test_events_recheck_fresh_access.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_admission.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_first_touch_race.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_is_current_turn.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_lock_races.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_mirrors_existing_row.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_parked_zombie.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_refused_turn_final_beat.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_replica_id_control_chars.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_run_credential.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_runner_token.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_stale_turn_end.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_turn_binding.pyapi/oss/tests/pytest/unit/sessions/test_heartbeat_turn_handover.pyapi/oss/tests/pytest/unit/sessions/test_inputs_run_envelope.pyapi/oss/tests/pytest/unit/sessions/test_insert_paths_require_access.pyapi/oss/tests/pytest/unit/sessions/test_interactions_dispatcher.pyapi/oss/tests/pytest/unit/sessions/test_live_relay.pyapi/oss/tests/pytest/unit/sessions/test_project_scoped_locks.pyapi/oss/tests/pytest/unit/sessions/test_query_sessions_filters.pyapi/oss/tests/pytest/unit/sessions/test_query_sessions_references.pyapi/oss/tests/pytest/unit/sessions/test_query_sessions_search.pyapi/oss/tests/pytest/unit/sessions/test_query_sessions_windowing.pyapi/oss/tests/pytest/unit/sessions/test_respond_interaction_durable.pyapi/oss/tests/pytest/unit/sessions/test_resume_after_kill_revives_tombstone.pyapi/oss/tests/pytest/unit/sessions/test_runner_write_capability.pyapi/oss/tests/pytest/unit/sessions/test_session_cancel_admission.pyapi/oss/tests/pytest/unit/sessions/test_session_last_message.pyapi/oss/tests/pytest/unit/sessions/test_session_response_sanitization.pyapi/oss/tests/pytest/unit/sessions/test_session_start_service.pyapi/oss/tests/pytest/unit/sessions/test_session_trigger_expansion.pyapi/oss/tests/pytest/unit/sessions/test_session_trigger_stamp.pyapi/oss/tests/pytest/unit/sessions/test_sessions_query_contract.pyapi/oss/tests/pytest/unit/sessions/test_sessions_root_service.pyapi/oss/tests/pytest/unit/sessions/test_stream_fill_missing_postgres.pyapi/oss/tests/pytest/unit/sessions/test_stream_fill_once.pyapi/oss/tests/pytest/unit/sessions/test_stream_header_merge.pyapi/oss/tests/pytest/unit/sessions/test_stream_references_storage.pyapi/oss/tests/pytest/unit/sessions/test_stream_rename_guard.pyapi/oss/tests/pytest/unit/sessions/test_stream_rename_guard_integration.pyapi/oss/tests/pytest/unit/sessions/test_streams_dao_conflict.pyapi/oss/tests/pytest/unit/sessions/test_streams_read_runner_address.pyapi/oss/tests/pytest/unit/sessions/test_turns_dao_conflict.pyapi/oss/tests/pytest/unit/sessions/test_unchecked_row_recheck.pyapi/oss/tests/pytest/unit/sessions/test_watch_endpoint.pyapi/oss/tests/pytest/unit/sessions/test_watch_lifecycle_publish.pyapi/oss/tests/pytest/unit/sessions/test_watch_publish.pyapi/oss/tests/pytest/unit/sessions/test_watch_session_list_publish.pyapi/oss/tests/pytest/unit/sessions/test_worker_session_context_wiring.pyapi/oss/tests/pytest/unit/sessions/test_wp5_root_router.pyapi/oss/tests/pytest/unit/sharing/__init__.pyapi/oss/tests/pytest/unit/sharing/test_admission.pyapi/oss/tests/pytest/unit/sharing/test_agent_create_policy.pyapi/oss/tests/pytest/unit/sharing/test_commit_paths_owner.pyapi/oss/tests/pytest/unit/sharing/test_composition_roots.pyapi/oss/tests/pytest/unit/sharing/test_disclosure.pyapi/oss/tests/pytest/unit/sharing/test_initial_policy.pyapi/oss/tests/pytest/unit/sharing/test_missing_session_cache.pyapi/oss/tests/pytest/unit/sharing/test_read_scope.pyapi/oss/tests/pytest/unit/sharing/test_resolve_agent_artifact_id.pyapi/oss/tests/pytest/unit/sharing/test_resource_policy.pyapi/oss/tests/pytest/unit/sharing/test_route_checks.pyapi/oss/tests/pytest/unit/sharing/test_send_path_reads.pyapi/oss/tests/pytest/unit/sharing/test_sharing_caches.pyapi/oss/tests/pytest/unit/sharing/test_sharing_fix_review.pyapi/oss/tests/pytest/unit/sharing/test_sharing_import_boundary.pyapi/oss/tests/pytest/unit/sharing/test_sharing_router_errors.pyapi/oss/tests/pytest/unit/sharing/test_sharing_writes.pyapi/oss/tests/pytest/unit/sharing/test_stream_agent_hidden.pyapi/oss/tests/pytest/unit/sharing/test_workflow_routes_scope.pyapi/oss/tests/pytest/unit/skills/test_import_service.pyapi/oss/tests/pytest/unit/skills/test_lifecycle_service.pyapi/oss/tests/pytest/unit/test_channel_adapters_entrypoint.pyapi/oss/tests/pytest/unit/test_simple_service_flag_normalization.pyapi/oss/tests/pytest/unit/tools/test_catalog_action_identity.pyapi/oss/tests/pytest/unit/tools/test_config_handlers.pyapi/oss/tests/pytest/unit/tools/test_create_connection_errors.pyapi/oss/tests/pytest/unit/tools/test_discovery.pyapi/oss/tests/pytest/unit/tools/test_gateway_run_error_privacy.pyapi/oss/tests/pytest/unit/tools/test_gateway_run_route.pyapi/oss/tests/pytest/unit/tools/test_gateway_search_route.pyapi/oss/tests/pytest/unit/tools/test_oauth_callback_integration_cache.pyapi/oss/tests/pytest/unit/tools/test_platform_handlers.pyapi/oss/tests/pytest/unit/tools/test_resolve_gateway_connection.pyapi/oss/tests/pytest/unit/tools/test_workflow_tool_call.pyapi/oss/tests/pytest/unit/triggers/conftest.pyapi/oss/tests/pytest/unit/triggers/test_triggers_dispatcher.pyapi/oss/tests/pytest/unit/triggers/test_triggers_principal.pyapi/oss/tests/pytest/unit/triggers/test_triggers_soft_delete_postgres.pyapi/oss/tests/pytest/unit/workflows/test_idempotent_create.pyapi/oss/tests/pytest/unit/workflows/test_invoke_detached.pyapi/oss/tests/pytest/unit/workflows/test_revision_read_workflow_fetch_dedup.pyapi/oss/tests/pytest/unit/workflows/test_static_catalog.pyapi/oss/tests/pytest/unit/workflows/test_workflow_access_not_cached.pyapi/oss/tests/pytest/utils/cache.pyapi/oss/tests/pytest/utils/memberships.pyapi/oss/tests/pytest/utils/sharing.pyweb/mobile/tests/unit/agentChannelSharing.render.test.tsxweb/mobile/tests/unit/agentListView.test.tsweb/mobile/tests/unit/agentOverviewAccess.render.test.tsxweb/mobile/tests/unit/agentOwnerLabel.test.tsweb/mobile/tests/unit/agentOwnerRoster.render.test.tsxweb/mobile/tests/unit/agentScreenRequests.render.test.tsxweb/mobile/tests/unit/agentVisibilityRecheck.render.test.tsxweb/mobile/tests/unit/chatAccess.render.test.tsxweb/mobile/tests/unit/chatOpenRoundTrips.render.test.tsxweb/mobile/tests/unit/disclosureProviderLabel.render.test.tsxweb/mobile/tests/unit/liveConversationReadOnly.render.test.tsxweb/mobile/tests/unit/newChatFromAgent.render.test.tsxweb/mobile/tests/unit/newChatShareButton.render.test.tsxweb/mobile/tests/unit/sessionReadOnly.render.test.tsxweb/mobile/tests/unit/sessionSharingControl.render.test.tsxweb/mobile/tests/unit/sessionWorkspaceHiddenAgent.render.test.tsxweb/mobile/tests/unit/shareMenu.render.test.tsxweb/mobile/tests/unit/sharingHostsRoster.render.test.tsxweb/oss/src/components/AgentChatSlice/hooks/useAgentChatSession.test.tsweb/oss/src/components/AgentChatSlice/state/sessions.visibility.test.tsweb/oss/src/components/pages/agents/createAgentVisibility.test.tsxweb/packages/agenta-chat/tests/unit/ApprovalCard.test.tsxweb/packages/agenta-chat/tests/unit/model/sendRefusalAccess.test.tsweb/packages/agenta-entities/tests/unit/sharing-api.test.tsweb/packages/agenta-entities/tests/unit/sharing-recheck-budget.test.tsweb/packages/agenta-entities/tests/unit/workflow-list-access.test.tsweb/packages/agenta-entity-ui/tests/unit/AgentPrivacyControl.render.test.tsxweb/packages/agenta-entity-ui/tests/unit/agentSharingCopy.test.tsweb/packages/agenta-sessions-ui/tests/unit/SessionRowActionsOpen.render.test.tsxweb/packages/agenta-sessions-ui/tests/unit/SessionShareDialog.test.tsxweb/packages/agenta-sessions-ui/tests/unit/disclosureAccountNames.test.tsweb/packages/agenta-sessions-ui/tests/unit/sharingCopy.test.tsweb/packages/agenta-sessions-ui/tests/unit/useSessionActions.test.tsweb/packages/agenta-settings-ui/tests/unit/channelSharing.test.tsxweb/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.
-
|
🤖 The AI agent says: @coderabbitai review Pass 2, round 2: the 4 test threads and the nitpick are fixed in c248a87 (replies above). |
There was a problem hiding this comment.
🧹 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
AdmissionDeniedfor every admission call, so the test passes whether or not the admitted request namesworkflow.variant.private-agent. The router resolves the child's target insideadmit_request, which this test never runs. The test therefore checks only that anAdmissionDeniedbecomes anaccess_deniedtool result. It does not exercise the private-agent access decision.Make the refusal apply only when the admitted
request.referencesnames 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_agentis a placeholder. Build its matcher from thereferencesvalue that the router produces for theworkflow.variant.private-agentslug. The decision-level check still needs a test that uses the realRunAdmissionwith a rule-based access service. This comment covers only the stubbed test.

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Agenta-AI/agenta
- Branch: feat/m3-agent-session-sharing
- File: .coderabbit.yaml
- Commit: c248a87
- Layers: Repository YAML (base), Organization UI (inherited)
- Review profile: CHILL
- Plan: Advanced
- Run ID:
827cfb92-dcdf-45c5-8d6e-e19c4fc912d6
Files selected for processing: 4-
api/oss/tests/pytest/acceptance/sharing/test_hidden_references.pyapi/oss/tests/pytest/acceptance/sharing/test_list_parity.pyapi/oss/tests/pytest/unit/tools/test_workflow_tool_call.pyweb/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.
-
|
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit!
|
c248a87 to
7faf496
Compare
|
🤖 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 |
7faf496 to
4ea3726
Compare
|
🤖 The AI agent says: Rebased onto
|
|
🤖 The AI agent says: Release QA fixes R1 and R2 are pushed. Head 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):
Tests.
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 |
…, 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
…ge's other exports in its mock
…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
…tead of assuming one tick
…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
…(spec scenario, rule S3)
… a person's server run never opens its turn to the same person's web or browser requests
…ient starts a new chat (release QA R4)
…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
c51663f to
22b76ac
Compare
|
🤖 The AI agent says: Release QA R3: option 2 is in (head 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:
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:
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.
|
🤖 The AI agent says: Channel first-touch fix is in (head A review of 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.
Other changes:
On 1M sessions and 200k channel threads on a scratch Postgres (box load about 60):
Tests:
Results on stack A:
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). |
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
project(everyone in the project) orprivate(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.privateby default when a person starts it, andprojectwhen 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.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/callchecks the agent or session that a reserved platform tool names before it runs (read_config,commit_revision,list_starters,create_app).Schema and rollout
oss000000048addsagent_access,session_grants,session_trace_tombstones, the policy columns onsession_streamsand the indexix_channel_threads_project_id_session_id(built concurrently, like the session index) (now afteross000000050, one head:oss000000049).oss000000049backfills every existing agent and session asproject, 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.UI (/m)
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)
GET /sessions/{id}Redis, API key / BearerPOST /sessions/query,streams/queryRedis, BearerGET /sessions/{id}/sharingRedis, API key / BearerHow 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:
runningandadmitted) in the request's oneMGET, 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/signandinteractions/queryread the session's sharing entry in that sameMGET.INSERT ... SELECT ... WHERE EXISTSstatement, 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 oneINSERT ... SELECT ... WHERE NOT EXISTS (tombstone)statement (it was an insert plus a refresh).retry=Falseand never waits on the lock.Changelog
Tests / notes
Gate run on stack A after the rebase on
release/v0.124.0(29edb5f95e):newChatShareButtonfailed once under load and passed in the next two runs.oss000000047):047 -> 050 -> 048 -> 049in 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).QA (headless Chromium, both editions, /m and /w):
Recordings are in the first comment.
Follow-ups
What to QA