ansible port: reconcile role (org-aware local-clone layout fix) #210

Open
opened 2026-06-04 07:49:24 +00:00 by coilysiren · 0 comments
Owner

Part of the up-to-date.py -> ansible port. Serial chain step 2 of 4. Prereq: #209 (git role) merged first.

Context

  • See #209 for the converger layout and the repos role / library/ module pattern.
  • Legacy source: agentic-os-kai/scripts/up-to-date.py, the reconcile step (step 7) and helpers origin_org, relocation_blockers, anchor_repo. Origin: agentic-os-kai#412.

Task

Add a reconcile role (+ library/repo_reconcile.py if cleaner) that makes the ~/projects/coily* tree match each checkout's origin org:

  • For each checkout whose parent dir != its origin org: MOVE it to <parent>/<origin-org>/<name> when no copy lives there yet, or REMOVE it when a correct-location copy already exists.
  • Act on clean trees only. A dirty tree, stash, in-progress op, detached HEAD, linked worktree, or (for remove) any unpushed commit FAIL-flags the repo and leaves it untouched.
  • agentic-os-kai is pinned (CLAUDE.md-import + setup.sh anchor): always flag for manual migration, never move.
  • Check mode reports the moves/removes instead of doing them.
    Wire into freshen.yml with tag reconcile, after git.

Acceptance

  • coily exec ansible-freshen (check) reports planned moves/removes, mutates nothing; --tags reconcile scopes it.
  • A dirty/unpushed repo is never moved or removed (test by leaving a dirty checkout).
  • pre-commit passes (strict pylint). docs updated. Commit closes this issue.
Part of the up-to-date.py -> ansible port. **Serial chain step 2 of 4.** Prereq: #209 (git role) merged first. ## Context - See #209 for the converger layout and the `repos` role / `library/` module pattern. - Legacy source: `agentic-os-kai/scripts/up-to-date.py`, the **reconcile step (step 7)** and helpers `origin_org`, `relocation_blockers`, `anchor_repo`. Origin: agentic-os-kai#412. ## Task Add a `reconcile` role (+ `library/repo_reconcile.py` if cleaner) that makes the `~/projects/coily*` tree match each checkout's origin org: - For each checkout whose parent dir != its origin org: **MOVE** it to `<parent>/<origin-org>/<name>` when no copy lives there yet, or **REMOVE** it when a correct-location copy already exists. - Act on clean trees only. A dirty tree, stash, in-progress op, detached HEAD, linked worktree, or (for remove) any unpushed commit FAIL-flags the repo and leaves it untouched. - `agentic-os-kai` is pinned (CLAUDE.md-import + setup.sh anchor): always flag for manual migration, never move. - Check mode reports the moves/removes instead of doing them. Wire into `freshen.yml` with tag `reconcile`, after `git`. ## Acceptance - `coily exec ansible-freshen` (check) reports planned moves/removes, mutates nothing; `--tags reconcile` scopes it. - A dirty/unpushed repo is never moved or removed (test by leaving a dirty checkout). - pre-commit passes (strict pylint). docs updated. Commit closes this issue.
coilysiren added
P3
and removed
P2
labels 2026-06-17 08:40:00 +00:00
Sign in to join this conversation.
No description provided.