1.9 KiB
1.9 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-backend-enabled-column | Backend enabled column for agent profiles | done | 1 | plan.md | ../../specs/agents/requirements/profile-disable.md |
Task 01: Backend enabled column
- Acceptance:
agent_profilesgains anenabled INTEGER NOT NULL DEFAULT 1column via idempotent migration; existing rows backfill to enabled; the model/DTO/controller/handler persist and expose it;PATCH /api/v1/agent-profiles/:idwith{"enabled": false}round-trips. - Acceptance: A profile created through
CreateProfileis enabled by default (explicitEnabled: true, not the Go zero value). - Acceptance: Focused Go tests cover store create/update/scan round-trip, migration backfill, and the PATCH path.
- Verification:
cd apps/backend && go test ./internal/agent/settings/store/... ./internal/agent/settings/controller/... ./internal/agent/settings/handlers/...cd apps/backend && go build ./...
- Files likely touched:
apps/backend/internal/agent/settings/models/models.goapps/backend/internal/agent/settings/dto/dto.goapps/backend/internal/agent/settings/store/sqlite.goapps/backend/internal/agent/settings/controller/profile_crud.goapps/backend/internal/agent/settings/handlers/handlers.go- new tests:
apps/backend/internal/agent/settings/store/sqlite_profile_enabled_test.go, additions tocontroller/profile_crud_test.goandhandlers/agent_update_handlers_test.goas appropriate.
- Dependencies: None.
- Parallelism: sequential.
- Inputs: spec sections "Data model", "API surface", "Scenarios"; plan "Backend" section. The store file already centralizes the read projection in
agentProfileSelectColumnsand documents the column-add rule — follow it. - Output contract: Report red/green test evidence, migration name, exact SQL diff, changed files, targeted test results, risks, and task/plan status update.