kwikqa 0.16.0-rc.1 → 0.16.0-rc.2

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 CHANGED
@@ -2,10 +2,17 @@
2
2
 
3
3
  What's new in each release of the KwikQA CLI.
4
4
 
5
- ## 0.16.0 — 2026-12-04
5
+ ## 0.16.0 — 2026-12-05
6
6
 
7
7
  ### Changed
8
8
 
9
+ - When a failing Playwright attempt has no trace, `analyze` offers to re-run the failing tests once
10
+ with tracing before diagnosing, and `analyze --yes` (as in CI) does it without asking. Pass
11
+ `--no-capture` to turn this off. (KQA-154)
12
+ - Change evidence can include matching committed source hunks from sibling packages in the same
13
+ Git repository. The request preview lists outside paths with their hunk counts. Set
14
+ `"changes": { "scope": "workspace" }` in `kwikqa.config.json` to restrict the search to the
15
+ test workspace. (KQA-155)
9
16
  - KwikQA names the test or its environment as a failure's owner only with evidence of their
10
17
  fault, as it already did for the application. A test owner needs a cited application change or
11
18
  source, or a captured page, element, probe, or trace showing what the application does; an
package/README.md CHANGED
@@ -100,9 +100,8 @@ export const config = {
100
100
 
101
101
  `@wdio/json-reporter` and JUnit reports work too: `npx kwikqa analyze --report <directory>`.
102
102
 
103
- KwikQA's reporters write to `test-results/kwikqa/`, which `analyze` finds on its own. Cypress and
104
- WebdriverIO keep no trace of a failure; run `npx kwikqa analyze --capture` and KwikQA re-runs the
105
- failing specs and records each failure's page (see below).
103
+ KwikQA's reporters write to `test-results/kwikqa/`, which `analyze` finds on its own. To record
104
+ browser evidence for failures, see [Capturing failure evidence](#capturing-failure-evidence).
106
105
 
107
106
  `login` signs you in at kwikqa.com/device: with GitHub for a personal account, or with your work
108
107
  email or your company's single sign-on for a company account. Hobby needs no payment details.
@@ -162,8 +161,8 @@ npx kwikqa analyze --report reports/junit.xml --html
162
161
 
163
162
  You get failure groups, a diagnosis, and the [failure report](#failure-report). Only the runs named
164
163
  under [supported frameworks](#supported-frameworks) are repaired and validated. For a report-only run,
165
- `fix` explains why and makes no model request. The CLI's `--capture` flag works with Playwright,
166
- Cypress, and WebdriverIO. For Playwright repairs, use its JSON reporter as shown above.
164
+ `fix` explains why and makes no model request. For Playwright capture and repair, use its JSON
165
+ reporter as shown above. See [Capturing failure evidence](#capturing-failure-evidence).
167
166
 
168
167
  Some details depend on the reporter:
169
168
 
@@ -212,6 +211,11 @@ repository root. So the root's `node_modules` works, but a copy installed only i
212
211
  doesn't. It never runs one from outside the repository, so pnpm's global virtual store
213
212
  (`enableGlobalVirtualStore`) isn't supported.
214
213
 
214
+ Change evidence defaults to `"repository"`, the Git repository containing the workspace. Set
215
+ `"changes": { "scope": "workspace" }` in the test package's `kwikqa.config.json` to search only
216
+ that package. Source filters use paths relative to the package for its own files, including
217
+ packages under directories such as `build/qa`. See [what the preview shows](#what-is-sent-and-where).
218
+
215
219
  If your tests run with a runner other than the one your test files resolve, name its folder in
216
220
  `kwikqa.config.json`. Microsoft's Playwright repository is an example: it runs its own tests with a
217
221
  pinned stable runner. Add `"runner": { "playwright": "tests/playwright-test/stable-test-runner" }`,
@@ -219,17 +223,37 @@ and KwikQA re-runs and validates with the `@playwright/test` that folder's own `
219
223
  resolves. `kwikqa init` proposes the folder when a `package.json` script starts Playwright from
220
224
  it. kwikqa before 0.15.0 refuses a config with a `runner` section.
221
225
 
226
+ ## Capturing failure evidence
227
+
228
+ If any failing attempt in a Playwright JSON report lacks a trace file, `analyze` offers to re-run
229
+ the failing tests with the project's own Playwright and config before diagnosis. Press Enter to
230
+ accept. With `--yes`, as in CI, it captures without asking. Pass `--no-capture` to skip the
231
+ offer. If the capture fails, KwikQA diagnoses the original report. Traces stay on the machine,
232
+ and the evidence preview shows what would be sent.
233
+
234
+ Use `analyze --capture` to request capture explicitly. Playwright re-runs the failing tests
235
+ with full tracing. Cypress and WebdriverIO re-run the failing specs with your config plus
236
+ KwikQA's reporter and failure capture, recording each failed attempt's DOM, command log, console,
237
+ and network. Explicit capture requires terminal approval or `--yes`.
238
+
239
+ With Playwright 1.59+ and [Playwright CLI](https://www.npmjs.com/package/@playwright/cli) installed,
240
+ capture can also pause locator failures at the failing line and ask Playwright for locators of
241
+ nearby elements. `analyze --no-probe` skips this step.
242
+
243
+ `fix` can reuse the saved capture for the same report. When it diagnoses a report for the first
244
+ time, it follows the same capture offer and approval rules.
245
+
222
246
  ## Commands
223
247
 
224
248
  | Command | What it does |
225
249
  | --- | --- |
226
- | `npx kwikqa analyze` | Diagnose the failures in the latest report. `--report <path>` picks a report file or a directory of one run's reports; `--framework` names the framework of a JUnit report; `--local` builds the evidence summary without sending anything; `--no-changes` leaves out recent code changes (see below). |
227
- | `npx kwikqa analyze --capture` | First re-run the failing tests so every failure has full evidence. Playwright runs with full tracing; with Playwright 1.59+ and [Playwright CLI](https://www.npmjs.com/package/@playwright/cli) installed, it also pauses locator failures at the failing line and asks Playwright for locators of the closest elements (`--no-probe` skips this). Cypress and WebdriverIO re-run the failing specs with your own config plus KwikQA's reporter and failure capture, which records each failed attempt's DOM, command log, console, and network. Asks before running anything; `--yes` approves in CI. |
250
+ | `npx kwikqa analyze` | Diagnose the failures in the latest report. `--report <path>` picks a report file or a directory of one run's reports; `--framework` names the framework of a JUnit report; `--local` builds the evidence summary without sending anything; `--no-changes` leaves out recent code changes (see below). See [Capturing failure evidence](#capturing-failure-evidence). |
251
+ | `npx kwikqa analyze --capture` | Request a re-run to [capture failure evidence](#capturing-failure-evidence). |
228
252
  | `npx kwikqa analyze --html` | Also write the [failure report](#failure-report), `kwikqa-report.html`; `--output <path>` writes it elsewhere. |
229
253
  | `npx kwikqa report` | Write a report from a recorded analysis. Choose HTML (default), JSON or Markdown with `--format`. Use `--run <id>` to select a run and `--output <path>` to choose the file. |
230
254
  | `npx kwikqa summarize` | Count results from every participating suite offline by default. Use `--suite <id>` and, for parallel jobs, `--shard <id>`. Use `--manifest <path>` to reconcile the shard summaries with CI. Both modes write JSON to stdout or the file given by `--output`. See [Suite coverage](#suite-coverage). |
231
255
  | `npx kwikqa flakes` | Review recurring Playwright retry passes across saved CI manifests. Use `--as-of <utc>` to reproduce the 30-day window and `--output <path>` to save the JSON. See [Runner-local retry history](#runner-local-retry-history). |
232
- | `npx kwikqa ci` | In a CI job: analyze as `analyze --yes --html` does, then publish a summary. On GitHub Actions that is the job summary and one pull-request comment, on Azure Pipelines a build summary and one pull-request thread, on GitLab CI/CD the job's log and one merge-request note, and on Jenkins the console log and one comment on a GitHub or GitLab pull request; with your webhooks, also a Slack or Teams message. See [CI](#ci). Without a KwikQA token it analyzes locally. It takes `--report`, `--framework`, `--local`, `--no-changes`, and `--output` as `analyze` does, and `--notify always` to post to chat after every run, not only failed ones. |
256
+ | `npx kwikqa ci` | Analyze the existing report in a CI job, write the failure report, and publish a summary. On GitHub Actions that is the job summary and one pull-request comment, on Azure Pipelines a build summary and one pull-request thread, on GitLab CI/CD the job's log and one merge-request note, and on Jenkins the console log and one comment on a GitHub or GitLab pull request; with your webhooks, also a Slack or Teams message. See [CI](#ci). Without a KwikQA token it analyzes locally. It takes `--report`, `--framework`, `--local`, `--no-changes`, and `--output` as `analyze` does, and `--notify always` to post to chat after every run, not only failed ones. |
233
257
  | `npx kwikqa fix` | Propose a repair for a test-side cause, show the diff and validation commands, and apply it if you approve. First it offers to re-run the failing tests once: a test that passes now is flaky, so KwikQA reports it and requests no repair. It starts with the failure group whose test-side diagnosis is strongest; if the model declines, or its proposal fails KwikQA's checks, it asks about the next such group, at most three, each with its own preview. One `fix` counts as one fix however many groups it tries. `--group <n>` repairs only group n, as `analyze` numbered it. `--propose-only` stops after the proposal. A repair of shared test support, such as a page object, fixture, or helper, is validated over every test that uses it: first those tests run once on the current code, after you approve, and afterwards each must pass again, three times in a row for Playwright, Cypress, and WebdriverIO and once for Maven, Gradle, and pytest, so a test the patch breaks is caught. In GitHub Actions, Azure Pipelines, and GitLab CI/CD, a committed `ci.fix` policy lets it run without a terminal and open a draft pull request; see [Fix pull requests](#fix-pull-requests). |
234
258
  | `npx kwikqa validate` | Run the approved validation. The repaired test must pass three times in a row, with retries off (once, for a shared Maven, Gradle, pytest, or Cucumber-JVM repair). Passing keeps the patch; failing rolls it back. When other tests failed with the same cause, it then offers to re-run them once and names any that still fail, so you can run `fix` again for them; the patch stays either way. |
235
259
  | `npx kwikqa fix --retry` | After a failed validation, re-diagnose from the new evidence and propose one revised patch. |
@@ -380,8 +404,10 @@ the failure names: locator text and test ids, expected and received values, and
380
404
  paths. Only matching hunks of source files are kept, at most 12, each with its commit's subject
381
405
  line. The subjects of the commits searched (at most 20) and the names of source files with
382
406
  uncommitted changes are listed too. Author names, emails, commit bodies, and documentation are
383
- never read. The preview says how
384
- many changed hunks a request carries. `--no-changes` on `analyze` and `fix` leaves them out.
407
+ never read. The preview shows the number of changed hunks and lists paths outside the workspace
408
+ with their hunk counts. Symlink and submodule changes are excluded. `--no-changes` on `analyze`,
409
+ `ci`, and `fix` turns off change evidence. See [the monorepo configuration](#package-managers-and-monorepos)
410
+ and the [Git evidence boundary](docs/architecture/trust-boundaries.md#source-and-git).
385
411
 
386
412
  - **Hobby, Pro, Teams, Enterprise:** the redacted packet goes to the KwikQA service, which forwards it unchanged to
387
413
  OpenRouter and the model endpoint shown in the preview. Requests go only to endpoints with a