zara-coding: add approval-gated create-only branches #465

Open
nsaspy wants to merge 8 commits from rage/1-zara-coding-branch-create into main
Owner

Advances #1.

Adds the first narrowly mutating zara-coding Git operation: coding.git.branch.create.

Safety contract:

  • canonical Zara zara_requires_approval=true metadata is mandatory for this mutating tool;
  • repository path remains under configured allowed roots;
  • caller supplies only a branch name, never arbitrary Git argv or start point;
  • branch ref is validated with git check-ref-format;
  • creation is fixed to current HEAD;
  • git update-ref uses an empty expected old OID, Git's hash-format-independent “ref must not exist” compare-and-set sentinel, so an existing branch cannot be moved or overwritten;
  • subprocess execution remains argv-only, bounded, and shell=False;
  • unconfigured/missing Git state fails closed.

TDD sequence starts with d7184cbb; implementation/tool contract/docs follow, plus an adversarial SHA-format portability regression/fix. Full registry/plugin/Nix CI required before merge.

Advances #1. Adds the first narrowly mutating `zara-coding` Git operation: `coding.git.branch.create`. Safety contract: - canonical Zara `zara_requires_approval=true` metadata is mandatory for this mutating tool; - repository path remains under configured allowed roots; - caller supplies only a branch name, never arbitrary Git argv or start point; - branch ref is validated with `git check-ref-format`; - creation is fixed to current `HEAD`; - `git update-ref` uses an empty expected old OID, Git's hash-format-independent “ref must not exist” compare-and-set sentinel, so an existing branch cannot be moved or overwritten; - subprocess execution remains argv-only, bounded, and `shell=False`; - unconfigured/missing Git state fails closed. TDD sequence starts with `d7184cbb`; implementation/tool contract/docs follow, plus an adversarial SHA-format portability regression/fix. Full registry/plugin/Nix CI required before merge.
Some checks failed
CI / test (pull_request) Failing after 22s
This pull request has changes conflicting with the target branch.
  • plugins/zara-coding/README.md
  • plugins/zara-coding/lib/zara_coding/domain.py
  • plugins/zara-coding/lib/zara_coding/plugin.py
  • plugins/zara-coding/test/test_branch_create.py
  • plugins/zara-coding/test/test_plugin.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

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-branch-create
git switch rage/1-zara-coding-branch-create
git rebase main
git switch main
git merge --ff-only rage/1-zara-coding-branch-create
git switch rage/1-zara-coding-branch-create
git rebase main
git switch main
git merge --no-ff rage/1-zara-coding-branch-create
git switch main
git merge --squash rage/1-zara-coding-branch-create
git switch main
git merge --ff-only rage/1-zara-coding-branch-create
git switch main
git merge rage/1-zara-coding-branch-create
git push origin main
Sign in to join this conversation.
No description provided.