3.2 KiB
3.2 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-seed-empty-remote-worktrees | Seed Empty Remote Worktrees | done | 1 | plan.md |
|
|
|
Task 01: Seed Empty Remote Worktrees
Summary
Add typed empty-remote evidence and a deterministic local baseline. Create normal task worktrees from that baseline without a remote write.
In scope
- Add a typed remote-ref state to strict clone and refresh results.
- Add the shared deterministic baseline and marker-ref contract.
- Seed the local base under the repository lock.
- Preserve required-refresh failures for every unproven empty state.
- Cover initial launch, recreation, and multi-repository isolation.
Out of scope
- Push a remote ref.
- Change agentctl Push or Create PR.
- Add frontend copy.
Acceptance
- Authenticated zero-ref evidence creates one empty marked baseline and a normal task worktree.
- Missing branch, authentication, network, timeout, and unknown states do not create a baseline.
- Launch and recreation leave the remote unchanged, including multi-repository preparation.
Verification
cd apps/backend && go test ./internal/gitbootstrap ./internal/repoclone ./internal/worktree ./internal/orchestrator/executor
Files likely touched
apps/backend/internal/gitbootstrap/apps/backend/internal/repoclone/clone.goapps/backend/internal/repoclone/clone_test.goapps/backend/internal/orchestrator/executor/executor_resume.goapps/backend/internal/orchestrator/executor/executor_resume_clone_transport_test.goapps/backend/internal/worktree/worktree.goapps/backend/internal/worktree/manager_git.goapps/backend/internal/worktree/manager_lifecycle.goapps/backend/internal/worktree/manager_empty_remote_test.go
Dependencies
None.
Risks
- The provider-managed refresh callback needs typed evidence without weakening exact credential scope.
- Ref creation must remain atomic under concurrent task launches.
- The commit must remain deterministic across repeated clones that use the same Git object format.
Parallelism
sequential
Inputs
REQ-WORKSPACES-EMPTY-REMOTE-REPOSITORIES-001- Empty-remote design sections for classification, baseline, launch, persistence, and security.
- Existing strict-refresh and local initial-commit tests.
Results
Completed. Added typed remote-ref-state propagation, deterministic local baseline creation, marker validation, local-origin probing, and conflict-safe launch/recreation behavior. The focused backend suite passed: go test ./internal/gitbootstrap ./internal/repoclone ./internal/worktree ./internal/orchestrator/executor (954 tests).