2.0 KiB
2.0 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | ||
|---|---|---|---|---|---|---|---|---|
| 04-workspace-quarantine | Workspace quarantine and unarchive | done | 2 |
|
plan.md | ../../specs/system-page/requirements/storage-maintenance.md |
Task 04: Workspace quarantine and unarchive
Classify both task-directory layouts safely, quarantine confirmed orphans, and integrate restore with unarchive.
Acceptance
- Complete inventory protects active worktrees, environments, executions, scratch task roots, and ancestors; any inventory/path uncertainty performs no move.
- New roots carry ownership markers; confirmed old candidates move atomically to tracked quarantine and support restore, permanent deletion, and restart reconciliation.
- Unarchive cancels pending archive cleanup, restores a task-matched quarantine entry before branch probing, and never deletes historical recovery metadata or Git branches.
Verification
cd apps/backend && go test ./internal/system/storage/workspaces ./internal/worktree ./internal/task/service ./internal/task/handlers
Files likely touched
apps/backend/internal/system/storage/workspaces/provider and testsapps/backend/internal/worktree/manager.goapps/backend/internal/worktree/manager_cleanup.goapps/backend/internal/agent/runtime/lifecycle/manager_launch.goapps/backend/internal/task/service/handoff_cascade.goapps/backend/internal/task/handlers/task_http_handlers.go- PR #1687 branch-recovery tests and new quarantine integration tests
Dependencies
- Task 01 for cleanup cancellation.
- Task 02 for quarantine persistence.
Inputs
- Spec Task cleanup, Unarchive compatibility, and workspace scenarios
- ADR 0009 fail-closed GC semantics
- Existing
office/infra/gc.goand tests as migration inputs, not a parallel final service - PR #1687 merged behavior
Output contract
Report inventory sources, path safety rules, legacy layout behavior, unarchive outcomes, tests run,
blockers/risks, and update this task plus plan.md to done.