Engineering/AI documentation
Research Deployments
Deployments configure participant-facing research deployments and link them to channels, questions, findings, and timeline views.
Concepts: triangulation
Implementation Summary
Deployments configure participant-facing research deployments and link them to channels, questions, findings, and timeline views.
Frontend Surface
frontend/src/components/integrations/DeploymentsTab.tsxfrontend/src/components/integrations/DeploymentWizard.tsxfrontend/src/components/integrations/DeploymentDashboard.tsxfrontend/src/components/integrations/ConversationTranscript.tsxfrontend/src/lib/api.tsbackend/app/api/routes/deployments.pybackend/app/services/deployment_service.py
State, API, And Backend Contracts
Stores
frontend/src/stores/integrationsStore.tsDeploymentsTabreadsactiveProjectIdfromfrontend/src/stores/projectStore.tsand passes it intofetchDeployments(activeProjectId)before rendering deployment rows or summary counts.- The tab derives a
scopedDeploymentslist from the store by matchingdeployment.project_idto the active project, so stale deployment state from a previous project cannot populate the list, counts, or selected detail view. DeploymentWizardfetches channels with the active project id, filters available channels by the same project id, and refuses deployment creation unless both an active project and deployment type are present.
API And Backend
backend/app/api/routes/deployments.pybackend/app/services/deployment_service.py- Deployment list requests must include
project_id; the route enforces project access before returning deployment records, including for global admins using the project-facing Integrations route. The admin dashboard remains the only intended global aggregation surface. - Deployment detail, analytics, lifecycle, conversation list, conversation detail, and transcript routes also require the active
project_id; an omitted project id returns 400, and a deployment id from another project resolves as 404 instead of silently using the record's owning project. - By-id deployment routes authorize the requested active project before loading the deployment, then fetch by both deployment id and project id so stale cross-project ids cannot drive project-facing actions or existence checks.
deployment_servicehelpers for deployment lookup, lifecycle, response handling, analytics, conversations, and transcripts also requireproject_id, so background jobs or future internal callers cannot accidentally resolve deployment or conversation records by global id alone.- Deployment creation validates the project with the same active-project helper used by dispatch paths before writing a row; global admins cannot create deployments for missing or paused projects through the project-facing Integrations API.
- Deployment creation validates every
channel_instance_idagainst the deploymentproject_idbefore storing the deployment, so a deployment in one project cannot route participant content through another project's messaging channel. - Inbound channel processors attach participant messages only to same-project deployments that explicitly list the receiving channel instance; deployments with no channels are not a global fallback.
- Deployment activation and participant response handling reject paused projects before dispatching participant-facing work, updating adaptive conversation state, or reaching LLM-backed follow-up generation.
- Deployment activation builds a grammatical default intro (for example, “an interview” and “a survey”); a configured
intro_messageremains the explicit override. - Deployment response handling, conversations, transcripts, analytics, and overview counters all require the conversation/deployment/channel records to match the same project boundary before participant content or findings are read, updated, or summarized.
- Deployment websocket progress, response, and finding events resolve project ownership from
deployment_id, deliver only to sockets subscribed to that project, and drop events with conflicting deployment/project claims. - Simulation and real-user benchmark deployment paths must carry active project scope on by-id lifecycle, response, analytics, conversation, delete, and channel cleanup calls, proving the same boundary exercised by the UI.
- Real-user benchmark scoring does not require live Telegram/AURA participant-channel success unless bounded test credentials or a credential-free local participant simulator are present. Missing external tokens are recorded as future improvement, while project-scoped deployment route behavior remains testable.
Architecture Notes
- The feature is mounted through
frontend/src/components/integrations/DeploymentsTab.tsxand the UI navigation path recorded in the inventory. - The frontmatter and manifest entries are the durable contract for agents updating this page after code changes.
- When the referenced component, store, route, agent, skill, or test behavior changes, regenerate and validate the feature documentation.
Agents, Skills, LLM, MCP, And Permissions
- Deployments are project-owned integration records. Any agent, skill, LLM, MCP, channel, or deployment worker that uses deployment data must preserve the same active-project and authorization boundary before routing participant content or generated research artifacts.
- Participant responses enter the Research Spine as raw source evidence units. The
channel-research-deploymentskill may propose candidate nuggets, insights, and recommendations for review, but those model-generated artifacts are provisional and blocked from Reports until governed coding, reliability/reconciliation, and Done-task gates accept them.
Tests And Verification
tests/test_deployments.pyexercises API-level project isolation for active-project creation, deployment channel ownership, deployment overview conversation counts, by-id active-project matching across detail/lifecycle/conversation/transcript routes, direct service-helper project scope enforcement, and cross-project response rejection.tests/test_project_scope_contracts.pyasserts thatDeploymentsTab,DeploymentDashboard,ConversationTranscript, and the deployment API client pass the active project id into list, detail, lifecycle, analytics, conversation, and transcript calls rather than falling back to global deployment ids.tests/test_websocket.pyproves deployment realtime events inherit project scope from the deployment id before fan-out and reject conflicting project claims.tests/test_integration_simulation_scope.pyprevents simulation and real-user benchmark deployment calls from reintroducing unscoped by-id integration paths.tests/real_user_benchmark/run.mjsclassifies credentialed AURA/Telegram live participant flow as optional and records local transcript/interview task evidence separately.
Related Features
Related Concepts
Compass Evidence
- Spec/task: CF-SPEC-60 / CF-767; CF-SPEC-60 / CF-773; CF-SPEC-62 / CF-793; CF-SPEC-75 / CF-964; CF-SPEC-82 / CF-1061; CF-SPEC-93 / CF-1184; CF-SPEC-121
- Inventory source:
docs/features/inventory.json
When To Update
- Update this page whenever the listed UI components, stores, routes, model behavior, permissions, or tests change.
- Regenerate the site and machine manifests with
python scripts/feature_docs.py --seed-missing --generate-site --check.