Repository navigation
v2.6.0 — Safe Receipts Edition
Receipts are never lost, and your checkout is never touched.
Fixed
- No shell for the commit message (#39): the CLI ran
git commit -m "<message>"through a shell, so--message 'x$(touch INJECTED)y'ran a command. Every git call now takes an argument list. - Receipt commits hold
.tafonly (#39, and thetarget-branchpath in this release):git addandgit commitname-- .taf, so whatever else is staged stays out of the receipt. target-branchwith a stepworking-directory: the first run committed the repository's other tracked files onto the receipts branch (the orphan init kept the whole index, andgit rm -rf .only cleared the subfolder). The receipts branch now gets that.tafonly. A receipts branch created this way by 2.5.0 or earlier keeps the files it already has: delete it, or remove them by hand.- The Action never writes git config (#39): it used
git config --global user.name/user.email, which on a developer machine replaces their identity for every repo. The bot identity now goes to each git command asGIT_AUTHOR_*/GIT_COMMITTER_*. - A receipt write keeps the rest of the file: the file was rebuilt from parsed data, which dropped comments, blank lines and any later
---document. The receipts document is now edited as YAML (its comments and key order stay), and anything after it is kept byte for byte, even a document with a YAML error. As before, CRLF line ends become LF and history indentation becomes 2 spaces. - Runs that write the same
.tafat once each keep their receipt: 20 parallel runs kept as few as 1–6 receipts, depending on the machine. Each write now holds.taf.lock(host:pid:token) and renames a temp file over.taf; 20 parallel runs keep 20. A lock left by a killed run (its process gone, or older than a minute) is taken over by one waiter at a time, so a live lock is never removed. A symlinked.tafstays a symlink and keeps its mode. - CLI
--commit: a receipt that isn't pushed is an error. A rejected push exits 1 with git's reason (and the server's message), plus what to do:git pull --rebase && git pushwhen the remote moved on, a check of push access and branch protection when the server refused. A branch with no upstream keeps the receipt in a local commit and says so. target-branchfound a branch that only ends in the same name (ls-remotematchedarchive/taf-receiptsfortaf-receipts) and then failed. It now asks forrefs/heads/<branch>. A failing git command in the Action names git's own error.target-branchno longer touches the job's checkout. The Action switched the checkout to the receipts branch, stashed changes it never restored, and on the first run emptied the working tree withgit rm -rf .. On a developer machine that lost staged work. It now writes the receipt in a separate git worktree, in a temporary folder that is removed afterwards: the checkout keeps its branch, its staged work and its files.--name=valueworks for every CLI option:--message=…was ignored and the default message used.
Added
- Action output
receipt-pushed:truewhen the receipt reached the remote;falsewithauto-commit: false, with no upstream (a pull request checkout), or when the push failed. - Action input
fail-on-push-error(defaultfalse): fail the step when the receipt can't be pushed to the current branch.
Changed
- A receipt that the Action can't push is no longer quiet. On
target-branch, a push still rejected after 5 tries fails the step (it was a warning, and the receipt was lost). On the current branch it stays a warning, now saying the receipt is lost when the job ends and why (a read-only token, a protected branch, another run first), withreceipt-pushed: false; setfail-on-push-error: trueto fail the step instead. Many workflows push with a read-onlyGITHUB_TOKEN, so failing by default would turn them red. - After a
target-branchrun the job's checkout is still on its own branch. Before, later steps in the same job ran on the receipts branch. - During a merge, the CLI's
--commitnow fails (cannot do a partial commit during a merge) and leaves.tafstaged. Before, it silently committed your merge as the receipt. Finish the merge, then commit the receipt.
Upgrade: uses: Wolfe-Jam/faf-taf-git@v2.6.0 · npm i -g faf-taf-git@2.6.0
If you used target-branch with a step working-directory on 2.5.0 or earlier: the receipts branch may hold your repo's other tracked files from its first run. 2.6.0 writes .taf only; delete the branch, or remove those files by hand.
Tests: 197/197.
FAF defines. AGENTS.md instructs. AI codes.