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 (#226)
Two of the three defects in #225, all one root cause: helpers resolving paths
under $HOME/Code/PyAutoLabs, which no cloud/web/CI session has.
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 a session whose roots are not
at the default path got a green light it never earned. Reproduced during #224:
a conflict check was recorded as clean having read nothing.
Split into worktree_registry_path so the listing can signal failure in its exit
code; the guard now reports CANNOT VERIFY with the paths it tried and returns 3.
--allow-missing-registry proceeds unguarded and says so, never by default.
test_missing_active_md_yields_no_claims asserted exactly the fail-open
behaviour, so it is rewritten to the corrected contract with the reason
recorded — it was pinning the defect. The sibling worktree_claim_is_stale is
documented fail-open by design and is untouched: it resolves active.md itself.
Both fail toward safety.
test_skill_install.py: two tests depended on the checkout being NAMED
PyAutoBrain one level under PYAUTO_ROOT (default bin/../..). They now pin a
fixture root, testing the installer rather than the checkout layout. This is
what made the ship_library fallback gate spuriously RED on #224.
pytest tests/ is now 331 passed with nothing ignored — green in a cloud session.
Closes#225
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