3.7 KiB
3.7 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-propagate-effective-profile | Propagate the effective profile | done | 1 | plan.md | ../../specs/agents/requirements/spawn-session-effective-profile.md |
Task 01: Propagate the effective profile
Intent
Make the synchronous launch result authoritative for the profile that spawn_session_kandev reports.
Inputs
- The spec
What,API surface, andScenariossections. - The confirmed root cause in
plan.md. - The response propagation pattern in
executionToLaunchResponse. - The existing handler test setup in
spawn_session_test.goandmessage_task_test.go.
Acceptance
LaunchSessionResponse.AgentProfileIDequals the effective profile inTaskExecutionfor a successful start.spawn_session_kandevreports that effective profile, including workflow-default and step-pinned overrides.- The tool description states the precedence and includes
agent_profile_idin its response shape. - Existing
create_task_kandevworkflow-default tests remain green.
Files likely touched
apps/backend/internal/orchestrator/session_launch.goapps/backend/internal/orchestrator/session_launch_test.goapps/backend/internal/mcp/handlers/spawn_session.goapps/backend/internal/mcp/handlers/spawn_session_test.goapps/backend/internal/mcp/handlers/message_task_test.goapps/backend/internal/mcp/server/server.goapps/backend/internal/mcp/server/spawn_session_tool_test.go
TDD sequence
- Add the launch-response and MCP-response regressions.
- Run the focused command and make sure that the new regressions fail for the expected missing field or echoed value.
- Add the response field and propagate the effective value.
- Update the tool description and its contract test.
- Run the same focused command and make sure that all selected tests pass.
Verification
cd "$(git rev-parse --show-toplevel)/apps/backend" && go test ./internal/orchestrator ./internal/mcp/handlers ./internal/mcp/server -run 'TestExecutionToLaunchResponseReportsAgentProfile|TestHandleSpawnSessionReports(Effective|StepPinned)AgentProfile|TestSpawnSessionToolDescribesEffectiveAgentProfile|TestResolveMCPAutoStartConfig_WorkflowDefaultOutranksExplicit(OnUnpinnedStep|WhenStepOmitted)' -count=1
Dependencies
None.
Parallelism
sequential. This task changes the shared launch response contract and its MCP consumer.
Output contract
Report the files changed, the red and green test results, blockers, and risks. Update this task and plan.md in the same conversation.
Results
- Red: the launch-response and tool-description regressions failed because the
response omitted
agent_profile_id; the handler regression failed because it returned the requested profile instead of the effective launch result. - Green:
go test ./internal/orchestrator ./internal/mcp/handlers ./internal/mcp/server -run 'TestExecutionToLaunchResponseReportsAgentProfile|TestHandleSpawnSessionReportsEffectiveAgentProfile|TestSpawnSessionToolDescribesEffectiveAgentProfile|TestResolveMCPAutoStartConfig_WorkflowDefaultOutranksExplicit(OnUnpinnedStep|WhenStepOmitted)' -count=1passed 5 tests in 3 packages. - Fixup regression extension: the focused command with
TestHandleSpawnSessionReportsStepPinnedAgentProfilepassed 6 tests in 3 packages. - Full backend gate:
make -C apps/backend testpassedCGO_ENABLED=1 go test -tags fts5 ./.... - Backend lint:
make -C apps/backend lintpassed with no issues. - Affected package suite:
go test ./internal/orchestrator ./internal/mcp/handlers ./internal/mcp/server -count=1passed. - Formatting and whitespace checks passed. No throwaway files or logs remain.
- External side effects: None.