@gfdelarue/testkit 0.6.3 → 0.6.5

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 (59) hide show
  1. package/README.md +297 -3
  2. package/dist/app/bugs/batch.js +1 -1
  3. package/dist/app/bugs/bisect-dependencies.js +1 -0
  4. package/dist/app/bugs/bisect-identity.js +1 -0
  5. package/dist/app/bugs/bisect-report.js +1 -0
  6. package/dist/app/bugs/bisect-search.js +1 -0
  7. package/dist/app/bugs/bisect.js +2 -0
  8. package/dist/app/bugs/draft.js +3 -3
  9. package/dist/app/bugs/facts.js +2 -2
  10. package/dist/app/bugs/file.js +1 -1
  11. package/dist/app/bugs/issue.js +4 -4
  12. package/dist/app/bugs/record.js +2 -2
  13. package/dist/app/campaigns/brief.js +5 -5
  14. package/dist/app/prove/changes.js +3 -0
  15. package/dist/app/prove/index.js +2 -0
  16. package/dist/app/prove/mutants.js +3 -0
  17. package/dist/app/prove/report.js +3 -0
  18. package/dist/app/prove/verdict.js +1 -0
  19. package/dist/app/run/engine-orchestration.js +1 -1
  20. package/dist/app/run/orchestrator.js +1 -1
  21. package/dist/app/run/request.js +1 -1
  22. package/dist/app/run/time-zone.js +1 -0
  23. package/dist/app/sandbox/index.js +1 -0
  24. package/dist/app/sandbox/run.js +1 -0
  25. package/dist/app/shake/conditions.js +1 -0
  26. package/dist/app/shake/index.js +4 -0
  27. package/dist/app/shake/report.js +6 -0
  28. package/dist/app/shake/verdicts.js +1 -0
  29. package/dist/cli/command-catalog.js +1 -1
  30. package/dist/cli/command-flags.js +1 -1
  31. package/dist/cli/command-registry.js +1 -1
  32. package/dist/cli/commands/bug/bisect.js +1 -0
  33. package/dist/cli/commands/bug/file.js +3 -3
  34. package/dist/cli/commands/bug/record.js +2 -2
  35. package/dist/cli/commands/prove.js +3 -0
  36. package/dist/cli/commands/run.js +2 -2
  37. package/dist/cli/commands/shake.js +1 -0
  38. package/dist/domain/file-timeout.js +1 -1
  39. package/dist/engines/adapters/execution.js +1 -1
  40. package/dist/engines/contracts/fixture-manifest.js +1 -1
  41. package/dist/engines/node-vitest/adapter/adapter.js +1 -1
  42. package/dist/engines/node-vitest/adapter/driver.js +2 -2
  43. package/dist/engines/node-vitest/adapter/reporter.js +1 -1
  44. package/dist/engines/node-vitest/selection.js +1 -1
  45. package/dist/engines/playwright/adapter/adapter.js +1 -1
  46. package/dist/engines/playwright/adapter/config.js +28 -5
  47. package/dist/engines/playwright/adapter/evidence.js +2 -2
  48. package/dist/engines/playwright/runtime/index.js +1 -1
  49. package/dist/engines/playwright/runtime/sandbox.js +1 -1
  50. package/dist/process/environment.js +1 -1
  51. package/dist/process/execa-bundle.json +1 -1
  52. package/dist/repo/history.js +5 -5
  53. package/dist/toolchains/host-node-support.js +1 -1
  54. package/dist/types/playwright.d.ts +2 -7
  55. package/dist/types/workspace.d.ts +2 -0
  56. package/docs/bug-records.md +32 -23
  57. package/docs/engines.md +1 -1
  58. package/docs/release-notes.md +95 -0
  59. package/package.json +22 -7
