2.9 KiB
2.9 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-backend-title-lifecycle | Backend preference and provisional-title lifecycle | done | 1 | plan.md | ../../specs/tasks/agent-generated-titles.md |
Task 01: Backend preference and provisional-title lifecycle
Acceptance
- The backend-owned
agent_generated_task_titlespreference defaults to false, round-trips through GET/PATCH, boot state, anduser.settings.updated, and preserves omitted PATCH fields. POST /api/v1/taskswithauto_title:truederives the provisional title from the first six whitespace-normalized prompt words, uses every word for shorter prompts, rejects an empty prompt, and persistsagent_title_pending; ordinary creation stays unchanged.- Ordinary title updates clear pending state, and the task service exposes a validated one-time pending
title mutation that publishes
task.updatedwithout overwriting a prior human rename.
Verification
cd apps/backend && go test ./internal/user/... ./internal/backendapp ./internal/task/service ./internal/task/handlers -run 'Test.*(AgentGeneratedTaskTitles|AutoTitle|AgentTitlePending)'
Files likely touched
apps/backend/internal/user/models/models.goapps/backend/internal/user/dto/dto.goapps/backend/internal/user/dto/dto_test.goapps/backend/internal/user/service/service.goapps/backend/internal/user/service/service_test.goapps/backend/internal/user/store/sqlite.goapps/backend/internal/user/store/sqlite_test.goapps/backend/internal/backendapp/boot_state_routes.goapps/backend/internal/backendapp/boot_state_user_settings_test.goapps/backend/internal/task/models/models.goapps/backend/internal/task/service/service_requests.goapps/backend/internal/task/service/service_tasks.goapps/backend/internal/task/service/service_tasks_test.goapps/backend/internal/task/handlers/task_http_handlers.go- focused task HTTP handler test file(s)
Dependencies
None.
Parallelism
Sequential. This task establishes shared persisted and HTTP/service contracts consumed by every later task.
Inputs
- Spec sections: What, Data model, Task creation, Failure modes.
- Plan sections: Portable user setting, Provisional-title creation and pending state.
- Patterns: archive-confirmation preference plumbing and existing
Service.UpdateTaskevent publication.
Risks
- Preserve user-settings omitted-field semantics and do not introduce a schema migration for the JSON blob.
- Do not add a normal provisional character limit or ellipsis; preserve the existing absolute 500-character task-title safety boundary.
- Do not make the live preference a launch-time source of truth; only the task marker is durable intent.
Output contract
Report behavior implemented, files changed, the exact test command/result, blockers or risks, and update
this task plus plan.md status in the same conversation.