Skip to content

Releases

v3.0.2

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 23 Nov 03:27
2609c3a

JUnit receipts count every test, including tests with a > in their name.

Fixed

  • A > inside a JUnit attribute no longer drops the test. XML allows a bare > in an attribute value, and node:test's JUnit reporter writes names such as code span > bold that way. The parser ended the tag at that >, so mcp-context-card's first receipt said 254 when 259 tests ran. With a failing test in the report, the cut could also count the failure against the wrong test. Suite and root tags had the same flaw.

First release published from GitHub Actions with npm Trusted Publishing (OIDC), with provenance.

v3.0.1

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 22 Nov 06:48
d384054

A first run with no .taf now starts one instead of stopping.

Fixed

  • The command-line tool starts .taf on its first run. npx taf-git --file test-output.txt in a project with no .taf stopped with "No .taf file found" and printed the command to make one; the README's steps didn't mention it. It now writes a new .taf (no receipts yet) and records the run. The action on the current branch (no target-branch) does the same; on taf-receipts it already did. An existing .taf is never written over.

232 tests pass.

FAF defines. AGENTS.md instructs. AI codes.

v3.0.0 — Standalone Edition

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 22 Nov 05:48
9b83c8c

faf-taf-git is now taf-git: the same receipts, under a name of its own.

Using receipt.yml? Change your uses: line to Wolfe-Jam/taf-git/.github/workflows/receipt.yml@v3.0.0. GitHub forwards the old repo name for actions, git and web links, but not for reusable workflows: under the old name the workflow fails before any job starts. Plain action lines (uses: Wolfe-Jam/faf-taf-git@v2.7.1) keep working.

Changed

  • Renamed to taf-git. TAF stands on its own: the npm package, the GitHub repo and the action are taf-git (uses: Wolfe-Jam/taf-git@v…). Installing taf-git also gives you a faf-taf-git command; GitHub forwards Wolfe-Jam/faf-taf-git. The .taf format, the receipt fields and the taf-receipts branch are unchanged.
  • Receipt commits are authored by taf-git[bot]; earlier receipts keep faf-taf-git[bot].
  • The Homebrew formula is taf-git.

228 tests pass.

FAF defines. AGENTS.md instructs. AI codes.

v2.7.1

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 22 Nov 05:18
24a2858

A test job that fails before its tests report now gets a FAILED receipt, with zero counts.

Fixed

  • A red run with no test output is recorded too. When the test job fails before its tests report (the install or the build fails, a test does not compile under cargo nextest, the upload step was skipped), receipt.yml now writes a placeholder and records the run as FAILED with zero counts, with a warning that names the likely cause. It was a warning and no receipt, a gap in the history. A test job that passed with no artifact still fails the receipt job (a wrong artifact-name); one that was cancelled or skipped gets no receipt. This repo's own CI does the same.
  • The zero-count warning has one full stop (it read "… Vitest.. test-outcome …").

228 tests pass.

FAF defines. AGENTS.md instructs. AI codes.

v2.7.0 — Red Runs Edition

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 17 Nov 06:45
f55c50c

A red CI run now gets a FAILED receipt, written by a separate job that is the only one with write access.

Added

  • A reusable workflow, .github/workflows/receipt.yml: call it from a job that needs your test job. The test job uploads its output as an artifact; the receipt job downloads it and saves the receipt to taf-receipts. With if: ${{ !cancelled() }} on the calling job a red run is recorded as FAILED, and only that job has contents: write. Inputs: artifact-name, test-output-file, test-result, target-branch, skipped-names, runs-on, commit-message. The action's outputs are passed through. test-result: ${{ needs.<test job>.result }} is required: a failed test job is recorded as FAILED even when its output counts no failed test. No artifact after a failed test job: no receipt, and a warning that names the causes (the build failed first, an upload step without if: ${{ !cancelled() }}, a wrong name). No artifact after a test job that passed means a wrong artifact-name, and the job fails. The README now leads with this setup.
  • Action input fail-on-failed-tests (default false): fail the step when the receipt is FAILED, after the receipt is written and pushed and the outputs are set. A single job whose test step has continue-on-error: true gets its FAILED receipt and still goes red, with no extra failing step.
  • Action input test-outcome (optional): the test step's outcome or the test job's result. Only failure counts. The receipt is then FAILED even if the output counts no failed test (a test file that did not compile, a coverage threshold, a linter in npm test), and output that counts nothing at all gets a FAILED receipt with zero counts instead of no receipt. Left out, the result comes from the output alone, as before.

