taf-git 0.0.0-stage → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +413 -0
  2. package/LICENSE +21 -0
  3. package/README.md +266 -2
  4. package/RECEIPT-FORMAT.md +100 -0
  5. package/dist/badge.d.ts +23 -0
  6. package/dist/badge.js +150 -0
  7. package/dist/badge.js.map +1 -0
  8. package/dist/cli.d.ts +42 -0
  9. package/dist/cli.js +323 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/git-env.d.ts +20 -0
  12. package/dist/git-env.js +45 -0
  13. package/dist/git-env.js.map +1 -0
  14. package/dist/index.d.ts +7 -0
  15. package/dist/parsers/bun.d.ts +58 -0
  16. package/dist/parsers/bun.js +126 -0
  17. package/dist/parsers/bun.js.map +1 -0
  18. package/dist/parsers/index.d.ts +21 -0
  19. package/dist/parsers/index.js +63 -0
  20. package/dist/parsers/index.js.map +1 -0
  21. package/dist/parsers/jest.d.ts +41 -0
  22. package/dist/parsers/jest.js +87 -0
  23. package/dist/parsers/jest.js.map +1 -0
  24. package/dist/parsers/junit.d.ts +24 -0
  25. package/dist/parsers/junit.js +144 -0
  26. package/dist/parsers/junit.js.map +1 -0
  27. package/dist/parsers/vitest.d.ts +16 -0
  28. package/dist/parsers/vitest.js +61 -0
  29. package/dist/parsers/vitest.js.map +1 -0
  30. package/dist/parsers/wjttc.d.ts +37 -0
  31. package/dist/parsers/wjttc.js +152 -0
  32. package/dist/parsers/wjttc.js.map +1 -0
  33. package/dist/receipt-push.d.ts +38 -0
  34. package/dist/receipt-push.js +63 -0
  35. package/dist/receipt-push.js.map +1 -0
  36. package/dist/skipped-names.d.ts +60 -0
  37. package/dist/skipped-names.js +159 -0
  38. package/dist/skipped-names.js.map +1 -0
  39. package/dist/taf-core.d.ts +32 -0
  40. package/dist/taf-core.js +303 -0
  41. package/dist/taf-core.js.map +1 -0
  42. package/package.json +64 -4
  43. package/project.faf +57 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,413 @@
