agentpath 0.0.0-stage → 0.1.0-alpha.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.
Files changed (127) hide show
  1. package/LICENSE.md +105 -0
  2. package/README.md +101 -2
  3. package/THIRD_PARTY_NOTICES +12 -0
  4. package/apps/demo-site/dist/site.js +92 -0
  5. package/apps/studio/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  6. package/apps/studio/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  7. package/apps/studio/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  8. package/apps/studio/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  9. package/apps/studio/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  10. package/apps/studio/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  11. package/apps/studio/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  12. package/apps/studio/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  13. package/apps/studio/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  14. package/apps/studio/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  15. package/apps/studio/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  16. package/apps/studio/dist/assets/index-DH4wJPHm.js +67 -0
  17. package/apps/studio/dist/assets/index-DrnNh2ip.css +1 -0
  18. package/apps/studio/dist/index.html +14 -0
  19. package/audit.md +173 -0
  20. package/autonomous-mode.md +104 -0
  21. package/ci.md +118 -0
  22. package/coding-agents.md +143 -0
  23. package/concepts.md +145 -0
  24. package/contracts.md +356 -0
  25. package/examples/tasks/ambiguous.json +98 -0
  26. package/examples/tasks/assertion-failure.json +98 -0
  27. package/examples/tasks/broken.json +98 -0
  28. package/examples/tasks/fixed.json +98 -0
  29. package/examples/tasks/recovery.json +19 -0
  30. package/images/compare-recovery-desktop.jpg +0 -0
  31. package/images/compare-variants-desktop.jpg +0 -0
  32. package/images/overview-desktop.jpg +0 -0
  33. package/images/run-autonomous-passed-desktop.jpg +0 -0
  34. package/images/run-failed-desktop.jpg +0 -0
  35. package/images/run-failed-mobile.jpg +0 -0
  36. package/images/run-missing-artifact-desktop.jpg +0 -0
  37. package/images/task-editor-laptop.jpg +0 -0
  38. package/installation.md +102 -0
  39. package/ledger.md +62 -0
  40. package/licenses/-fontsource-variable-geist-mono.txt +93 -0
  41. package/licenses/-fontsource-variable-geist.txt +93 -0
  42. package/licenses/lucide-react.txt +43 -0
  43. package/licenses/react-dom.txt +21 -0
  44. package/licenses/react.txt +21 -0
  45. package/licenses/scheduler.txt +21 -0
  46. package/licenses/tailwindcss.txt +21 -0
  47. package/licenses/zod.txt +21 -0
  48. package/package.json +165 -4
  49. package/packages/cli/bin/agentpath.js +39 -0
  50. package/packages/cli/dist/audit-rerun.js +384 -0
  51. package/packages/cli/dist/audit.js +387 -0
  52. package/packages/cli/dist/change-summaries.js +87 -0
  53. package/packages/cli/dist/ci-report.js +88 -0
  54. package/packages/cli/dist/demo.js +88 -0
  55. package/packages/cli/dist/doctor.js +265 -0
  56. package/packages/cli/dist/explain.js +89 -0
  57. package/packages/cli/dist/git.js +7 -0
  58. package/packages/cli/dist/inspect.js +118 -0
  59. package/packages/cli/dist/ledger.js +509 -0
  60. package/packages/cli/dist/local.js +102 -0
  61. package/packages/cli/dist/main.js +708 -0
  62. package/packages/cli/dist/mcp.js +231 -0
  63. package/packages/cli/dist/paths.js +6 -0
  64. package/packages/cli/dist/playwright-fixture.js +185 -0
  65. package/packages/cli/dist/playwright-reporter.js +49 -0
  66. package/packages/cli/dist/tasks.js +37 -0
  67. package/packages/cli/dist/test-source.js +283 -0
  68. package/packages/cli/dist/watch.js +96 -0
  69. package/packages/contracts/dist/agent-settings.js +18 -0
  70. package/packages/contracts/dist/agent.js +175 -0
  71. package/packages/contracts/dist/audit.js +115 -0
  72. package/packages/contracts/dist/guidance.js +339 -0
  73. package/packages/contracts/dist/index.js +14 -0
  74. package/packages/contracts/dist/inspect.js +63 -0
  75. package/packages/contracts/dist/ledger.js +80 -0
  76. package/packages/contracts/dist/local.js +171 -0
  77. package/packages/contracts/dist/outcomes.js +94 -0
  78. package/packages/contracts/dist/platform.js +105 -0
  79. package/packages/contracts/dist/playwright-live.js +76 -0
  80. package/packages/contracts/dist/policy.js +93 -0
  81. package/packages/contracts/dist/run.js +178 -0
  82. package/packages/contracts/dist/task-issues.js +39 -0
  83. package/packages/contracts/dist/task.js +185 -0
  84. package/packages/contracts/dist/watch.js +57 -0
  85. package/packages/core/dist/action-feedback.js +103 -0
  86. package/packages/core/dist/actions.js +160 -0
  87. package/packages/core/dist/agent-loop.js +122 -0
  88. package/packages/core/dist/artifacts.js +156 -0
  89. package/packages/core/dist/assertions.js +120 -0
  90. package/packages/core/dist/autonomous.js +1 -0
  91. package/packages/core/dist/browser.js +196 -0
  92. package/packages/core/dist/compare.js +141 -0
  93. package/packages/core/dist/control-state.js +62 -0
  94. package/packages/core/dist/diagnostics.js +134 -0
  95. package/packages/core/dist/evidence-diff.js +93 -0
  96. package/packages/core/dist/evidence.js +203 -0
  97. package/packages/core/dist/index.js +22 -0
  98. package/packages/core/dist/inspect.js +257 -0
  99. package/packages/core/dist/integrity.js +176 -0
  100. package/packages/core/dist/liveness.js +114 -0
  101. package/packages/core/dist/local-files.js +61 -0
  102. package/packages/core/dist/locators.js +214 -0
  103. package/packages/core/dist/model-provider.js +88 -0
  104. package/packages/core/dist/observation.js +257 -0
  105. package/packages/core/dist/playwright-live.js +519 -0
  106. package/packages/core/dist/playwright-results.js +543 -0
  107. package/packages/core/dist/policy.js +182 -0
  108. package/packages/core/dist/privacy.js +93 -0
  109. package/packages/core/dist/recovery.js +54 -0
  110. package/packages/core/dist/retention.js +204 -0
  111. package/packages/core/dist/run-index.js +177 -0
  112. package/packages/core/dist/run-plan.js +28 -0
  113. package/packages/core/dist/run-repository.js +518 -0
  114. package/packages/core/dist/runner.js +913 -0
  115. package/packages/core/dist/storage.js +63 -0
  116. package/packages/core/dist/task-fingerprint.js +36 -0
  117. package/packages/core/dist/test-change-rerun.js +84 -0
  118. package/packages/core/dist/test-changes.js +896 -0
  119. package/packages/core/dist/timing.js +41 -0
  120. package/packages/core/dist/watch.js +165 -0
  121. package/packages/server/dist/index.js +265 -0
  122. package/packages/server/dist/task-store.js +103 -0
  123. package/quickstart.md +85 -0
  124. package/security.md +136 -0
  125. package/try-on-your-repo.md +54 -0
  126. package/understanding-results.md +159 -0
  127. package/writing-tasks.md +196 -0
