2.4 KiB
2.4 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 15-board-mutations | Revision-safe work-item mutations | done | 8 |
|
plan.md | ../../specs/azure-devops-integration/spec.md |
Task 15: Revision-Safe Work-Item Mutations
Acceptance
- The board work-item PATCH route accepts only title, assignee, tags, target column, and split-column done state; the backend derives every Azure field path/value from the selected board and rejects empty updates or unknown columns.
- Azure requests use
application/json-patch+json, prepend a/revtest, keep Azure rule/notification behavior enabled, and return the normalized updated card. - Stale revisions return HTTP 409 with
azure_devops_revision_conflict; permission failures preserve the existing 403 behavior, and mock mutations match the production revision semantics.
Verification
rtk make -C apps/backend test(includingTestRESTClientUpdateBoardWorkItem,TestServiceUpdateBoardWorkItem,TestControllerUpdateBoardWorkItem, andTestMockClientUpdateBoardWorkItem) from the repository root.
Files Likely Touched
apps/backend/internal/azuredevops/client.goapps/backend/internal/azuredevops/client_models.goapps/backend/internal/azuredevops/rest_client.goapps/backend/internal/azuredevops/service_board.goapps/backend/internal/azuredevops/controller.goapps/backend/internal/azuredevops/mock_client.go- Corresponding
*_test.gofiles.
Dependencies
Task 14 board definitions and card placement.
Parallelism
Sequential. It shares the backend contracts and mock state with Task 14 and must land before frontend mutation wiring.
Inputs
- Spec sections: What (card edits), API Surface, Permissions, Failure Modes, Scenarios.
- Existing patterns: bounded/redacted
doJSON, controller error mapping, and optimistic revision values already present onWorkItem. - Azure REST 7.1 Work Items Update JSON Patch contract.
Risks
- Never accept arbitrary JSON Patch operations, field reference names,
bypassRules, orsuppressNotificationsfrom the browser. - Empty assignee and tag collections are intentional clears; omitted fields must remain unchanged.
Output Contract
Report the allowlist and conflict contract, files changed, RED/GREEN commands, permission behavior, blockers and risks, then set this task and its plan checkbox to done.