From b4c129051f1e52a832e953fb51d3686311051904 Mon Sep 17 00:00:00 2001 From: Renn F Date: Sat, 4 Jul 2026 05:38:33 +0200 Subject: [PATCH] chore(comms): retire remaining dead channel residue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Completes the reference cleanup with the genuinely-dead comms bits (the live extraction pipeline + Campaign.channels marketing field are kept): - models/audit.py: remove the dead CHANNEL_ACCESS_DENIED enum member (str-backed column, no migration; its do_server/flow_server map keys were removed in 925e00d4) - panel stream.ts: remove the dead getChannelPermissions method (no matching backend route — routes/stream.py serves only GET /permissions). Kept the ChannelPermissions interface (still used by the live getPermissions) and every other streamApi method (submit/complete/extract/stats/permissions hit live endpoints) - api/schemas/stream.py: reword stale 'channel' field descriptions on live extraction fields (Target stream / Group within stream) - panel knowledge-base.ts: fix a mock-mode example source string No regressions: only provably-dead code retired; extraction pipeline untouched. --- panel/src/lib/api/knowledge-base.ts | 2 +- panel/src/lib/api/stream.ts | 19 ------------------- roboco/api/schemas/stream.py | 6 +++--- roboco/models/audit.py | 1 - 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/panel/src/lib/api/knowledge-base.ts b/panel/src/lib/api/knowledge-base.ts index f0bab314..c1be52b3 100644 --- a/panel/src/lib/api/knowledge-base.ts +++ b/panel/src/lib/api/knowledge-base.ts @@ -64,7 +64,7 @@ const mockSearchResults: KBSearchResult[] = [ { content: "BE-DEV-1: I've completed the task validation logic. The acceptance criteria now require at least one item before a task can be created.", - source: "channel:backend/session:abc123", + source: "journal:be-dev-1", score: 0.75, index_type: KBIndexType.CONVERSATIONS, metadata: { agent: "be-dev-1", timestamp: "2024-01-15T10:30:00Z" }, diff --git a/panel/src/lib/api/stream.ts b/panel/src/lib/api/stream.ts index ef47417c..43aedcee 100644 --- a/panel/src/lib/api/stream.ts +++ b/panel/src/lib/api/stream.ts @@ -164,23 +164,4 @@ export const streamApi = { const { data } = await api.get("/stream/permissions"); return data; }, - - /** - * Get permissions for a specific channel - */ - getChannelPermissions: async ( - channelName: string, - ): Promise => { - if (isMockMode()) { - return { - channel_name: channelName, - can_transcribe: true, - can_extract: true, - }; - } - const { data } = await api.get( - `/stream/permissions/channel/${channelName}`, - ); - return data; - }, }; diff --git a/roboco/api/schemas/stream.py b/roboco/api/schemas/stream.py index 95d865d6..64d43c65 100644 --- a/roboco/api/schemas/stream.py +++ b/roboco/api/schemas/stream.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, Field class StreamChunkRequest(BaseModel): """Request to process a stream chunk.""" - channel_id: UUID = Field(..., description="Target channel") + channel_id: UUID = Field(..., description="Target stream") session_id: UUID = Field(..., description="Current session") chunk: str = Field(..., description="Raw LLM output chunk") @@ -26,9 +26,9 @@ class StreamCompleteRequest(BaseModel): class ExtractRequest(BaseModel): """Request to extract messages from content.""" - channel_id: UUID = Field(..., description="Target channel") + channel_id: UUID = Field(..., description="Target stream") session_id: UUID = Field(..., description="Current session") - group_id: UUID = Field(..., description="Group within channel") + group_id: UUID = Field(..., description="Group within stream") content: str = Field(..., description="Content to extract from") task_id: UUID | None = Field(default=None, description="Related task") diff --git a/roboco/models/audit.py b/roboco/models/audit.py index d3d166b7..232e7706 100644 --- a/roboco/models/audit.py +++ b/roboco/models/audit.py @@ -15,7 +15,6 @@ class AuditEventType(StrEnum): # Permission denials PERMISSION_DENIED = "permission_denied" - CHANNEL_ACCESS_DENIED = "channel_access_denied" TASK_ACTION_DENIED = "task_action_denied" NOTIFICATION_DENIED = "notification_denied" STATE_TRANSITION_DENIED = "state_transition_denied"