Fixed

  • On the current branch (no target-branch), a push another run beat is tried again. The receipt was lost with a warning. The action now fetches the branch into a temporary worktree, adds the receipt to the fresh .taf there and pushes, up to 5 tries in all: the same retry target-branch has. The worktree holds only .taf and runs no hooks; anything that goes wrong in it ends on the usual warning, not a failed step. The job's checkout is not moved: later steps run on the commit that was tested, which keeps its own receipt commit, unpushed, so its .taf lacks the other runs' receipts. Commits that earlier steps made go out with the receipt only when the first push succeeds; a retry pushes the receipt alone. Changed or staged files in the checkout do not block the retry. As on target-branch, the retried receipt sits on top of the newer commit and has a new timestamp. Tries are spaced by a short random wait, on both paths.
  • A push that lost the race while it ran is tried again too (cannot lock ref / failed to update ref), on both paths. It was treated as a refusal.
  • The push target on the current branch is the branch's configured upstream (branch.<name>.remote and .merge), pushed as HEAD:refs/heads/<branch>, not a bare git push. Setups that relied on push.default or pushRemote push to the upstream now.
  • The try count is exact when a retry stops early (a failed fetch): the message said the push failed 5 times.
  • The lost-receipt warning follows the last failure: a retry the server refused, or a .taf that could not be written, no longer reads as a lost race.
  • The badge shows a FAILED receipt with no failed test as run failed in the fail colour, not "5/5 passing".
  • The warning for a receipt that can't be pushed says so plainly: the receipt was not saved, git's reason, and the fix (permissions: contents: write on the job, or target-branch: taf-receipts for a protected branch). fail-on-push-error still defaults to false.

Changed

  • This repo's own CI uses the same two-job setup: the test job uploads its output and a separate receipt job, the only one with contents: write, records the run, a failed one too, with this commit's action (uses: ./). Before, a failed test run wrote no receipt.
  • The reusable workflow pins the action to the release it ships in. A test fails when that pin and package.json's version differ.

Tests: 227 passing.

Upgrade: uses: Wolfe-Jam/faf-taf-git@v2.7.0, or call the reusable workflow Wolfe-Jam/faf-taf-git/.github/workflows/receipt.yml@v2.7.0 (see the README, "Set it up").

FAF defines. AGENTS.md instructs. AI codes.

v2.6.0 — Safe Receipts Edition

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 06 Nov 00:13
71de268

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 .taf only (#39, and the target-branch path in this release): git add and git commit name -- .taf, so whatever else is staged stays out of the receipt.
  • target-branch with a step working-directory: the first run committed the repository's other tracked files onto the receipts branch (the orphan init kept the whole index, and git rm -rf . only cleared the subfolder). The receipts branch now gets that .taf only. 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 as GIT_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 .taf at 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 .taf stays 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 push when 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-branch found a branch that only ends in the same name (ls-remote matched archive/taf-receipts for taf-receipts) and then failed. It now asks for refs/heads/<branch>. A failing git command in the Action names git's own error.
  • target-branch no 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 with git 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=value works for every CLI option: --message=… was ignored and the default message used.

Added

  • Action output receipt-pushed: true when the receipt reached the remote; false with auto-commit: false, with no upstream (a pull request checkout), or when the push failed.
  • Action input fail-on-push-error (default false): 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), with receipt-pushed: false; set fail-on-push-error: true to fail the step instead. Many workflows push with a read-only GITHUB_TOKEN, so failing by default would turn them red.
  • After a target-branch run 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 --commit now fails (cannot do a partial commit during a merge) and leaves .taf staged. 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.

