Files
kandev/docs/plans/dynamic-agent-routing/task-06-logical-session-integration.md
T
2026-08-24 11:09:03 +00:00

2.5 KiB

id, title, status, wave, depends_on, plan, spec
id title status wave depends_on plan spec
06-logical-session-integration Logical session integration in_progress 6
05-acp-conductor
plan.md ../../specs/agents/requirements/dynamic-agent-routing.md

Task 06: Logical session integration

  • Acceptance: Route task/workflow launches through the resolver, keep one logical task session, persist concrete execution and route generation on each turn, emit generation-fenced structured route/capability events, and add the session.route_action request with expected-generation conflict handling.
  • Files likely touched: apps/backend/internal/orchestrator/{session_launch,task_operations,event_handlers_streaming,workflow_session_config}*.go, apps/backend/internal/task/{models,dto,repository/sqlite,service}/**, apps/backend/internal/gateway/websocket/*.
  • Dependencies: Task 05.
  • Parallelism: sequential.
  • Inputs: Spec Transparent profile execution, Route and capability events, API surface, and route-action scenarios, Task 05, existing WebSocket session request and access-control patterns.
  • Output contract: Report the request and event contracts, authorization and conflict behavior, files changed, exact commands and results, blockers, risks, and synchronized task and plan status.
  • Verification: cd apps/backend && go test -tags fts5 ./internal/orchestrator/... ./internal/task/... ./internal/gateway/websocket/...
  • Risks: Existing concrete sessions and session subscriptions must retain their current behavior.

Results

In progress. Added logical and concrete session fields, route generation and turn attribution persistence, generation-fenced session.route_action, stale conflict snapshots, recovery-state handling, and resolver-backed task launch and resume paths. Route actions now also require a settled turn. The retry-same path preserves the failed candidate and stale route claims fail closed after restart. The rollout-blocker repair makes the route action own selection, predecessor shutdown, successor launch, and durable recovery state as one backend operation, and fails closed when continuation evidence is ambiguous.

Verification:

  • go test -tags fts5 ./internal/orchestrator/... ./internal/task/... ./internal/backendapp/... -count=1

The focused backend suite passed, including active-turn rejection and settled-turn route-action coverage. Full structured route/capability event coverage, conductor event subscriptions, and dedicated E2E coverage remain open.