loop: worktree prerequisites, fetch-before-refresh, and corruption halt from P1 #240

Closed
opened 2026-09-03 17:56:07 +00:00 by logan · 1 comment
Collaborator

Three operational findings from the P1 adoption wave, all of which would break an unattended run:

  1. Loop worktree prerequisites. The pre-push go-test hook refused a push because the loop worktree had no frontend/dist (the Go //go:embed pattern in main.go) and no generated fixture library. A fresh worktree must run make build-frontend and make testdata once before its first push.
  2. Fetch immediately before the refresh merge. The merge leg refreshed docs/220-skill-check-scope against a cached origin/main (a merge had landed in between), CI went green on the wrong base, and the merge came back 405 "behind base" — one full CI cycle wasted. The skill says "fetch, then merge" but the failure mode deserves the emphasis.
  3. Interrupted-fetch corruption signature. The shared object store ended up with three 0-byte object files after a killed fetch; git fetch then fails with error: object file … is empty / unpack-objects failed, and a local ref + the loop worktree HEAD pointed at the dead sha1. The loop must recognize that signature and halt for a human rather than churn. (Repair was done manually: delete the 0-byte objects, re-fetch, re-point the dangling ref.)

All three belong in .pi/skills/yj-loop/ (ON procedure, merge authority, troubleshooting) and the first in plan 020's runtime section.

Three operational findings from the P1 adoption wave, all of which would break an unattended run: 1. **Loop worktree prerequisites.** The pre-push `go-test` hook refused a push because the loop worktree had no `frontend/dist` (the Go `//go:embed` pattern in `main.go`) and no generated fixture library. A fresh worktree must run `make build-frontend` and `make testdata` once before its first push. 2. **Fetch immediately before the refresh merge.** The merge leg refreshed `docs/220-skill-check-scope` against a *cached* `origin/main` (a merge had landed in between), CI went green on the wrong base, and the merge came back 405 "behind base" — one full CI cycle wasted. The skill says "fetch, then merge" but the failure mode deserves the emphasis. 3. **Interrupted-fetch corruption signature.** The shared object store ended up with three 0-byte object files after a killed fetch; `git fetch` then fails with `error: object file … is empty` / `unpack-objects failed`, and a local ref + the loop worktree HEAD pointed at the dead sha1. The loop must recognize that signature and halt for a human rather than churn. (Repair was done manually: delete the 0-byte objects, re-fetch, re-point the dangling ref.) All three belong in `.pi/skills/yj-loop/` (ON procedure, merge authority, troubleshooting) and the first in plan 020's runtime section.
logan added the Kind/Bug
Priority
Low
4
labels 2026-09-03 17:56:07 +00:00
logan self-assigned this 2026-09-03 17:56:13 +00:00
logan added the
Status
In Progress
label 2026-09-03 17:56:13 +00:00
Author
Collaborator

⟦loop⟧ P1 finding, taking immediately. Branch fix/240-loop-operational-fixes.

Approach: three surgical edits to .pi/skills/yj-loop/SKILL.md (ON prerequisites, the fetch-before-refresh emphasis in merge authority, the interrupted-fetch corruption halt in troubleshooting) plus the worktree prerequisite clause in plan 020. No code.

⟦loop⟧ P1 finding, taking immediately. Branch `fix/240-loop-operational-fixes`. Approach: three surgical edits to `.pi/skills/yj-loop/SKILL.md` (ON prerequisites, the fetch-before-refresh emphasis in merge authority, the interrupted-fetch corruption halt in troubleshooting) plus the worktree prerequisite clause in plan 020. No code.
logan closed this issue 2026-09-03 18:17:03 +00:00
gitea-actions bot removed the
Status
In Progress
label 2026-09-03 18:17:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#240