zara-coding: make branch creation HEAD fence atomic #199

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

Advances #1.

Follow-up to #185/#186. The new branch-create contract rejects an already-stale caller-observed expected_head, but its current rev-parse HEAD check and update-ref refs/heads/<new> creation are separate Git operations. HEAD can move after the check and before ref creation, allowing a branch to be created after the fence became stale.

Acceptance:

  • deterministic RED proving branch creation uses one Git ref transaction that verifies HEAD == expected_head and creates the new branch ref together;
  • use canonical Git plumbing (update-ref --stdin transaction semantics), no shell, no private runtime;
  • retain full-object-ID validation and create-only behavior;
  • fail closed with a useful CodingError on stale HEAD/existing ref;
  • focused tests + registry validator + full nix flake check + generated package build + exact-head protected merge.
Advances #1. Follow-up to #185/#186. The new branch-create contract rejects an already-stale caller-observed `expected_head`, but its current `rev-parse HEAD` check and `update-ref refs/heads/<new>` creation are separate Git operations. HEAD can move after the check and before ref creation, allowing a branch to be created after the fence became stale. Acceptance: - deterministic RED proving branch creation uses one Git ref transaction that verifies `HEAD == expected_head` and creates the new branch ref together; - use canonical Git plumbing (`update-ref --stdin` transaction semantics), no shell, no private runtime; - retain full-object-ID validation and create-only behavior; - fail closed with a useful CodingError on stale HEAD/existing ref; - focused tests + registry validator + full `nix flake check` + generated package build + exact-head protected merge.
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#199
No description provided.