You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: make the worktree conflict guard fail closed; unpin the installer tests
Two of the three defects in #225 (the PyAutoMind prompt_sync half ships
separately).
worktree_check_conflict FAILED OPEN. worktree_list_claimed returned 0 with
empty output when active.md could not be resolved under $PYAUTO_MAIN, so the
guard could not tell "nothing claims this repo" from "I could not read the
registry" — and answered the former. start_dev step 6 and start_library step 1
both document this call and act on its answer, so any session whose roots are
not at the default path got a green light it never earned, and two sessions
could each be told the same repo was free. Reproduced during the #224 session:
a conflict check was recorded as clean having read nothing.
Now split into worktree_registry_path, so the listing can signal the failure
in its exit code, and the guard reports CANNOT VERIFY with the paths it tried
and returns 3. --allow-missing-registry proceeds unguarded and says so; it is
never the default. Exit 1 still means a real conflict, 0 still means clear.
test_missing_active_md_yields_no_claims previously asserted exactly the
fail-open behaviour, so it is rewritten to the corrected contract with the
reason recorded — it was pinning the defect.
test_skill_install.py: two tests depended on the ambient checkout being NAMED
PyAutoBrain and sitting one level under PYAUTO_ROOT, which defaults to
bin/../.. — true on a laptop, false for a clone at any other path. A clone at
`pyautobrain` never finds PyAutoBrain/skills, so intake is never installed and
the asserted SKIP line never prints. They now pin PYAUTO_ROOT at a fixture root,
the same pattern the passing sibling test already used, so they test the
installer rather than the checkout layout.
This is what made the ship_library fallback gate spuriously RED on #224 and
cost a human acknowledgement to override. `pytest tests/` is now green in a
cloud session: 331 passed, nothing ignored.
Closes#225
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PY39MRi1oPbxhhr6tDToQU
Copy file name to clipboardExpand all lines: skills/start_dev/reference.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,8 @@ PyAutoMind. Shared organ boundary and the execution-environment model are in
105
105
106
106
This prints one line per `(task, repo, branch, worktree_path)` quadruple currently registered in `active.md`. For each affected repo the new plan wants to touch, check whether a different task already claims it via a `worktree:` field. If so, flag it as a **hard conflict** — the new task cannot start until the other one ships.
107
107
108
+
**The guard fails closed (#225).**`worktree_check_conflict` resolves `active.md` under `$PYAUTO_MAIN` (default `$HOME/Code/PyAutoLabs`). When it cannot find the registry it exits **3** with `CANNOT VERIFY`, rather than reporting "no conflict" from a read that never happened — outside local-dev, set `PYAUTO_MAIN` to the directory holding your PyAutoMind checkout. `--allow-missing-registry` proceeds **unguarded** and says so; use it only when you have confirmed by other means that nothing else claims the repos. Exit `1` is a real conflict; `0` is genuinely clear.
109
+
108
110
Then, for each affected repo, also run:
109
111
```bash
110
112
git -C <repo_path> branch --sort=-committerdate | head -5
0 commit comments