zara-coding: add detached worktree coordination locks #455

Open
nsaspy wants to merge 0 commits from rage/1-zara-coding-worktree-remove into main
Owner

Advances #1 with a bounded local coordination primitive for linked coding worktrees.

RAGE transaction

  • RED-first commit fd5a21d: deterministic contract for lock/unlock coordination semantics.
  • implementation commits d892d5c + bc89b57.

Contract

  • exposes approval-gated coding.git.worktree.lock / coding.git.worktree.unlock
  • only operates on registered detached non-primary worktrees inside configured roots
  • requires a full caller-observed HEAD and refuses stale HEAD
  • lock reasons are explicit, bounded to 256 chars, and reject control characters
  • refuses already-locked/prunable worktrees
  • unlock requires the exact currently reported lock reason, catching accidental/stale release attempts
  • fixed argv only; no shell, branch movement, ref creation/deletion, worktree removal, or forced Git operation

Adversarial note

Git worktree lock reasons are observable coordination metadata, not authentication credentials. Matching a reason does not establish principal ownership. Zara's canonical approval remains the authority for both lock and unlock. Strong worker/principal ownership still belongs in the later composed task-state layer; this slice does not claim to solve that boundary by itself.

This is intentionally a local coordination building block while cross-plugin worker/orchestration composition remains blocked on Zara Core #400.

Gate

Exact-head CI remains authoritative: compatibility contract, registry/plugin suite, nix flake check, and package build must be green before merge.

Advances #1 with a bounded local coordination primitive for linked coding worktrees. ## RAGE transaction - RED-first commit `fd5a21d`: deterministic contract for lock/unlock coordination semantics. - implementation commits `d892d5c` + `bc89b57`. ## Contract - exposes approval-gated `coding.git.worktree.lock` / `coding.git.worktree.unlock` - only operates on registered detached non-primary worktrees inside configured roots - requires a full caller-observed HEAD and refuses stale HEAD - lock reasons are explicit, bounded to 256 chars, and reject control characters - refuses already-locked/prunable worktrees - unlock requires the exact currently reported lock reason, catching accidental/stale release attempts - fixed argv only; no shell, branch movement, ref creation/deletion, worktree removal, or forced Git operation ## Adversarial note Git worktree lock reasons are observable coordination metadata, not authentication credentials. Matching a reason does **not** establish principal ownership. Zara's canonical approval remains the authority for both lock and unlock. Strong worker/principal ownership still belongs in the later composed task-state layer; this slice does not claim to solve that boundary by itself. This is intentionally a local coordination building block while cross-plugin worker/orchestration composition remains blocked on Zara Core #400. ## Gate Exact-head CI remains authoritative: compatibility contract, registry/plugin suite, `nix flake check`, and package build must be green before merge.
Some checks failed
CI / test (pull_request) Failing after 17s
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/1-zara-coding-worktree-remove:rage/1-zara-coding-worktree-remove
git switch rage/1-zara-coding-worktree-remove

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff rage/1-zara-coding-worktree-remove
git switch rage/1-zara-coding-worktree-remove
git rebase main
git switch main
git merge --ff-only rage/1-zara-coding-worktree-remove
git switch rage/1-zara-coding-worktree-remove
git rebase main
git switch main
git merge --no-ff rage/1-zara-coding-worktree-remove
git switch main
git merge --squash rage/1-zara-coding-worktree-remove
git switch main
git merge --ff-only rage/1-zara-coding-worktree-remove
git switch main
git merge rage/1-zara-coding-worktree-remove
git push origin main
Sign in to join this conversation.
No description provided.