@@ -1,3 +1,98 @@
1
+ # 0.6.5
2
+
3
+ ## `testkit bug bisect` finds the commit that broke a recorded test
4
+
5
+ `testkit bug bisect <id>` runs a recorded bug's regression test at older
6
+ commits, each in a temporary copy of the checkout with the test added, and
7
+ finds the last commit where it passes and the first where it fails. It checks
8
+ the commit that `git blame` names first, so a correct blame costs two runs,
9
+ and searches the first-parent line when the blame is wrong, for example when a
10
+ later commit only reformatted the faulty line. Every commit it runs the
11
+ test at, the checked-out one included, gets its own dependencies from a
12
+ frozen install of its lockfiles, with the checkout's ignored `.env` files and
13
+ package manager settings in place. The draft keeps both commits,
14
+ and `testkit bug file` adds them to the issue and to the facts block as
15
+ `bisect.good`, `bisect.bad`, and `bisect.exact`, with the list of commits
16
+ it ran the test at. Readers that don't know `bisect` ignore it, as
17
+ `docs/bug-records.md` allows. See
18
+ [Find the commit that broke it](../README.md#find-the-commit-that-broke-it).
19
+
20
+ ## `testkit shake` finds the condition that makes a test flaky
21
+
22
+ `testkit shake --file <test>` reruns test files under conditions that make
23
+ flaky tests fail: a seeded random order, copies of each file running at the same time
24
+ on the same services and database, a time zone 14 hours ahead of UTC and one
25
+ 11 hours behind, and every CPU core busy. Each condition runs `--runs` times
26
+ beside a control. Fisher's exact test against the control gives each condition
27
+ a verdict such as `reproduces` or `raises failures`, with p corrected for the
28
+ number of tests compared and a 95% Wilson interval for each failure rate. The
29
+ report gives a command that reproduces each failure, and Testkit runs it once
30
+ more to say whether the failure came back. The run bundles of failed runs stay
31
+ under `.testkit/shake/<id>/runs/`. `--since <ref>` shakes the test files
32
+ changed since the ref, so a job can check new tests before they merge. See
33
+ [Shake out flaky tests](../README.md#shake-out-flaky-tests).
34
+
35
+ `testkit run` takes `--vitest-shuffle <seed>`, which shuffles plain Vitest
36
+ files and their tests in the order that seed gives, and `--timezone <zone>`,
37
+ which sets `TZ` for the tests, the services Testkit starts, and a `ui` test's
38
+ browser. `--retries <n>` overrides the retries that the Vitest and Playwright
39
+ configs set, including in each project. `testkit bug record` takes all three,
40
+ and `testkit bug file` and the issue's reproduce command carry them. Testkit now passes `TZ` from its own
41
+ environment to the test processes it starts, as it passes `LANG` and `LC_ALL`.
42
+
43
+ ## `testkit prove` checks that the tests notice a change
44
+
45
+ `testkit prove --since <ref>` mutates the product code changed since the ref,
46
+ one place at a time, and runs the selected tests against each mutant in a
47
+ temporary copy of the checkout. Testkit starts the services for every run, so
48
+ an HTTP test of a service or a `ui` test of the page a service sends can catch
49
+ a mutant. Every mutated place records when a test process, a service, or a
50
+ browser page runs it, so a mutant no test noticed reads as `survived` only when
51
+ its code ran, and as `not-reached` when nothing ran it, such as code a service
52
+ serves from an old build. `--mutants` runs mutants an agent wrote, and
53
+ `--fail-under` fails a job below a mutation score. See
54
+ [Prove the tests catch a change](../README.md#prove-the-tests-catch-a-change).
55
+
56
+ # 0.6.4
57
+
58
+ ## Testkit supports Node 26 LTS
59
+
60
+ Testkit runs on Node 26 from 26.13.0, the first Node 26 LTS release. Before
61
+ this release, `testkit` exited with `TESTKIT_HOST_NODE_UNSUPPORTED` on any
62
+ Node 26, which Homebrew, Arch, and Scoop now install.
63
+ `engines.node` is now `>=22.15.0 <23.0.0 || >=24.14.1 <25.0.0 || >=26.13.0 <27.0.0`.
64
+ Support for Node 22 and 24 is unchanged.
65
+
66
+ When an engine process exited before it wrote its report, Testkit took the
67
+ failure message from the first line of its output. On Node 26, Playwright
68
+ 1.59.1 printed a `DEP0205` deprecation warning first, so Testkit reported the
69
+ warning instead of the error. Testkit now skips Node's warning lines.
70
+
71
+ ## Testkit runs Playwright 1.64.1
72
+
73
+ Testkit's Playwright moves from 1.59.1 to 1.64.1, and its Chromium from 147 to 156. Run `testkit setup playwright` once after you upgrade. Until you do, a ui
74
+ task stops with `TESTKIT_PLAYWRIGHT_INSTALLATION_INVALID`, because Chromium 156
75
+ isn't installed yet.
76
+
77
+ Playwright 1.59.1 couldn't unpack Chromium on Node 26, so
78
+ `testkit setup playwright` hung there until its 20-minute limit. Playwright
79
+ 1.64.1 installs it on Node 26 as it does on Node 22 and 24.
80
+
81
+ Playwright 1.60 to 1.64 change some behavior that ui tests may rely on:
82
+
83
+ - Device descriptors now set `screen`, so `window.screen` and media queries
84
+ see the emulated size.
85
+ - Actions, `isVisible()`, and `toBeVisible()` treat elements inside hidden
86
+ iframes as hidden.
87
+ - In headless mode, the clipboard is separate from the host's clipboard.
88
+ - `locator.ariaRef()`, the `handle` option of `exposeBinding`, and the
89
+ `videosPath` and `videoSize` context options are gone.
90
+ - `testkit setup playwright --with-deps` no longer supports Ubuntu 20.04 or
91
+ Debian 11.
92
+
93
+ [Playwright's release notes](https://playwright.dev/docs/release-notes) list
94
+ every change.
95
+
1
96
  # 0.6.3
2
97
 
3
98
  ## A global Testkit runs the product's own install
package/package.json CHANGED
@@ -1,7 +1,22 @@
1
1
  {
2
2
  "name": "@gfdelarue/testkit",
3
- "version": "0.6.3",
4
- "description": "Test orchestration platform for product acceptance and QA workflows",
3
+ "version": "0.6.5",
4
+ "description": "Test runner and CLI for coding agents and CI. Your agent hunts bugs, and Testkit files each one in GitHub or Gitea with a failing test.",
5
+ "keywords": [
6
+ "testing",
7
+ "test-runner",
8
+ "cli",
9
+ "ai",
10
+ "coding-agents",
11
+ "bug-hunting",
12
+ "regression-tests",
13
+ "vitest",
14
+ "playwright",
15
+ "ci",
16
+ "github",
17
+ "gitea"
18
+ ],
19
+ "homepage": "https://turnstone.cloud",
5
20
  "license": "SEE LICENSE IN LICENSE",
6
21
  "type": "module",
7
22
  "repository": {
@@ -96,7 +111,7 @@
96
111
  ],
97
112
  "devDependencies": {
98
113
  "@eslint/js": "^10.0.1",
99
- "@homebridge/node-pty-prebuilt-multiarch": "^0.13.1",
114
+ "@homebridge/node-pty-prebuilt-multiarch": "^0.15.0",
100
115
  "@kitschpatrol/tokei": "2.0.2",
101
116
  "@moontern-labs/code-budget": "0.1.3",
102
117
  "@types/picomatch": "4.0.3",
@@ -113,7 +128,7 @@
113
128
  "verdaccio": "6.10.3"
114
129
  },
115
130
  "dependencies": {
116
- "@playwright/test": "1.59.1",
131
+ "@playwright/test": "1.64.1",
117
132
  "@types/node": "22.20.1",
118
133
  "@typescript-eslint/parser": "8.65.0",
119
134
  "@typescript-eslint/types": "8.65.0",
@@ -124,8 +139,8 @@
124
139
  "execa": "10.0.1",
125
140
  "minimatch": "10.2.6",
126
141
  "picocolors": "^1.1.1",
127
- "playwright": "1.59.1",
128
- "playwright-core": "1.59.1",
142
+ "playwright": "1.64.1",
143
+ "playwright-core": "1.64.1",
129
144
  "string-width": "^8.1.0",
130
145
  "tar": "7.5.21",
131
146
  "tinyglobby": "0.2.17",
@@ -151,7 +166,7 @@
151
166
  }
152
167
  },
153
168
  "engines": {
154
- "node": ">=22.15.0 <23.0.0 || >=24.14.1 <25.0.0",
169
+ "node": ">=22.15.0 <23.0.0 || >=24.14.1 <25.0.0 || >=26.13.0 <27.0.0",
155
170
  "npm": ">=11.6.0 <12.0.0"
156
171
  },
157
172
  "volta": {