zara-coding: add index-only stale-safe commits #463

Open
nsaspy wants to merge 5 commits from rage/1-zara-coding-commit into main
Owner

Advances #1 and fills the initial git.commit surface without exposing generic command execution.

Adds approval-gated coding.git.commit with a deliberately narrow contract:

  • commits exactly the already-staged index; never auto-stages files;
  • requires an attached local branch and caller-supplied full expected HEAD object ID;
  • rejects stale HEAD before writing a tree/commit object;
  • rejects an index tree identical to the parent tree;
  • bounds the commit message and passes it over stdin;
  • uses git write-tree + git commit-tree, not git commit, so repository commit hooks are not executed;
  • advances the current branch only with git update-ref <ref> <new> <expected> compare-and-set semantics;
  • all subprocesses remain fixed argv, bounded, and shell=False.

Low-level commit/update-ref behavior was also verified against a real temporary Git repo. RED-first commit 8d01ca34; implementation/tool/surface/docs follow. Full registry/plugin/Nix CI required before merge.

Advances #1 and fills the initial `git.commit` surface without exposing generic command execution. Adds approval-gated `coding.git.commit` with a deliberately narrow contract: - commits exactly the already-staged index; never auto-stages files; - requires an attached local branch and caller-supplied full expected HEAD object ID; - rejects stale HEAD before writing a tree/commit object; - rejects an index tree identical to the parent tree; - bounds the commit message and passes it over stdin; - uses `git write-tree` + `git commit-tree`, not `git commit`, so repository commit hooks are not executed; - advances the current branch only with `git update-ref <ref> <new> <expected>` compare-and-set semantics; - all subprocesses remain fixed argv, bounded, and `shell=False`. Low-level commit/update-ref behavior was also verified against a real temporary Git repo. RED-first commit `8d01ca34`; implementation/tool/surface/docs follow. Full registry/plugin/Nix CI required before merge.
Some checks failed
CI / test (pull_request) Failing after 18s
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/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-commit:rage/1-zara-coding-commit
git switch rage/1-zara-coding-commit

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