Create the Worker's worktree around files gc staged #4

Merged
mikluko merged 1 commit from fix/worktree-setup-staged-workdir into main 2026-11-11 12:46:06 +00:00
Owner

gc stages the work dir before pre_start runs: the skill catalog snapshot (.gc/tmp/skill-catalog-*.b64) is written at template resolution, and the exec provider copies .gc/settings.json in before it runs pre_start on the host (gascity 6bd609f, cmd/gc/template_resolve.go:704, internal/runtime/exec/hoststage.go:82-89). worktree-setup.sh then ran git worktree add into a non-empty directory, which exits 128 with "already exists", so every Worker seat in the city ended as failed-create.

The script now moves what is there aside, adds the worktree, and copies it back over the checkout; a failed add puts it back unchanged. tests/worktree-setup.sh covers both, and a scripts job runs it.

Assisted-By: Claude noreply@anthropic.com

gc stages the work dir before `pre_start` runs: the skill catalog snapshot (`.gc/tmp/skill-catalog-*.b64`) is written at template resolution, and the exec provider copies `.gc/settings.json` in before it runs `pre_start` on the host (gascity 6bd609f, `cmd/gc/template_resolve.go:704`, `internal/runtime/exec/hoststage.go:82-89`). `worktree-setup.sh` then ran `git worktree add` into a non-empty directory, which exits 128 with "already exists", so every Worker seat in the city ended as `failed-create`. The script now moves what is there aside, adds the worktree, and copies it back over the checkout; a failed add puts it back unchanged. `tests/worktree-setup.sh` covers both, and a `scripts` job runs it. Assisted-By: Claude <noreply@anthropic.com>
Create the Worker's worktree around files gc staged
All checks were successful
test / scripts (pull_request) Successful in 2s
test / changelog (pull_request) Successful in 10s
test / lint (pull_request) Successful in 3m19s
72b0a2e86f
gc writes .gc/settings.json and the skill catalog snapshot into the work
dir before pre_start runs, so git worktree add met a non-empty path and
failed every Worker start with "already exists".

Assisted-By: Claude <noreply@anthropic.com>
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascitypacks!4
No description provided.