@@ -0,0 +1,98 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "demo-broken",
4
+ "name": "Add two Trail Mugs to cart (broken)",
5
+ "baseUrl": "http://127.0.0.1:4173",
6
+ "goal": "Add two Trail Mugs to the shopping cart and verify the cart quantity.",
7
+ "mode": "deterministic",
8
+ "browser": {
9
+ "viewport": {
10
+ "width": 1100,
11
+ "height": 720
12
+ },
13
+ "timeoutMs": 1500
14
+ },
15
+ "allowedHosts": [
16
+ "127.0.0.1:4173"
17
+ ],
18
+ "steps": [
19
+ {
20
+ "action": "navigate",
21
+ "url": "/broken"
22
+ },
23
+ {
24
+ "action": "click",
25
+ "target": {
26
+ "by": "role",
27
+ "role": "link",
28
+ "name": "Trail Mug"
29
+ }
30
+ },
31
+ {
32
+ "action": "wait",
33
+ "target": {
34
+ "by": "role",
35
+ "role": "heading",
36
+ "name": "Trail Mug"
37
+ },
38
+ "state": "visible"
39
+ },
40
+ {
41
+ "action": "select",
42
+ "target": {
43
+ "by": "role",
44
+ "role": "combobox",
45
+ "name": "Quantity"
46
+ },
47
+ "option": {
48
+ "by": "label",
49
+ "label": "2"
50
+ }
51
+ },
52
+ {
53
+ "action": "click",
54
+ "target": {
55
+ "by": "role",
56
+ "role": "button",
57
+ "name": "Add to cart"
58
+ }
59
+ }
60
+ ],
61
+ "assertions": [
62
+ {
63
+ "assert": "url",
64
+ "pattern": "http://127.0.0.1:*/broken/products/trail-mug"
65
+ },
66
+ {
67
+ "assert": "visible",
68
+ "target": {
69
+ "by": "role",
70
+ "role": "heading",
71
+ "name": "Trail Mug"
72
+ }
73
+ },
74
+ {
75
+ "assert": "count",
76
+ "target": {
77
+ "by": "role",
78
+ "role": "button",
79
+ "name": "Add to cart"
80
+ },
81
+ "count": 1
82
+ },
83
+ {
84
+ "assert": "text",
85
+ "target": {
86
+ "by": "role",
87
+ "role": "region",
88
+ "name": "Cart"
89
+ },
90
+ "contains": "Trail Mug × 2"
91
+ }
92
+ ],
93
+ "artifacts": {
94
+ "screenshots": "failure",
95
+ "accessibility": "failure",
96
+ "trace": false
97
+ }
98
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "demo-fixed",
4
+ "name": "Add two Trail Mugs to cart (fixed)",
5
+ "baseUrl": "http://127.0.0.1:4173",
6
+ "goal": "Add two Trail Mugs to the shopping cart and verify the cart quantity.",
7
+ "mode": "deterministic",
8
+ "browser": {
9
+ "viewport": {
10
+ "width": 1100,
11
+ "height": 720
12
+ },
13
+ "timeoutMs": 1500
14
+ },
15
+ "allowedHosts": [
16
+ "127.0.0.1:4173"
17
+ ],
18
+ "steps": [
19
+ {
20
+ "action": "navigate",
21
+ "url": "/fixed"
22
+ },
23
+ {
24
+ "action": "click",
25
+ "target": {
26
+ "by": "role",
27
+ "role": "link",
28
+ "name": "Trail Mug"
29
+ }
30
+ },
31
+ {
32
+ "action": "wait",
33
+ "target": {
34
+ "by": "role",
35
+ "role": "heading",
36
+ "name": "Trail Mug"
37
+ },
38
+ "state": "visible"
39
+ },
40
+ {
41
+ "action": "select",
42
+ "target": {
43
+ "by": "role",
44
+ "role": "combobox",
45
+ "name": "Quantity"
46
+ },
47
+ "option": {
48
+ "by": "label",
49
+ "label": "2"
50
+ }
51
+ },
52
+ {
53
+ "action": "click",
54
+ "target": {
55
+ "by": "role",
56
+ "role": "button",
57
+ "name": "Add to cart"
58
+ }
59
+ }
60
+ ],
61
+ "assertions": [
62
+ {
63
+ "assert": "url",
64
+ "pattern": "http://127.0.0.1:*/fixed/products/trail-mug"
65
+ },
66
+ {
67
+ "assert": "visible",
68
+ "target": {
69
+ "by": "role",
70
+ "role": "heading",
71
+ "name": "Trail Mug"
72
+ }
73
+ },
74
+ {
75
+ "assert": "count",
76
+ "target": {
77
+ "by": "role",
78
+ "role": "button",
79
+ "name": "Add to cart"
80
+ },
81
+ "count": 1
82
+ },
83
+ {
84
+ "assert": "text",
85
+ "target": {
86
+ "by": "role",
87
+ "role": "region",
88
+ "name": "Cart"
89
+ },
90
+ "contains": "Trail Mug × 2"
91
+ }
92
+ ],
93
+ "artifacts": {
94
+ "screenshots": "steps",
95
+ "accessibility": "steps",
96
+ "trace": false
97
+ }
98
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "workshop-reservation",
4
+ "name": "Reserve a workshop seat",
5
+ "goal": "Reserve one seat and independently verify the reservation.",
6
+ "mode": "deterministic",
7
+ "baseUrl": "http://127.0.0.1:4173",
8
+ "allowedHosts": ["127.0.0.1:4173"],
9
+ "browser": { "timeoutMs": 1000 },
10
+ "steps": [
11
+ { "action": "navigate", "url": "/recovery" },
12
+ { "action": "click", "target": { "by": "role", "role": "button", "name": "Reserve seat" } }
13
+ ],
14
+ "assertions": [
15
+ { "assert": "text", "target": { "by": "role", "role": "status", "name": "Reservation" }, "contains": "Reserved successfully." },
16
+ { "assert": "count", "target": { "by": "role", "role": "button", "name": "Reserve seat" }, "count": 1 }
17
+ ],
18
+ "artifacts": { "screenshots": "steps", "accessibility": "steps", "trace": false }
19
+ }
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,102 @@
1
+ # AgentPath: check AI-made changes to Playwright tests
2
+
3
+ AgentPath checks the changes coding agents make to Playwright tests before they merge. `agentpath audit --base origin/main e2e` lists skips, removed assertions and steps, and changed locators and expected values in a pull request; with `--rerun` it runs the old tests on the new build and says which changes the build needed and whether the evidence points to the test or the site. `agentpath ledger` lists the tests a repository has turned off, and `agentpath explain test-results` explains Playwright failures from the files Playwright already writes. These read git and Playwright's output and never edit a test: start with [Try it on your own repository](try-on-your-repo.md) and the [CI recipe](ci.md).
4
+
5
+ AgentPath also runs semantic browser tasks in Chromium and records the actions, independent assertions, and available evidence. Studio opens those recordings and compares runs locally. Deterministic runs require Node and Chromium. Autonomous runs additionally require a configured model endpoint and remain experimental.
6
+
7
+ ## Install 0.1.0-alpha.2 for private evaluation
8
+
9
+ Use Node 22.13 or later on the 22.x line, or Node 24 and later. From a writable directory, use the actual tarball path supplied to you.
10
+
11
+ ```sh
12
+ npm install --global --ignore-scripts ./agentpath-0.1.0-alpha.2.tgz
13
+ agentpath --version
14
+ agentpath --help
15
+ agentpath browser install
16
+ agentpath doctor
17
+ agentpath demo
18
+ ```
19
+
20
+ For a project-local install, run `npm install --ignore-scripts ./agentpath-0.1.0-alpha.2.tgz` in a project with a `package.json`. Use `./node_modules/.bin/agentpath` on macOS or Linux and `.\node_modules\.bin\agentpath.cmd` in Windows PowerShell. A global install requires write access to the npm prefix. Use a local install or a user-owned prefix if needed. Uninstall with `npm uninstall --global agentpath` or `npm uninstall agentpath` respectively.
21
+
22
+ This prerelease is supplied as a tarball. Install only the tarball supplied by your operator. The tarball includes the compiled CLI, local API, Studio and synthetic examples. The only external install prerequisites are Node, npm, access to npm runtime dependencies, and Chromium host libraries. The browser command uses the installed Playwright CLI to download the matching build. Ordinary npm installation and doctor do not download the browser. On Linux, ask your administrator to provision any missing system libraries and ensure the OS permits the Chromium sandbox. Playwright documents the matching `install-deps chromium` command for supported distributions. [Playwright browser setup](https://playwright.dev/docs/browsers#install-system-dependencies)
23
+
24
+ ## Offline guides
25
+
26
+ For a project-local install, open `node_modules/agentpath/README.md` in a Markdown viewer. For a global install, run `npm root --global` and open `agentpath/README.md` under that directory. These guides and their figures ship with the package:
27
+
28
+ - [Try it on your own repository](try-on-your-repo.md): `audit` and `ledger` in a few minutes
29
+ - [Auditing test changes](audit.md) and [the skip ledger](ledger.md)
30
+ - [CI recipe](ci.md)
31
+ - [Coding agents](coding-agents.md): `explain`, the Playwright reporter and fixture, and the MCP server
32
+ - [Quickstart](quickstart.md)
33
+ - [Core concepts](concepts.md)
34
+ - [Understanding results](understanding-results.md)
35
+ - [Writing tasks](writing-tasks.md)
36
+ - [Optional autonomous mode](autonomous-mode.md)
37
+ - [Security and privacy limitations](security.md)
38
+
39
+ ## Follow the demo
40
+
41
+ Open the Studio URL printed by `agentpath demo`. The command writes four real recordings into a new temporary workspace while Studio starts. The Overview's **Guided demo** then links each one:
42
+
43
+ 1. **See a verified pass.** Open the passing cart and read its independent assertions.
44
+ 2. **Find the broken control.** Open the missing-label failure and choose **Jump to failed step**. Step 4 shows the quantity select, its screenshot and its accessibility snapshot.
45
+ 3. **Compare the failure with the pass.** The comparison opens with both runs selected. The cart definitions differ, so it compares them as scenario variants and reports **Observed improvement**.
46
+ 4. **Verify a recovery.** The exact same workshop task, run before and after the synthetic service is repaired, reports **Verified task recovery**, with the first divergence at assertion 1.
47
+
48
+ The [quickstart](quickstart.md) explains each step with screenshots. The terminal also prints direct links to the same runs and comparisons. The site stays on the repaired workshop for later runs.
49
+
50
+ Press Ctrl+C to stop both loopback servers. The workspace path is printed at startup. Copy out any evidence you want to keep before the system cleans its temporary directory. Reopen the recordings later with `agentpath studio --workspace "<demo workspace>"`. The task URLs point to the original demo server, so start a new demo to get another working set.
51
+
52
+ Use `--port 0 --site-port 0` to choose ephemeral ports explicitly. When the default ports are busy, the demo chooses free ones and writes the actual URLs into the task files.
53
+
54
+ ## Use your own workspace
55
+
56
+ ```sh
57
+ agentpath doctor --json
58
+ agentpath init
59
+ agentpath studio --workspace .
60
+ ```
61
+
62
+ In a source checkout `agentpath` is not on your PATH: use `pnpm agentpath <command>` for every command on this page.
63
+
64
+ `init` writes an editable example without overwriting an existing file. The starter points to the synthetic site on port 4173. To run it unchanged, start `agentpath demo --site-port 4173` and use a second terminal for the example below. For a different site, edit the base URL, exact allowed hosts, steps and independent assertions.
65
+
66
+ ```sh
67
+ agentpath run agentpath.task.json --json
68
+ agentpath runs list
69
+ agentpath report <run-id>
70
+ agentpath compare <baseline-id> <candidate-id>
71
+ ```
72
+
73
+ `run` prints each run's ID and, for a failure, the `agentpath report` command that shows it again. `report` and `compare` print a readable summary; add `--json` for the full record. Studio and CLI share a workspace when launched from the same directory. Use `--runs-dir "<demo workspace>/.agentpath/runs"` with run, report and compare to operate on the demo recordings. The demo tasks are under `<demo workspace>/.agentpath/tasks/`. `run` exits 1 for a failed verdict and still saves the evidence. Use `compare --variants` for compatible variants and default comparison for identical task definitions. `agentpath runs reindex` rebuilds the derived SQLite index when needed. The saved run directories are authoritative. Older metadata and missing artifacts may limit a comparison.
74
+
75
+ `doctor` writes a temporary storage probe, launches sandboxed Chromium against a synthetic loopback page, and checks local Studio health. Pass `--workspace <path>` to check a particular workspace. Use `--port 0` if your Studio is already open. JSON output uses `schemaVersion: 1` with `version`, `ready`, and `checks`, where each check has `id`, `status` (PASS, WARNING or FAIL), `message`, and `resolution`. Exit 2 signals a required check failed. An unavailable optional model service produces a warning.
76
+
77
+ CLI exit codes are the same for every command: 0 when a run passed or a command succeeded, 1 when a task failed, a gate failed or integrity found a mismatch, 2 for a usage or runtime error, and 130 or 143 when SIGINT or SIGTERM cancelled the command. `audit` also exits 3 when its gate is not decided because something was not read ([audit](audit.md#what-fails-the-gate)).
78
+
79
+ ## Existing Playwright tests
80
+
81
+ AgentPath can explain failures from a Playwright suite you already have, without task files and without changing a test:
82
+
83
+ ```sh
84
+ npx playwright test --trace retain-on-failure
85
+ agentpath explain test-results
86
+ ```
87
+
88
+ To see the same explanation in every run's own output, install the tarball in the project (`npm install --save-dev --ignore-scripts ./agentpath-0.1.0-alpha.2.tgz`) and add the reporter to `playwright.config`:
89
+
90
+ ```js
91
+ reporter: [["list"], ["agentpath/playwright-reporter"]],
92
+ ```
93
+
94
+ For each failed `getByRole` with a string name or `getByLabel` locator, it says whether the page Playwright recorded points to the test or the site, and names any other locator form it does not support. It reads only the files the run wrote: it changes no verdict and applies no suggestion.
95
+
96
+ ## Optional models and privacy
97
+
98
+ In the Studio task editor, choose **Autonomous model execution** and configure an installed Ollama or OpenAI-compatible model, its endpoint, and the task's independent assertions. Numeric loopback endpoints are allowed by default. External model use requires the exact normalized base URL in `AGENTPATH_MODEL_ENDPOINT`. Put credentials only in `AGENTPATH_MODEL_API_KEY` for that explicitly approved endpoint. Doctor checks the default local Ollama model list and an explicitly configured OpenAI-compatible model list without running inference. Task goals and bounded browser observations go to the configured provider when you run an autonomous task. See [Autonomous mode](autonomous-mode.md).
99
+
100
+ Run only against authorized development and test sites. Studio and the demo bind to IPv4 loopback. Use a trusted local account and workspace. Browser destination checks and the per-run proxy are guardrails. Use network-level isolation where a hard egress boundary is required. Inspect screenshots, accessibility snapshots, task files, and reports before sharing. Opt-in native browser traces can contain unredacted page data and credentials. AgentPath sends no onboarding telemetry.
101
+
102
+ For source development, use the private repository's pinned pnpm version and run `pnpm install --frozen-lockfile`, `pnpm install:chromium` and `pnpm build`. Then run `pnpm agentpath demo`. Only the source path needs pnpm or a build. In a source checkout, use `pnpm agentpath <command>` for any CLI command. `pnpm demo` starts only the fixture site, and `pnpm dev` builds and starts standalone Studio.
package/ledger.md ADDED
@@ -0,0 +1,62 @@
1
+ # Turned-off tests (`agentpath ledger`)
2
+
3
+ A test that is skipped, marked `fixme` or marked `fail` stops guarding the product. The reason given is often "flaky", and a regression that first shows as an intermittent failure looks the same. `agentpath ledger` lists the tests turned off now, how long they have been off, and the commit that turned each one off. It also lists tests turned off and back on, and whether the commit that turned one back on also changed product code.
4
+
5
+ ```sh
6
+ agentpath ledger # tests turned off at HEAD, and re-enables in the last 365 days
7
+ agentpath ledger --days 90 # re-enables in the last 90 days before the head commit
8
+ agentpath ledger --head v1.2.0 e2e/ # at another commit, only tests under e2e/
9
+ agentpath ledger --json # one JSON object (schema below)
10
+ agentpath ledger --summary "$GITHUB_STEP_SUMMARY" # also a Markdown summary for a CI job
11
+ ```
12
+
13
+ ## What it reads, and what it does not
14
+
15
+ - **It reads test source and history from git only.**
16
+ - Only `git rev-parse`, `git ls-tree`, `git log`, `git diff-tree`, `git show` and `git cat-file` are called, as read-only commands with argument lists and no shell. External diff and text conversion drivers are turned off.
17
+ - Nothing in the repository is executed, no browser starts, and nothing is changed.
18
+ - It cannot say whether a turned-off test hides a bug.
19
+ - **Which tests:**
20
+ - Without paths, it reads the test files (`*.spec.*` and `*.test.*`, as in [audit](audit.md)) inside each Playwright suite.
21
+ - A suite is each `testDir` that a `playwright.config.*` writes as a plain string literal, comments ignored. A configuration without one counts as its own directory, which is Playwright's default. A `testDir` that is not a literal (computed with `path.join`, say) is listed under `unreadable`. In its place, the ledger reads the directories below the configuration whose names start or end with `e2e` or `playwright`, or the configuration's own directory if there are none. That way a repository's unit tests are not read as Playwright tests. The configuration is read as text, never run.
22
+ - A `testMatch` is read as in [audit](audit.md): string globs as Playwright matches them, from a fixed grammar, and regular expression literals that end in a fixed file name. It selects other names (`'**/*.ui-test.ts'`, `/.*\.e2e\.tsx?/`) and, when every `testMatch` in the configuration stands outside `projects`, fewer files: below a `testDir` of `'..'`, only those its globs name, so another runner's `.spec.` files there are not read. A `testMatch` inside `projects` never narrows, because a project without one keeps the default names. Narrowing applies to today's files only; history keeps every test name, as suites rename their files. Any other `testMatch` is listed under `unreadable`, unless its globs all end in `.spec.` or `.test.` names.
23
+ - Without paths, a test file that imports another test runner (`vitest`, `jest`, `mocha`, `node:test` and the like) and no Playwright module is not read, today or in history, as [audit](audit.md) lists such files apart. Unit tests often sit inside a suite's directory. Paths given are read whatever they hold.
24
+ - Without any configuration, every test file is read. With paths, the files under them are read instead.
25
+ - `node_modules` is never read.
26
+ - **Turned off** means one of these:
27
+ - a `skip`, `fixme` or `fail` modifier on the test or on an enclosing `describe`;
28
+ - an unconditional `test.skip()`, `test.fixme()` or `test.fail()` (or one whose condition is the literal `true`) in the test's body or its group.
29
+
30
+ A call with a condition, or one inside an `if`, `else`, `try` or `catch` branch, only counts as skipped under a condition. Those tests are counted, not listed. A skip inside a hook is not read.
31
+ - **History** is the first-parent history of `--head`, in which a merged pull request is one change. For a merge commit, the subject is the merge's own, while flakiness and automation are also read from the messages of the commits it merged (at most 50). It reads only commits whose diff in a test file adds or removes a `.skip`, `.fixme` or `.fail`, newest first, at most 2000 commits and 6000 file reads. A moved test file keeps its tests' history: git's rename detection pairs the old and new paths. To follow a suite that has moved, history also reads test files in directories named for end-to-end tests (containing `e2e` or `playwright`). A test turned back on in such a file outside today's suites is listed only when the file looks like a Playwright test: it sits in a directory whose name contains `playwright`, names a Playwright module (`@playwright/test`, or a path such as `./helpers/playwright`), or has a callback that takes Playwright's fixtures (`async ({ page }) =>`), as a test importing the project's own `./fixtures` does. Other end-to-end runners' tests, for example an API suite in an `e2e-api` folder, are left out. A renamed test, whose own title or a `describe` title changed, keeps its history when its body is token-for-token identical, as in audit.
32
+ - **The turning-off commit** of a test is the last commit in that history that turned it off. For it, and for each turning-back-on commit, the ledger reports:
33
+ - the first line of the message;
34
+ - whether the message mentions flakiness (`flaky`, `flake`, `flakey`, `flakiness`);
35
+ - whether it is automated: a `[bot]` author, or a `Co-authored-by` trailer with a `[bot]@` or `<noreply@` address.
36
+
37
+ In a shallow clone, the commits at its boundary are skipped: git shows them without their parents, as if they added every file. A test already off there has no turning-off commit, and counts as not in the history read.
38
+
39
+ `appearedOff` marks a test that the commit added already turned off, so an earlier commit may have turned it off. This covers a new or copied file, a new test, or a rename whose body also changed. A re-enable whose turning-off commit only added the test carries `disabledAppeared`, and its days print as "at least". Such a test's commit is still shown, but the totals of tests turned off by a flaky-saying or automated commit leave it out, and count it as added already off.
40
+ - **Product files** of a re-enabling commit are the files it changed outside the test file's suite. Test files, `playwright.config.*`, Markdown and `.github/` do not count. For a path the suite has since moved from, the suite is taken to end at the first directory whose name contains `playwright` or `e2e`.
41
+
42
+ A re-enable that changed product files is a fact about that commit. It is often an ordinary feature change that also re-enabled a test, and it is not proof that the skip hid a fault.
43
+ - **Ages** count days by committer dates up to the head commit, never by the wall clock, so the same commit always gives the same report.
44
+ - **Fails closed:** anything it does not read is listed under `unreadable`, never guessed. That covers:
45
+ - an unreadable file, or a test title that is not a literal;
46
+ - a shallow clone;
47
+ - a history limit that was reached.
48
+
49
+ In CI, fetch the full history (`fetch-depth: 0`).
50
+ - **Untrusted text:** titles, paths and commit messages are quoted from the repository. Control, format and line-separator characters in them become spaces, and each title part or path is cut at 2000 characters. Commit text is never parsed from the log: the ledger takes only commit ids and paths from it, then reads each commit's message by its id. Author names and addresses are never printed.
51
+
52
+ ## Exit codes
53
+
54
+ `0` when the report was printed, and `2` on a usage error: a bad `--days` (whole days from 1 to 3650), an unknown `--head`, or no git repository. The ledger never fails a build. To act on its numbers in CI, read `--json`.
55
+
56
+ ## JSON
57
+
58
+ `agentpath ledger --json` prints `{ "untrusted": "repository-provided text", "report": … }`. The report is `ledgerReportSchema` in `packages/contracts/src/ledger.ts`, validated before it is printed. Its schema version is 1; see [contracts](contracts.md#turned-off-tests-agentpath-ledger-schema-1).
59
+
60
+ ## Not yet
61
+
62
+ The ledger does not run the turned-off tests. A test that now passes every time could be turned back on. But a regression that shows up as an intermittent failure looks like a flake on a single build. Telling the two apart needs failure rates compared before and after a change, not a few runs at head. That design is open, and nothing is claimed for it.
@@ -0,0 +1,93 @@
1
+ Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font.git) GeistMono-Italic[wght].ttf: Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font.git)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font) Geist-Italic[wght].ttf: Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,43 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 Lucide Icons and Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ ---
18
+
19
+ The following Lucide icons are derived from the Feather project:
20
+
21
+ airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
22
+
23
+ The MIT License (MIT) (for the icons listed above)
24
+
25
+ Copyright (c) 2013-present Cole Bemis
26
+
27
+ Permission is hereby granted, free of charge, to any person obtaining a copy
28
+ of this software and associated documentation files (the "Software"), to deal
29
+ in the Software without restriction, including without limitation the rights
30
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31
+ copies of the Software, and to permit persons to whom the Software is
32
+ furnished to do so, subject to the following conditions:
33
+
34
+ The above copyright notice and this permission notice shall be included in all
35
+ copies or substantial portions of the Software.
36
+
37
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43
+ SOFTWARE.