2.3 KiB
2.3 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-backend-unlink-contract | Backend unlink contract | done | 1 | plan.md | ../../specs/tasks/requirements/link-existing-task-github-issue.md |
Task 01: Backend Unlink Contract
Acceptance
- One workspace-authorized endpoint detaches exactly one GitHub task-PR association, leaves sibling associations and the remote PR untouched, and fails closed for unknown or cross-workspace IDs.
- Detached associations survive restart/migration replay, disappear from all active association reads and automation inputs, are not resurrected by automatic watch discovery, and can be restored by explicit URL linking.
- A successful detach publishes a workspace-routed
github.task_pr.deletednotification only after persistence succeeds.
Verification
cd apps/backend && go test ./internal/github ./internal/gateway/websocket ./pkg/websocket
Files likely touched
apps/backend/internal/github/models.goapps/backend/internal/github/store.goapps/backend/internal/github/service_pr_watch.goor a focused siblingapps/backend/internal/github/controller.goapps/backend/internal/github/*_test.goapps/backend/internal/events/types.goapps/backend/pkg/websocket/actions.goapps/backend/internal/gateway/websocket/task_notifications.goapps/backend/internal/gateway/websocket/task_notifications_test.go
Dependencies
None.
Parallelism
Parallel-safe with Task 04 only: implementation and public-doc files are disjoint, and Task 04 does not depend on generated contracts.
Inputs
- Spec sections:
What,Scenarios,Data And API,Failure Modes. - Plan sections:
Durable association detachment,Service and HTTP contract,Live update contract. - Patterns: GitLab's workspace-scoped
DeleteTaskMRForWorkspace, GitHub'sReplaceTaskPR, and workspace-routed task notification payloads.
Risks
- Existing databases and both supported SQL dialects must receive the nullable column through replay-safe migration order.
- Internal automatic association paths must not clear the tombstone intended for explicit relinking only.
Output contract
Report the behavioral tests added, files changed, exact command result,
remaining risks/blockers, and update this task plus plan.md status in the same
conversation.