1
+ <!-- faf: faf-taf-git | TypeScript | cli | A Test Receipt Printer for git -->
2
+ <!-- faf: doc=changelog | latest=v3.0.0 | canonical=project.faf | family=TAF -->
3
+
4
+ # Changelog
5
+
6
+ All notable changes to this project will be documented in this file.
7
+
8
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
9
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
10
+
11
+ ## [3.0.0] - 2026-11-22 — Standalone Edition
12
+
13
+ faf-taf-git is now taf-git: the same receipts, under a name of its own.
14
+
15
+ **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.
16
+
17
+ ### Changed
18
+ - **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.
19
+ - Receipt commits are authored by `taf-git[bot]`; earlier receipts keep `faf-taf-git[bot]`.
20
+ - The Homebrew formula is `taf-git`.
21
+
22
+ ## [2.7.1] - 2026-11-17
23
+
24
+ A test job that fails before its tests report now gets a FAILED receipt, with zero counts.
25
+
26
+ ### Fixed
27
+ - **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.
28
+ - **The zero-count warning has one full stop** (it read "… Vitest.. test-outcome …").
29
+
30
+ ## [2.7.0] - 2026-11-17 — Red Runs Edition
31
+
32
+ A red CI run now gets a FAILED receipt, written by a separate job that is the only one with write access.
33
+
34
+ ### Added
35
+ - **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.
36
+ - **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.
37
+ - **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.
38
+
39
+ ### Fixed
40
+ - **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.
41
+ - **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.
42
+ - **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.
43
+ - **The try count is exact** when a retry stops early (a failed fetch): the message said the push failed 5 times.
44
+ - **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.
45
+ - **The badge shows a `FAILED` receipt with no failed test as `run failed`** in the fail colour, not "5/5 passing".
46
+ - **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`.
47
+
48
+ ### Changed
49
+ - 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.
50
+ - The reusable workflow pins the action to the release it ships in. A test fails when that pin and `package.json`'s version differ.
51
+
52
+ ## [2.6.0] - 2026-11-05 — Safe Receipts Edition
53
+
54
+ Receipts are never lost, and your checkout is never touched.
55
+
56
+ ### Fixed
57
+ - **No shell for the commit message** ([#39](https://github.com/Wolfe-Jam/faf-taf-git/pull/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.
58
+ - **Receipt commits hold `.taf` only** ([#39](https://github.com/Wolfe-Jam/faf-taf-git/pull/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.
59
+ - **`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.
60
+ - **The Action never writes git config** ([#39](https://github.com/Wolfe-Jam/faf-taf-git/pull/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_*`.
61
+ - **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.
62
+ - **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.
63
+ - **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.
64
+ - **`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.
65
+ - **`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.
66
+ - **`--name=value` works for every CLI option:** `--message=…` was ignored and the default message used.
67
+
68
+ ### Added
69
+ - 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.
70
+ - Action input `fail-on-push-error` (default `false`): fail the step when the receipt can't be pushed to the current branch.
71
+
72
+ ### Changed
73
+ - **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.
74
+ - 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.
75
+ - **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.
76
+
77
+ ## [2.5.0] - 2026-11-05 — Named Skips Edition
78
+
79
+ Receipts name the skipped tests, so a skipped count that stays the same can't hide a different set.
80
+
81
+ ### Added
82
+ - `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`.
83
+ - 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.
84
+ - 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).
85
+ - 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`.
86
+ - On a push-race retry the diff is worked out again against the receipt that won.
87
+
88
+ ### Changed
89
+ - RECEIPT-FORMAT.md v1.1: readers ignore keys they don't know. The file's `format_version` stays `"1.0.0"`.
90
+ - `action.yml` lists `SKIPPED` among the `result` values.
91
+
92
+ ## [2.4.6] - 2026-11-03
93
+
94
+ The package no longer carries build-machine paths, and a report with no tests says "no tests ran" instead of "could not parse".
95
+
96
+ ### Fixed
97
+ - 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.
98
+ - 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.
99
+
100
+ ### Changed
101
+ - `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.
102
+
103
+ ## [2.4.5] - 2026-11-02
104
+
105
+ node:test receipts count every test: a failing top-level test beside a `describe` is no longer dropped, and nested `describe`s are counted in full.
106
+
107
+ ### Fixed
108
+ - 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.
109
+
110
+ ## [2.4.4] - 2026-11-01
111
+
112
+ 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.
113
+
114
+ ### Fixed
115
+ - 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`.
116
+ - 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.
117
+ - 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.
118
+ - 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)`.
119
+
120
+ ## [2.4.3] - 2026-10-31
121
+
122
+ A receipt that loses a push race is retried instead of lost, and skipped Go tests count as skipped, not passed.
123
+
124
+ ### Fixed
125
+ - **A receipt that lost a push race is no longer lost.** Two runs finishing close together both commit on the same `taf-receipts` tip, and the second push was rejected with a warning. The Action now fetches the branch again, adds its receipt on top of the winner's, and pushes, up to 5 tries. Only with `target-branch`: that branch holds nothing but `.taf`. Nothing is force-pushed; the branch only grows. Pushing to the current branch is unchanged
126
+ - **Skipped tests in a JUnit report no longer count as passed** when the report leaves `skipped` out of its counts. gotestsum (Go) writes `tests` and `failures` on its root and nothing else, so 1 pass, 1 fail and 1 skip read as 2 passed. The `<skipped>` testcases are counted instead
127
+
128
+ ### Changed
129
+ - **The README recipe no longer has a `concurrency` group.** GitHub cancels a waiting run when a newer one joins the group, so a run could end with no tests and no receipt. Runs that race for the push are retried instead (above)
130
+
131
+ ## [2.4.2] - 2026-10-30
132
+
133
+ undici 6.29.1 in the Action bundle (security), and the npm package ships only the CLI: 34 kB instead of 1.0 MB.
134
+
135
+ ### Security
136
+ - **undici 6.28.1 → 6.29.1** in the lockfile and the rebuilt Action bundle (`dist/index.js`). Clears 5 Dependabot alerts (TLS certificate check bypass, denial of service). undici comes in through `@actions/core`; faf-taf-git makes no HTTP requests itself, so the risk was low, but the bundle no longer carries a known-vulnerable copy.
137
+
138
+ ### Changed
139
+ - **The npm package ships only the CLI:** a `files` list in package.json. 1.0 MB → 34 kB packed, 94 → 48 files. Out: `src/`, `tests/`, `.github/`, dev configs, and the GitHub Action bundle (`dist/index.js`), which workflows run from the git tag, never from npm. The Action itself is unchanged.
140
+
141
+ ## [2.4.1] - 2026-10-30
142
+
143
+ `faf-taf-git --version` answers, and the descriptions say tamper-evident, not "cannot be gamed".
144
+
145
+ ### Fixed
146
+ - **`--version` / `-V`** print the package version and exit 0. Before, `faf-taf-git --version` fell through to "No test output file specified" and exit 1, so a stranger's first check failed (found by a cold install of the published 2.4.0). `-v` is still `--verbose`. `tests/cli-version.test.ts`.
147
+
148
+ ### Changed
149
+ - **Descriptions:** `package.json` (npm) and `action.yml` (GitHub Marketplace) no longer say "cannot be gamed"; they now read "append-only, timestamped, kept in git. Proof over time." The RECEIPT-FORMAT heading is "Tamper-evident, not tamper-proof", matching the README.
150
+ - **project.faf:** rebuilt lean from the repo (267 → 57 lines), Trophy. `.faf-dna` unchanged.
151
+ - **README recipe** pins `@v2.4.1`. The Action itself is unchanged from 2.4.0.
152
+
153
+ ## [2.4.0] - 2026-10-29
154
+
155
+ JUnit XML parser: TAF now reads the report format most test runners can write, so Python, Rust, Go, Java and .NET projects get receipts with no conversion script.
156
+
157
+ ### Added
158
+ - **JUnit XML parser** (`parseJunitOutput`). Pass a JUnit XML report as `test-output-file`. Handles a `<testsuites>` root with or without totals, a single `<testsuite>`, nested suites (counted once), and suites with no counts (the `<testcase>` elements are counted). Failures and errors count as failed; skipped and disabled count as skipped. Tried first, because a report's captured stdout can hold another runner's summary line. Checked against a real pytest report: 202 passed, 4 skipped, the same as pytest printed.
159
+ - **`skipped` Action output.** The README listed it; the Action now sets it.
160
+
161
+ ### Changed
162
+ - **README rewritten in plain English**, with a recommended workflow: failed runs get a `FAILED` receipt (tests run with `continue-on-error`, then the job fails after the receipt), receipts on `main` only, one test run.
163
+ - CLI `--help` lists JUnit XML among the parsers.
164
+
165
+ ## [2.3.1] - 2026-09-15
166
+
167
+ Marketplace metadata — the GitHub Action's description is now under the Marketplace's 125-character limit (it was 153), so the listing can show its current name, **TAF — Testing AI Format**. No code change — same `dist/` as 2.3.0.
168
+
169
+ ## [2.3.0] - 2026-09-14
170
+
171
+ WJTTC parser — TAF now receipts a WJTTC run directly, no Jest shim. The Action now runs on `node24`.
172
+
173
+ ### Added
174
+ - **WJTTC parser** (`parseWjttcOutput`) — reads both WJTTC output forms: the `--json` suite (`"suite": "pc-ai-wjttc"`) and the human log (`pc-ai WJTTC` + `N/N passed`). Wired second in the dispatcher, after Bun.
175
+ - **`RECEIPT-FORMAT.md`** — the canonical `.taf` receipt format spec, linked from the README.
176
+
177
+ ### Changed
178
+ - **Action runtime `node20` → `node24`.** GitHub-hosted runners already run node20 actions on Node 24 and warn on every run ("Node.js 20 is deprecated"); declaring `node24` matches what runs and drops the warning. Self-hosted runners need a runner release that supports `node24`.
179
+
180
+ ### Fixed
181
+ - **CLI and Action parse-error text** now name every supported parser: Bun, WJTTC, Jest, Vitest. Both are built from the parser table itself, so a new parser shows up in both (the CLI was missing Bun; the Action said "Jest, Vitest").
182
+ - **undici** — `@actions/github` pulled a vulnerable undici 5.x; `overrides.undici ^6.28.0` pins past it, on the 6.x line `@actions/http-client` declares.
183
+
184
+ ## [2.2.2] - 2026-06-25
185
+
186
+ Marketplace metadata — surfaces the pinned brand: **TAF = Testing AI Format** (sibling of FAF, independent). Refreshes the GitHub Action name + description and adds the README definition line. No code change — same `dist/` as 2.2.1.
187
+
188
+ ## [2.2.1] - 2026-06-17
189
+
190
+ Catch-up release — npm was stuck at 2.0.4 while 2.1.0–2.2.0 were tagged but never published. This rolls the full span to npm, plus the navy badge.
191
+
192
+ ### Added
193
+ - **Native bun-test parser** (was v2.2.0) — closes the shim-shaped undercount; reads `bun test` output directly.
194
+ - **`target-branch` input** (was v2.1.0) — write `.taf` receipts to a dedicated branch.
195
+
196
+ ### Changed
197
+ - **TAF badge pass color cyan `#00D4D4` → navy `#003366`** — white text needs a deep-shade background; cyan was too light.
198
+
199
+ ### Fixed
200
+ - **`switchToTargetBranch`** no longer fails on first run when the consumer repo has no `.taf` seed (was v2.1.2).
201
+ - undici vulnerabilities resolved via `@actions/github` / `@actions/core` upgrade; `@actions/core` pinned to v2 (v3 breaks CJS exports in CI).
202
+
203
+ ### Notes
204
+ - faf-taf-git is now 100% Trophy (TAF identity cleanup). Security Policy + Code of Conduct added.
205
+
206
+ ## [2.1.2] - 2026-05-06
207
+
208
+ ### Fixed
209
+ - **`switchToTargetBranch` no longer fails on first run when consumer repo has no `.taf` seed.** Previously, the orphan-create path called `git add .taf` unconditionally; if no seed existed on the source branch, that step failed with `fatal: pathspec '.taf' did not match any files` (exit code 128) and the whole TAF Receipt step errored out.
210
+ - New behavior: when no seed is present, the action now writes a minimal valid YAML seed (`format_version`, `project`, `created`, `test_history: []`) so the first commit on the target branch always succeeds. `updateTafFile` then populates `test_history` on the same run.
211
+ - Affects any consumer using `target-branch:` for the first time without a pre-seeded `.taf` on `main`. Previous workaround (manually committing a `.taf` seed) is no longer required.
212
+
213
+ ## [2.0.4] - 2026-02-17
214
+
215
+ ### Fixed
216
+ - **Parser now correctly identifies Jest summary line** - fixes "Could not parse test output" error
217
+ - Parser pattern now matches "Tests:" lines containing "total" (Jest summary format)
218
+ - Prevents matching test descriptions like "Brake Tests: Critical dogfooding scenarios"
219
+ - TAF Receipt now works end-to-end in GitHub Actions CI ✅
220
+
221
+ ### Changed
222
+ - Pattern: `/Tests:\s+(.+?\d+\s+total)/im` (more specific than previous `/Tests:\s*(.+?)/`)
223
+
224
+ ## [2.0.3] - 2026-02-17
225
+
226
+ ### Added
227
+ - Debug logging to diagnose parser failures
228
+ - Shows sample of summary line if found, or last 20 lines if not found
229
+ - Revealed root cause: parser was matching test descriptions instead of Jest summary
230
+
231
+ ## [2.0.2] - 2026-02-17
232
+
233
+ ### Fixed
234
+ - **Fixed action.yml bundle path** - now points to `dist/index.js` (correct build output location)
235
+ - Previous versions pointed to `dist/bundle/index.js` which caused "Cannot find module" errors
236
+
237
+ ## [2.0.1] - 2026-02-17
238
+
239
+ ### Fixed
240
+ - Attempted bundle location fix (incomplete - see v2.0.2)
241
+
242
+ ## [2.0.0] - 2026-02-17
243
+
244
+ ### Changed
245
+ - **ARCHITECTURAL REDESIGN: Pre-capture pattern** 🎯
246
+ - Separate test execution from receipt generation
247
+ - Step 1: Run tests in normal shell with output redirect (`npm test 2>&1 | tee test-output.txt`)
248
+ - Step 2: Read file and generate receipt
249
+ - **Breaking change:** Replaces `test-command` input with `test-output-file` input
250
+
251
+ ### Why
252
+ - GitHub Actions execution context corruption after `@actions/exec.getExecOutput()`
253
+ - ALL logging and filesystem operations failed silently after subprocess execution
254
+ - Tested 19 different methods (console.log, console.error, fs.writeFileSync, etc.) - all failed
255
+ - No canary files found anywhere despite writing to 4 different locations
256
+ - Pre-capture pattern bypasses the problematic execution context entirely
257
+
258
+ ### Removed
259
+ - Removed 400+ lines of @actions/exec complexity
260
+ - Bundle size reduced by 11KB
261
+ - No more subprocess execution in receipt generation step
262
+
263
+ ### Migration
264
+ ```yaml
265
+ # OLD (v1.x):
266
+ - name: Generate TAF Receipt
267
+ uses: Wolfe-Jam/faf-taf-git@v1
268
+ with:
269
+ test-command: npm test
270
+
271
+ # NEW (v2.x):
272
+ - name: Run Tests and Capture Output
273
+ run: npm test 2>&1 | tee test-output.txt
274
+
275
+ - name: Generate TAF Receipt
276
+ uses: Wolfe-Jam/faf-taf-git@v2.0.4
277
+ with:
278
+ test-output-file: test-output.txt
279
+ ```
280
+
281
+ ## [1.2.2] - 2026-02-17
282
+
283
+ ### Added
284
+ - Multi-location canary file attempts (4 different paths)
285
+ - Result: NO files found anywhere - confirmed execution context corruption
286
+
287
+ ## [1.2.1] - 2026-02-17
288
+
289
+ ### Added
290
+ - Nuclear canary: Direct filesystem write after getExecOutput
291
+ - Result: File never created - filesystem operations completely fail
292
+
293
+ ## [1.2.0] - 2026-02-17
294
+
295
+ ### Added
296
+ - Direct console.error logging attempt
297
+ - Result: Still suppressed by GitHub Actions
298
+
299
+ ## [1.1.6] - 2026-02-17
300
+
301
+ ### Added
302
+ - Dual logging (core.info + console.log)
303
+ - Result: Both methods failed silently
304
+
305
+ ## [1.1.5] - 2026-02-17
306
+
307
+ ### Fixed
308
+ - JavaScript 'this' binding with arrow function wrapper
309
+ - Result: Not the issue - logging still failed
310
+
311
+ ## [1.1.4] - 2026-02-17
312
+
313
+ ### Added
314
+ - CHECKPOINT debug logs at multiple locations
315
+ - Result: Logs before getExecOutput worked, logs after failed
316
+
317
+ ## [1.1.3] - 2026-02-17
318
+
319
+ ### Added
320
+ - Unconditional debug logs (no conditionals)
321
+ - Result: Still no output in GitHub Actions
322
+
323
+ ## [1.1.2] - 2026-02-17
324
+
325
+ ### Changed
326
+ - Use `exec.getExecOutput()` instead of `exec.exec()` to capture stdout/stderr
327
+ - Result: Still failing - deeper execution context issue
328
+
329
+ ## [1.1.1] - 2026-02-17
330
+
331
+ ### Fixed
332
+ - Command parsing edge case (split "npm test" into executable + args)
333
+ - Result: Still failing - execution context corruption
334
+
335
+ ## [1.1.0] - 2026-02-17
336
+
337
+ ### Changed
338
+ - Switch from `child_process` to `@actions/exec` for GitHub Actions compatibility
339
+ - Result: Still failing - wrong function used
340
+
341
+ ## [1.0.9] - 2026-02-17
342
+
343
+ ### Added
344
+ - Write captured test output to /tmp/taf-debug-output.txt for inspection
345
+ - Enhanced debug logging to show last 10 lines when Tests: line not found
346
+
347
+ ## [1.0.8] - 2026-02-17
348
+
349
+ ### Fixed
350
+ - Improved Jest output parser robustness (handles carriage returns, multiple line endings, flexible pattern matching)
351
+ - Parser now tries multiple patterns to find test summary line
352
+ - Better handling of padded output from CI environments
353
+
354
+ ## [1.0.7] - 2026-02-17
355
+
356
+ ### Added
357
+ - Use core.info for GitHub Actions logging (console.log doesn't show in Actions)
358
+
359
+ ## [1.0.6] - 2026-02-17
360
+
361
+ ### Added
362
+ - Debug logging to troubleshoot Jest output parsing issues in CI
363
+
364
+ ## [1.0.5] - 2026-02-17
365
+
366
+ ### Fixed
367
+ - Rebuild action bundle with ANSI stripping fix (v1.0.4 had the code but not the bundle)
368
+
369
+ ## [1.0.4] - 2026-02-17
370
+
371
+ ### Fixed
372
+ - Strip ANSI color codes from Jest output before parsing (fixes CI parsing failures)
373
+ - Parser now handles Jest output with ANSI codes from GitHub Actions and other CI systems
374
+ - Case-insensitive matching for test status keywords (passed, failed, skipped, total)
375
+
376
+ ## [1.0.0] - 2025-10-28
377
+
378
+ ### Added
379
+ - Initial release of faf-taf-git
380
+ - Platform-agnostic TAF updater (works in ANY CI/CD)
381
+ - Jest parser with comprehensive format support
382
+ - Standalone CLI mode (`npx faf-taf-git`)
383
+ - GitHub Action wrapper (`uses: Wolfe-Jam/faf-taf-git@v1`)
384
+ - Auto-commit functionality for .taf updates
385
+ - MCP-portable TAF core operations
386
+
387
+ ### Architecture
388
+ - Core + wrappers design for universal CI/CD support
389
+ - Thin GitHub Action wrapper (60 lines)
390
+ - Platform-agnostic core (277 lines)
391
+ - Pure functions, no CI-specific dependencies
392
+
393
+ ### Testing
394
+ - 7/7 unit tests passing
395
+ - Integration tested in faf-cli and claude-faf-mcp
396
+ - Jest parser handles all output formats
397
+
398
+ ### Documentation
399
+ - Comprehensive README with platform examples
400
+ - CONTRIBUTING guide for developers
401
+ - CLAUDE.md project DNA
402
+ - .faf and .taf files (Golden Triangle complete)
403
+
404
+ ### Platform Support
405
+ - GitHub Actions
406
+ - GitLab CI
407
+ - Bitbucket Pipelines
408
+ - Jenkins
409
+ - CircleCI
410
+ - Local development
411
+ - Any CI/CD that runs Node.js
412
+
413
+ [1.0.0]: https://github.com/Wolfe-Jam/faf-taf-git/releases/tag/v1.0.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Wolfe James (wolfejam)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.