zara-coding: fence branch creation to observed HEAD #201

Closed
opened 2026-09-08 02:03:13 +00:00 by nsaspy · 0 comments
Owner

Local #1 safety slice.

coding.git.branch.create is approval-gated but creates a new ref at whatever repository HEAD exists when the mutation runs. If HEAD moves after the caller inspected the repository, the branch can silently start from an unobserved commit. Commit/delete/worktree mutations already use exact observed object-ID fencing.

Acceptance:

  • deterministic RED proving branch creation refuses a moved HEAD;
  • require a full expected_head object ID through plugin and domain layers;
  • use git update-ref <new-ref> <expected_head> '' only after current HEAD still matches expected;
  • keep canonical approval metadata;
  • structured evidence returns the exact fenced head;
  • deterministic/network-free tests and full registry/Nix/package gates.
Local #1 safety slice. `coding.git.branch.create` is approval-gated but creates a new ref at whatever repository HEAD exists when the mutation runs. If HEAD moves after the caller inspected the repository, the branch can silently start from an unobserved commit. Commit/delete/worktree mutations already use exact observed object-ID fencing. Acceptance: - deterministic RED proving branch creation refuses a moved HEAD; - require a full `expected_head` object ID through plugin and domain layers; - use `git update-ref <new-ref> <expected_head> ''` only after current HEAD still matches expected; - keep canonical approval metadata; - structured evidence returns the exact fenced head; - deterministic/network-free tests and full registry/Nix/package gates.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#201
No description provided.