testguard-cli 0.8.0 → 0.8.1
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.
- package/CHANGELOG.md +69 -0
- package/README.md +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Fixed
|
|
11
|
+
- **A release that cannot open its pull request says why.** `GITHUB_TOKEN`
|
|
12
|
+
cannot call `createPullRequest` unless "Allow GitHub Actions to create and
|
|
13
|
+
approve pull requests" is enabled, and v0.8.1 hit exactly that: the branch,
|
|
14
|
+
the bump and the diff were all correct and the run still ended in a bare
|
|
15
|
+
`GraphQL: GitHub Actions is not permitted to create or approve pull
|
|
16
|
+
requests`. Both `scheduled-release.yml` and `release.yml`'s `homebrew-sha`
|
|
17
|
+
job now name the setting, give the one-line `gh api` equivalent and the
|
|
18
|
+
manual `gh pr create` fallback, and say what stays stale until it is fixed.
|
|
19
|
+
The failure is still a failure: the branch exists without a PR, and for the
|
|
20
|
+
formula `detect-version` keeps reporting the hash owed on every sweep.
|
|
21
|
+
|
|
22
|
+
## [0.8.1] - 2026-09-18
|
|
23
|
+
|
|
24
|
+
Automated weekly release — everything merged since `v0.8.0`.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- fix(release): the release allow-list is derived, not retyped (#100)
|
|
29
|
+
- fix(release): the weekly release verifies the tree it is about to ship (#99)
|
|
30
|
+
- ci(release): set the Homebrew sha256 from the published tarball (#98)
|
|
31
|
+
- chore(homebrew): sha256 for v0.8.0, from the published tarball (#97)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- **A release is no longer blocked by an allow-list that forgot one of its own
|
|
36
|
+
surfaces.** `sync-release-version.mjs` rewrites
|
|
37
|
+
`packaging/gitlab/testguard.gitlab-ci.yml`, and that path was missing from
|
|
38
|
+
both release guards: `scheduled-release.yml` would have failed with
|
|
39
|
+
"unexpected file in release diff" for a file the release exists to write,
|
|
40
|
+
and `auto-merge.yml` would have held every release PR for human review. The
|
|
41
|
+
script gained `--list-surfaces`, derived from the same table the writes use;
|
|
42
|
+
`scheduled-release.yml` now builds its allow-list from that instead of a
|
|
43
|
+
retyped copy. `auto-merge.yml` keeps an explicit list on purpose — it is the
|
|
44
|
+
gate that merges without review — and a test now fails when that list omits
|
|
45
|
+
any release surface. Claim `TG-RELEASE-SYNC-CHECK-FAILS-ON-DRIFT` gains a
|
|
46
|
+
fifth fault.
|
|
47
|
+
- **The weekly release workflow can actually cut a release.** Its "verify the
|
|
48
|
+
tree is still green" step probed in worktree mode straight after syncing the
|
|
49
|
+
version surfaces, so the probe refused to run: the sync leaves
|
|
50
|
+
`packaging/gitlab/testguard.gitlab-ci.yml` uncommitted and that file is the
|
|
51
|
+
fault target of `TG-GITLAB-PROBE-EXIT-PRESERVED`, which worktree mode
|
|
52
|
+
correctly treats as a dirty defender (exit 2). It now probes with
|
|
53
|
+
`--include-dirty`, which verifies the bumped tree that is about to be
|
|
54
|
+
released rather than the version before it. `scheduled-release.yml` had
|
|
55
|
+
never completed a run since the GitLab template became both a sync surface
|
|
56
|
+
and a fault target on 2026-09-17; every release so far was cut by hand.
|
|
57
|
+
- **The Homebrew formula's `sha256` matches its own `url`.** It had carried
|
|
58
|
+
`385d69f9…` unchanged across v0.6.0, v0.7.0 and v0.8.0 while
|
|
59
|
+
`release:sync` bumped the `url` each time — a hash that matches none of
|
|
60
|
+
the 0.4.0–0.7.0 tarballs, so `brew install` from the staged formula could
|
|
61
|
+
never have verified. Set to the sha256 of the published
|
|
62
|
+
`testguard-cli-0.8.0.tgz` (`5305ce22…`), computed from the registry, not
|
|
63
|
+
from a local `npm pack`.
|
|
64
|
+
- **`release.yml` sets the Homebrew `sha256` itself, after publishing to npm.**
|
|
65
|
+
The formula header used to tell a human to run `curl | shasum` each release,
|
|
66
|
+
and nobody did. `sync-release-version.mjs --sha256` now waits for the
|
|
67
|
+
registry to serve the tarball (a publish is `PUT 202`; the file can lag by
|
|
68
|
+
minutes), hashes exactly the bytes Homebrew will download, and writes the
|
|
69
|
+
formula only when the value changes; a `200` that is not a gzip tarball is
|
|
70
|
+
refused, never hashed. `main` is protected, so the change lands as a bot PR
|
|
71
|
+
with auto-merge armed and CI dispatched by the workflow. The hash is a
|
|
72
|
+
release surface like the URL beside it: `detect-version` compares the
|
|
73
|
+
formula against the tarball (`--check --online`) on every hourly sweep, so
|
|
74
|
+
a failed run is retried the way a failed publish is, and `--check` refuses
|
|
75
|
+
the `385d69f9…` placeholder outright. Claim
|
|
76
|
+
`TG-RELEASE-SYNC-CHECK-FAILS-ON-DRIFT` gains three faults for the new modes.
|
|
77
|
+
Only the next release exercises the workflow path end to end.
|
|
78
|
+
|
|
10
79
|
## [0.8.0] - 2026-09-18
|
|
11
80
|
|
|
12
81
|
A calibration you can quote.
|
package/README.md
CHANGED
|
@@ -126,9 +126,9 @@ raises coverage. TestGuard admits it because it fails when the claim is false.
|
|
|
126
126
|
| npm | `npm i -D testguard-cli` then `npx testguard probe` |
|
|
127
127
|
| pip | `pip install testguard-cli` then `testguard probe` (needs Node ≥ 20) |
|
|
128
128
|
| Homebrew | `brew tap raccioly/tap && brew install testguard` |
|
|
129
|
-
| GitHub Action | `uses: raccioly/testguard@v0.8.
|
|
129
|
+
| GitHub Action | `uses: raccioly/testguard@v0.8.1` — see [`action.yml`](./action.yml) |
|
|
130
130
|
| pre-commit | `repo: https://github.com/raccioly/testguard`, hooks `testguard-claims`, `testguard-probe` |
|
|
131
|
-
| GitLab CI | `include: - remote: https://raw.githubusercontent.com/raccioly/testguard/v0.8.
|
|
131
|
+
| GitLab CI | `include: - remote: https://raw.githubusercontent.com/raccioly/testguard/v0.8.1/packaging/gitlab/testguard.gitlab-ci.yml` with `inputs:` — see [`packaging/gitlab/`](./packaging/gitlab/testguard.gitlab-ci.yml) |
|
|
132
132
|
|
|
133
133
|
Projects that set `min-release-age` in `.npmrc` cannot see a version published
|
|
134
134
|
less than that many days ago (`ENOVERSIONS`); install that one with
|
|
@@ -427,12 +427,12 @@ detected base that does not resolve is a warning for `status` and `brief`
|
|
|
427
427
|
# GitHub Actions
|
|
428
428
|
- uses: actions/checkout@v4
|
|
429
429
|
with: { fetch-depth: 0 }
|
|
430
|
-
- uses: raccioly/testguard@v0.8.
|
|
430
|
+
- uses: raccioly/testguard@v0.8.1
|
|
431
431
|
with: { command: gate }
|
|
432
432
|
|
|
433
433
|
# GitLab CI — the component-shaped template: gate + probe, brief as an artifact and, opted in, as a merge-request note
|
|
434
434
|
include:
|
|
435
|
-
- remote: 'https://raw.githubusercontent.com/raccioly/testguard/v0.8.
|
|
435
|
+
- remote: 'https://raw.githubusercontent.com/raccioly/testguard/v0.8.1/packaging/gitlab/testguard.gitlab-ci.yml'
|
|
436
436
|
inputs: { dir: backend, post_note: true } # post_note needs TESTGUARD_GITLAB_TOKEN (api scope); one note, updated in place
|
|
437
437
|
```
|
|
438
438
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testguard-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Breaks your code on purpose and reports every promise your tests did not notice breaking. Mutation testing bound to the claims a project makes — vitest, jest, Playwright, pytest and unittest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|