v2.5.0 — Named Skips Edition

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 05 Nov 15:05
5c8cddf

Receipts name the skipped tests, so a skipped count that stays the same can't hide a different set.

Added

  • skipped_tests on each receipt with skips (RECEIPT-FORMAT.md v1.1): the names (sorted, up to 25, truncated: true past that), a sha256 hash of the full set, and newly_skipped / no_longer_skipped against the previous receipt. A return to zero writes names: [] with no_longer_skipped.
  • Names from JUnit XML (<testcase> with <skipped/>, as classname > name) and Bun ((skip) and (todo) lines, with their file). Names are cleaned so they compare across runs: colour codes, timings and absolute path prefixes removed, whitespace collapsed, at most 200 characters.
  • The block is written only when the output names every skipped test; otherwise the log says why (Jest and Vitest print names only in verbose mode).
  • Action input skipped-names and CLI flag --skipped-names (default 25, 0 turns it off; anything but a whole number is an error). Action output newly-skipped.
  • On a push-race retry the diff is worked out again against the receipt that won.

Changed

  • RECEIPT-FORMAT.md v1.1: readers ignore keys they don't know. The file's format_version stays "1.0.0".
  • action.yml lists SKIPPED among the result values.

Tests: 172/172.

Upgrade: uses: Wolfe-Jam/faf-taf-git@v2.5.0 · npm i -g faf-taf-git@2.5.0

FAF defines. AGENTS.md instructs. AI codes.

v2.4.6

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 03 Nov 15:34
c0fe686

The package no longer carries build-machine paths, and a report with no tests says "no tests ran" instead of "could not parse".

Fixed

  • A JUnit report that lists no tests (node --test with no test files) says No tests ran: the JUnit report lists 0 tests, so there is no receipt to print. instead of Could not parse test output. Still no receipt, still exit 1.
  • The npm package no longer carries this machine's file paths: the .d.ts.map files (which pointed at file:///Users/…/src, a folder the package doesn't ship) are gone, and so are dist/main.*, left over from a source file deleted long ago. 52 files → 37.

Changed

  • npm run check:no-hardcode fails when dist/ holds a build-machine path. CI runs it after the build, and npm publish runs it first.

v2.4.5

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 02 Nov 19:34
fa272cd

node:test receipts count every test: a failing top-level test beside a describe is no longer dropped, and nested describes are counted in full.

Fixed

  • node:test JUnit reports (--test-reporter=junit) are counted by their <testcase>s. node counts a nested describe as one test in its parent, and puts top-level tests beside its suites, so a run with a describe was miscounted: a failing top-level test was dropped and the receipt said PASSED. Now counted when suites are nested, or when there are more testcases than the suites count. Other reports are read as before.

v2.4.4

Choose a tag to compare

@Wolfe-Jam Wolfe-Jam released this 01 Nov 15:12
8ae1c7f

Receipts tell the truth about skips: a run where every test was skipped is recorded as SKIPPED, the badge counts only real passes, and each receipt says where it ran.

Fixed

  • With no .taf, the error said to run faf taf init, a command that doesn't exist. It now gives the line that makes one: echo 'test_history: []' > .taf.
  • Every receipt said trigger: github-actions, even a local run. It now says github-actions on GitHub Actions, ci on another CI, and local otherwise.
  • A run where every test was skipped was recorded as PASSED. It is now SKIPPED, a new result value in the receipt format (RECEIPT-FORMAT.md), and its badge is gray.
  • The badge counted skipped tests as passing: 2332 passed and 1 skipped showed 2333/2333 passing (1 skipped). It now shows 2332/2333 passing (1 skipped).