saffron-ai 0.9.2 → 0.9.3

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,9 +2,155 @@
2
2
 
3
3
  All notable changes to Saffron, in one place: the `saffron-ai` runner (npm),
4
4
  the VS Code extension (`ChathurangaJayasinghe.saffron-vscode`) and the
5
- JetBrains plugin (`ai.saffron.jetbrains`). Dates are publish dates.
5
+ JetBrains plugin (`ai.saffron.jetbrains`). Dates are publish dates. Each
6
+ release heading names its main feature: `## <version>: <title>`.
6
7
 
7
- ## 0.9.2
8
+ ## 0.9.3: Review CI heals on your machine
9
+
10
+ Released 2026-10-04.
11
+
12
+ Runner
13
+
14
+ - **A heal made in CI can be reviewed and accepted on your machine.**
15
+ `saffron export` packs the pending proposals, the run's report and the
16
+ screenshots and traces it names into one zip, with where the run
17
+ happened (repository, branch, commit, CI run, shard); CI uploads it as
18
+ an artifact. `saffron import` checks it against your checkout and files
19
+ it where a local run would have, so `saffron diff`, `saffron accept`,
20
+ `saffron trace`, the report and both IDE panels work on it unchanged. A
21
+ bundle from another repository (by its path; the same path under
22
+ another host name, such as an SSH host alias, imports with a warning),
23
+ one that does not say its repository (unless
24
+ `--allow-unknown-repository`), of a newer format, with a damaged file or
25
+ a report it cannot show, or with a file over 1 GB (or over 100 times
26
+ its size unzipped) is refused whole, before anything is written, and so
27
+ are bundles that add up to over 8 GB unzipped together; a proposal made
28
+ against a different scenario text or committed recording is refused by
29
+ name, and the rest import. Bundles are read from disk one file at a
30
+ time, a URL's downloaded to disk first, so every shard of a large run
31
+ imports at once. Text from a bundle, in errors and reasons too, is
32
+ printed without control characters. Export keeps to the same limits:
33
+ it refuses a file over 1 GB and, when a bundle would be over 4 GB,
34
+ leaves the traces of green scenarios out first and says so. Shard
35
+ bundles merge into one report. The imported report says where it came
36
+ from and links to the CI run. Examples for GitHub Actions and Azure
37
+ Pipelines are in the guide (§19).
38
+ - **Or CI opens a draft pull request with the heals.**
39
+ `saffron export --branch <name>` commits the proposal files, not the
40
+ recordings, onto the commit the run tested (on a pull request build, the
41
+ head of its branch, where each proposal's binding is checked again and
42
+ one that does not fit is left out, judged by that commit's own StepSets
43
+ and data) as a new branch, pushes it and, on GitHub, opens a
44
+ draft pull request through `gh` whose description is each proposal's
45
+ verification and diff, with the commands to accept, and a staging line
46
+ that stages exactly what accept changed (`git add -A .saffron/cache &&
47
+ git add -u .saffron/proposals`). After a tag build, which tested no
48
+ branch, name the pull request's branch with `--base`. Only the
49
+ checkout's HEAD, a commit it merged in or one it descends from is ever
50
+ built on; a `pull_request_target` build records the base branch and the
51
+ commit it checked out, never the fork's. The reviewer
52
+ switches to the branch, runs `saffron accept`, commits and marks it
53
+ ready: no agent session on their machine. The CI checkout is left as it
54
+ was, and an existing branch is never pushed onto.
55
+ - **`saffron status --json` says which CI run a proposal was imported
56
+ from** (`importedFrom`: repository, branch, commit, run and its link,
57
+ shard), for as long as it is the proposal that was imported, so the
58
+ editors can show it past the next local run.
59
+ - **`saffron runs` and `saffron import --run <id>`, for GitHub Actions and
60
+ Azure Pipelines alike.** `runs` lists the branch's CI runs (through `gh`,
61
+ or `az` with its azure-devops extension), with how many of each run's
62
+ proposals are pending here; `import --run` downloads a run's bundles and
63
+ imports them. The repository's host picks the service; a `ci` key in the
64
+ config sets it, and the Azure DevOps organization and project, for a
65
+ GitHub repository built by Azure Pipelines. An Azure pull request build
66
+ is listed under the branch it validates, and only the repository's own
67
+ builds are listed. Bundles of a re-run take each shard from its latest
68
+ attempt. `import --run` downloads into a folder under `.saffron/reports`
69
+ and removes it when done. A download that takes over 10 minutes is
70
+ stopped and says so. A tag build is listed under its tag on both
71
+ services. An Azure DevOps SSH remote through a host alias counts as
72
+ Azure. With `--json`, every `import` failure, an invalid config
73
+ included, is `{"error": ...}` and exit 2. A `runs --json` whose `gh` or
74
+ `az` is missing, signed out or failing answers `{provider, branch,
75
+ runs: [], problem: {kind, message}, error}`, `error` holding the same
76
+ message, so a client reading either field works; any other failure is
77
+ `{"error": ...}` alone; both exit 2. On Azure Pipelines the pull
78
+ request builds are asked for once (`--top 500`), so a listing usually takes
79
+ three `az` calls, not seven.
80
+ `export --branch` opens the draft pull request on Azure DevOps too,
81
+ through `az repos pr create`.
82
+ - **Export streams the bundle to disk.** Screenshots and traces are
83
+ copied into the zip in chunks, never all held in memory, and the zip
84
+ is renamed into place only when complete; a file that changes while it
85
+ is packed is refused.
86
+ - **Failures are one line.** `export` exits 2 for every failure that
87
+ pushed nothing (an `--out` that is a folder, an invalid config with
88
+ `--branch`), keeping exit 1 for a branch pushed without its pull
89
+ request. Any command's expected failure prints `saffron: <message>`
90
+ and exits 2, never a stack; `SAFFRON_DEBUG=1` shows it.
91
+ - **Safe branch names in the pull request.** The description quotes the
92
+ branch in its commands, and `--branch` or `--base` with a space, a
93
+ quote or any of `` $ ` ; | & < > ( ) \ `` is refused up front.
94
+ - **A `pull_request_review` build records its pull request's branch**,
95
+ read from the event, not `12/merge`.
96
+ - **`import --json` passes on only the manifest fields it knows**, cleaned
97
+ of control characters.
98
+ - **The pull request's review steps run saffron-ai by name**
99
+ (`npx -y -p saffron-ai saffron diff`): in a checkout without
100
+ `node_modules`, a bare `npx saffron` would fetch the unrelated `saffron`
101
+ package.
102
+ - **A bundle names its run as the CI service does** (`github:<run id>`,
103
+ `azure:<build id>`), even with `SAFFRON_RUN_ID` set, so `saffron runs`
104
+ and both editors count its proposals under the right run.
105
+ - **A green scenario's trace over 1 GB is left out of the bundle** like
106
+ the other green traces, instead of failing the export.
107
+ - **Import hashes, compares and copies traces in chunks**: a 1 GB trace is
108
+ never held in memory. A bundle that changes on disk while it is
109
+ imported no longer says "nothing was imported" after some files were
110
+ written.
111
+ - **`saffron runs` on Azure asks for 50 pull request builds first**, and
112
+ for more only while too few are the branch's, not 500 on every list.
113
+
114
+ VS Code extension 0.4.0
115
+
116
+ - **CI runs**: a new view lists the current branch's CI runs, GitHub
117
+ Actions or Azure Pipelines, through `saffron runs`. **Import** runs
118
+ `saffron import --run`, then lists under the run what happened to each
119
+ proposal and any warning (a checkout at another commit, a scenario that
120
+ changed since). Imported proposals are marked with the run they came
121
+ from, linked in the tooltip. From a red CI run to an accepted repair
122
+ without leaving the editor; commit and push with the Source Control
123
+ view. The CI's own tool keeps the credentials.
124
+ - **Text from CI cannot act in a tooltip.** Run titles, branch names and
125
+ a bundle's notes are escaped so they never form links, headings or
126
+ other markup; a run links out only to GitHub or Azure DevOps, and never
127
+ when the address carries a user name. Import results are kept per
128
+ project. An import can be cancelled, and on Windows cancelling stops
129
+ the whole process tree. The list follows a branch switch, and makes no
130
+ CI call while its view is hidden.
131
+ - **Cancelling an import stops all of it, and says what it left.** On
132
+ Windows the whole process tree is stopped however the CLI was started;
133
+ on macOS and Linux a process that outlives SIGTERM gets SIGKILL. The
134
+ message says a cancelled import may have written part of the run.
135
+
136
+ JetBrains plugin 0.4.0
137
+
138
+ - **CI Runs tab**: the same runs and the same Import, through the same
139
+ two commands, with each proposal's outcome under its run. The Proposals
140
+ tab names the CI run an imported proposal came from.
141
+ - **Text from CI is shown as plain text**, in CI Runs and in Last Run
142
+ after an import, never as markup. Import is a background task you can
143
+ cancel, with no time limit; a run is imported once even if you switch
144
+ projects meanwhile; Refresh never starts a second list. The tab loads
145
+ as soon as the project is trusted, and its processes stop when the
146
+ project closes.
147
+ - **Choosing another project clears the tabs at once**: a run listed for
148
+ the last project can no longer be imported into the new one, and a
149
+ status that arrives late for the last project is dropped.
150
+ - **CI Runs lists again when you check out another branch.** A cancelled
151
+ import says it may have written part of the run.
152
+
153
+ ## 0.9.2: Bring your own AI agent
8
154
 
9
155
  Released 2026-09-30.
10
156
 
@@ -256,7 +402,7 @@ Editors (VS Code extension 0.3.3, JetBrains plugin 0.3.3)
256
402
  CSV; Run Tagged skips tags `--filter` cannot express and says which;
257
403
  diagnostics clear when a file closes or is deleted.
258
404
 
259
- ## 0.9.1
405
+ ## 0.9.1: Tag expressions: and, or, not
260
406
 
261
407
  Released 2026-09-29.
262
408
 
@@ -320,7 +466,7 @@ Editors (VS Code extension 0.3.2, JetBrains plugin 0.3.2)
320
466
  tabs, under any file icon theme that has no icon of its own for them
321
467
  (Seti, the default, included).
322
468
 
323
- ## 0.9.0
469
+ ## 0.9.0: Time-travel replay
324
470
 
325
471
  Released 2026-09-27.
326
472
 
@@ -515,7 +661,7 @@ Editors (VS Code extension 0.3.0, JetBrains plugin 0.3.0)
515
661
  what is pending when it runs, skipping UNVERIFIED proposals and
516
662
  refusing STALE ones.
517
663
 
518
- ## 0.8.5
664
+ ## 0.8.5: Proposals bound to what you reviewed
519
665
 
520
666
  Released 2026-09-24.
521
667
 
@@ -554,7 +700,7 @@ Editors (VS Code extension 0.2.10, JetBrains plugin 0.2.5)
554
700
  - Both Proposals panels mark a stale proposal STALE, with the reason and
555
701
  what to do, and note a proposal filed by an older runner.
556
702
 
557
- ## 0.8.4
703
+ ## 0.8.4: Heal and replay fixes
558
704
 
559
705
  Released 2026-09-24.
560
706
 
@@ -667,7 +813,7 @@ Editors (VS Code extension 0.2.9)
667
813
  files and to the config now refresh every open feature file, including a
668
814
  custom data folder and environment overlays.
669
815
 
670
- ## 0.8.3
816
+ ## 0.8.3: Data references in table cells
671
817
 
672
818
  Released 2026-09-22.
673
819
 
@@ -683,7 +829,7 @@ Runner
683
829
  Code currently defaults to, which drifts) and which values it takes, so a
684
830
  project can pin its recording model.
685
831
 
686
- ## 0.8.2
832
+ ## 0.8.2: Split a suite across CI machines
687
833
 
688
834
  Released 2026-09-22.
689
835
 
@@ -706,7 +852,7 @@ Runner
706
852
  twice does not count the run twice. Setup and teardown run on each shard
707
853
  and receive `SAFFRON_SHARD`. The docs have a GitHub Actions example.
708
854
 
709
- ## 0.8.1
855
+ ## 0.8.1: Chrome, Edge, and setup and teardown
710
856
 
711
857
  Released 2026-09-22.
712
858
 
@@ -769,7 +915,7 @@ Editors (VS Code extension 0.2.8)
769
915
  hover and go-to-definition now follow the runner: the environment's CSV
770
916
  replaces the base one, and the hover names the file it read.
771
917
 
772
- ## 0.8.0
918
+ ## 0.8.0: Test data outside the feature file
773
919
 
774
920
  Released 2026-09-21.
775
921
 
@@ -835,7 +981,7 @@ Editors (VS Code extension 0.2.7, JetBrains plugin 0.2.4)
835
981
  - Both Orphans lists show the screenshot folders of scenarios that no longer
836
982
  exist, so "Remove All" never deletes something it did not show.
837
983
 
838
- ## 0.7.2
984
+ ## 0.7.2: Failure screenshots
839
985
 
840
986
  Released 2026-09-21.
841
987
 
@@ -890,7 +1036,7 @@ Editors (JetBrains plugin 0.2.2)
890
1036
  notification says so when it is missing. The presence check uses no
891
1037
  plugin-manager API, so it stays clean as that API turns internal.
892
1038
 
893
- ## 0.7.1
1039
+ ## 0.7.1: Truthful checks and safer edits
894
1040
 
895
1041
  Released 2026-09-20.
896
1042
 
@@ -961,7 +1107,7 @@ Editors (VS Code extension 0.2.5)
961
1107
  passes the tree item, not the file path the row click passes; both forms
962
1108
  are accepted, and the project guard applies to both.
963
1109
 
964
- ## 0.7.0
1110
+ ## 0.7.0: saffron diff, saffron prune, and an external review
965
1111
 
966
1112
  Released 2026-09-19.
967
1113
 
@@ -1154,7 +1300,7 @@ Editors (JetBrains plugin 0.2.2, VS Code extension 0.2.4)
1154
1300
  longer shell syntax, and a file from a second workspace folder runs
1155
1301
  against that folder's config and install.
1156
1302
 
1157
- ## 0.6.0
1303
+ ## 0.6.0: Multi-tab scenarios
1158
1304
 
1159
1305
  Released 2026-09-18.
1160
1306
 
@@ -1176,7 +1322,7 @@ Editors
1176
1322
  its short description fits without being cut off, and the overview
1177
1323
  introduces the tool and how to get started before listing features.
1178
1324
 
1179
- ## 0.5.7
1325
+ ## 0.5.7: Claude Code plugin
1180
1326
 
1181
1327
  Released 2026-09-17.
1182
1328
 
@@ -1200,7 +1346,7 @@ Agents
1200
1346
  points at `saffron status`. Run `npx saffron init` again to refresh both
1201
1347
  in a project.
1202
1348
 
1203
- ## 0.5.6
1349
+ ## 0.5.6: Fewer false duplicate wordings
1204
1350
 
1205
1351
  Released 2026-09-17.
1206
1352
 
@@ -1211,7 +1357,7 @@ Runner
1211
1357
  duplicate wordings; steps are compared by their quote-generalised
1212
1358
  pattern.
1213
1359
 
1214
- ## 0.5.5
1360
+ ## 0.5.5: Duplicate wordings proven by behaviour
1215
1361
 
1216
1362
  Released 2026-09-17.
1217
1363
 
@@ -1223,7 +1369,7 @@ Runner
1223
1369
  "enter X in the username field" against "enter Y in the password
1224
1370
  field", which are different steps.
1225
1371
 
1226
- ## 0.5.4
1372
+ ## 0.5.4: saffron status for the IDE panels
1227
1373
 
1228
1374
  Released 2026-09-17.
1229
1375
 
@@ -1243,7 +1389,7 @@ Editors
1243
1389
  Health sections and an in-editor dashboard. All read
1244
1390
  `saffron status --json`.
1245
1391
 
1246
- ## 0.5.3
1392
+ ## 0.5.3: Cost by how you pay, and running from JetBrains
1247
1393
 
1248
1394
  Released 2026-09-17.
1249
1395
 
@@ -1284,7 +1430,7 @@ Editors
1284
1430
  extension, the last run's totals with the report one click away, and
1285
1431
  the proposals pending review with Accept all.
1286
1432
 
1287
- ## 0.5.2
1433
+ ## 0.5.2: Scenario Outlines record correctly
1288
1434
 
1289
1435
  Released 2026-09-15.
1290
1436
 
@@ -1313,7 +1459,7 @@ Editors
1313
1459
  hover says where it is defined and never shows the value. In the VS
1314
1460
  Code extension and in `saffron lsp` for JetBrains and other editors.
1315
1461
 
1316
- ## 0.5.1
1462
+ ## 0.5.1: The example suite in .saffron files
1317
1463
 
1318
1464
  Released 2026-09-14.
1319
1465
 
@@ -1330,7 +1476,7 @@ Editors
1330
1476
  parameters instead of the whole step line. Ships in the VS Code
1331
1477
  extension, the JetBrains plugin and the package's TextMate bundle.
1332
1478
 
1333
- ## 0.5.0
1479
+ ## 0.5.0: Guided first run
1334
1480
 
1335
1481
  Released 2026-09-14.
1336
1482
 
@@ -1343,7 +1489,7 @@ Runner
1343
1489
  matching `saffron.config.json` with `retries: 1`. Only installs into an
1344
1490
  empty `features/` directory. Documented as "Your first run".
1345
1491
 
1346
- ## 0.4.2
1492
+ ## 0.4.2: Recover from a wrong recording
1347
1493
 
1348
1494
  Released 2026-09-13.
1349
1495
 
@@ -1375,7 +1521,7 @@ Docs and site
1375
1521
  - Assertion policy documented on the Features page; cache lifecycle gained
1376
1522
  the staleness and wrong-recording stages.
1377
1523
 
1378
- ## 0.4.1
1524
+ ## 0.4.1: JetBrains plugin
1379
1525
 
1380
1526
  Released 2026-09-13.
1381
1527
 
@@ -1397,7 +1543,7 @@ Editors
1397
1543
  - VS Code extension 0.1.3: plain punctuation in README, hover and
1398
1544
  diagnostic messages.
1399
1545
 
1400
- ## 0.4.0
1546
+ ## 0.4.0: Agent skill for AI assistants
1401
1547
 
1402
1548
  Released 2026-09-13.
1403
1549
 
@@ -1423,13 +1569,13 @@ Editors
1423
1569
  - VS Code extension 0.1.2: warning and quick fix when a set name is written
1424
1570
  without the `StepSet` keyword.
1425
1571
 
1426
- ## 0.3.1
1572
+ ## 0.3.1: Version fix
1427
1573
 
1428
1574
  Released 2026-08-15.
1429
1575
 
1430
1576
  - `saffron --version` no longer reports a hardcoded value.
1431
1577
 
1432
- ## 0.3.0
1578
+ ## 0.3.0: Network-aware steps
1433
1579
 
1434
1580
  Released 2026-08-12.
1435
1581
 
@@ -1451,7 +1597,7 @@ Editors
1451
1597
 
1452
1598
  - VS Code extension 0.1.0 published to the Marketplace.
1453
1599
 
1454
- ## 0.2.0
1600
+ ## 0.2.0: Secrets, cross-browser and parallel replay
1455
1601
 
1456
1602
  Released 2026-07-19.
1457
1603
 
@@ -1467,7 +1613,7 @@ Runner
1467
1613
  workers (`--workers N`), and a cheaper model for heal sessions
1468
1614
  (`--heal-model`).
1469
1615
 
1470
- ## 0.1.0
1616
+ ## 0.1.0: First public release
1471
1617
 
1472
1618
  Released 2026-07-10.
1473
1619
 
package/README.md CHANGED
@@ -76,6 +76,7 @@ node dist/cli/index.js -p examples accept --all
76
76
  | `saffron run [paths] [--headed] [--filter expr] [--rerecord] [--no-agent] [--strict] [--browser b] [--no-hooks] [--workers n] [--heal-model m] [--no-verify] [--no-reuse] [--model m] [--storage-state f] [--trace mode]` | Run features. Cached replays are deterministic; misses/failures escalate to the agent (unless `--no-agent`). Replay cross-browser with `--browser firefox\|webkit`, parallelize with `--workers N`, heal on a cheaper model with `--heal-model`, keep an execution trace with `--trace retain-on-failure`. Exit 1 on red (and on yellow with `--strict`). |
77
77
  | `saffron accept [files... \| --all] [--include-unverified] [--with-feature-edit] [--propagate]` | Promote cache proposals to committed caches (`--all` skips UNVERIFIED ones unless `--include-unverified`); `--with-feature-edit` also rewrites the adapted steps in the `.feature` file (and keeps the cache in sync); `--propagate` applies the heal's locator fixes to every other cache using the same locator. One heal repairs N scenarios before they ever fail. No args: list pending proposals. |
78
78
  | `saffron reject [files... \| --all]` | Discard proposals; the agent will try again next run. |
79
+ | `saffron export [-o file] [--branch name]` / `saffron runs` / `saffron import <bundles...> \| --run <id>` | Carry a CI heal to your machine: export packs the run's proposals, report, screenshots and traces into one bundle for CI to upload; `runs` lists the branch's CI runs (GitHub Actions or Azure Pipelines); import (of a file, or of a run with `--run`) checks the bundle against your checkout (repository, each proposal's binding) and files it there, ready for `saffron diff` and `saffron accept`. `--branch` also has CI commit the proposals to a new branch and open a draft pull request with their diffs. |
79
80
  | `saffron status [--json]` | Project overview for people, IDE panels and dashboards: feature files and scenarios with cache state, tags, pending proposals, last run, history, vocabulary health (divergent steps, duplicate wordings proven by identical recordings), effective config. |
80
81
  | `saffron steps [search] [--json] [--snippets]` | List/search the step vocabulary (files + caches) with recorded/divergent/unrecorded badges and usage; `--snippets` writes `.vscode/saffron.code-snippets` for native VS Code completion. |
81
82
  | `saffron mcp` | Serve the vocabulary and the project overview to AI assistants over stdio MCP (`search_steps`, `list_step_sets`, `project_status`), e.g. `claude mcp add saffron -- npx saffron mcp`. |