1.5 KiB
1.5 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | ||
|---|---|---|---|---|---|---|---|---|
| 04-startup-reconciliation | Startup reconciliation | completed | 2 |
|
plan.md | ../../specs/tasks/system-design/runtime-cleanup.md |
Task 04: Startup Reconciliation
Acceptance
- Backend startup scans persisted
executors_runningrows. - Terminal and missing-session rows are stopped by
agent_execution_idbefore runtime tracking is removed. - Stop failures preserve runtime rows.
Verification
cd apps/backend && go test ./internal/task/service ./internal/orchestrator/...
Files likely touched
apps/backend/internal/task/service/service_tasks.goapps/backend/internal/orchestrator/event_handlers.goapps/backend/internal/agent/runtime/lifecycle/manager_lifecycle.goapps/backend/cmd/kandev/*.go
Dependencies
Tasks 01 and 02.
Inputs
- Stale runtime inventory method from Task 01
- Cleanup service behavior from Task 02
- ADR-0009 fail-closed cleanup semantics
Output contract
Report where reconciliation is owned, startup order implications, files changed, tests run, and any rows intentionally left untouched.
Result
- Orchestrator startup reconciliation owns this pass.
- Terminal completed/cancelled sessions and rows with missing sessions now stop
through
StopAgentWithReasonbefore row deletion. - Rows without a stoppable execution handle are intentionally preserved with a warning.
- Verified with
go test -run TestReconcileSessionsOnStartup ./internal/orchestrator.