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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saffron-ai",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "AI-fallback test runner for end-to-end tests written in plain language: zero-token cached replay, runtime AI healing, honest reports",
5
5
  "scripts": {
6
6
  "test": "vitest run",
@@ -142,6 +142,7 @@ npx saffron accept <file> [<file>...] # promote chosen ones
142
142
  npx saffron reject <file> [<file>...] # discard chosen ones; the agent retries next run
143
143
  npx saffron report # open the HTML report
144
144
  npx saffron run --rerecord --filter @t # a recording is wrong: record it fresh
145
+ npx saffron runs # this branch's CI runs; a heal made there: saffron import --run <id>
145
146
  ```
146
147
 
147
148
  Results: **green** = cached pass · **yellow** = pending review (an AI
@@ -168,6 +169,15 @@ unless deliberately authoring a manual cache (`"recordedBy": "manual"`).
168
169
  To change behavior, change the `.feature`/`.saffron` text and let the run
169
170
  re-record (mostly seeded from existing step recordings).
170
171
 
172
+ **Review a CI heal.** A heal made in CI travels as a bundle (`saffron
173
+ export` in the workflow, uploaded as an artifact). On the reviewer's
174
+ checkout, `saffron runs` lists the branch's CI runs and `saffron import
175
+ --run <id>` (or `saffron import <bundle>`) files the run's proposals,
176
+ report and traces here, each checked against this checkout; then
177
+ `saffron diff`, `saffron accept` and commit `.saffron/cache/` as usual.
178
+ With `saffron export --branch <name>` CI pushes the proposals as a branch
179
+ with a draft pull request instead: switch to it, accept, commit, push.
180
+
171
181
  ## Anti-patterns that cost money or hide bugs
172
182
 
173
183
  | Don't | Do |
@@ -63,13 +63,14 @@ your-project/
63
63
  | `provider` | Whose agent records and heals, on its login on this machine: `claude` (default), `codex` (ChatGPT plan), `antigravity` (Google AI Pro/Ultra via the `agy` CLI, experimental), `cursor`. Also `--provider` |
64
64
  | `model` | Model in the provider's own names (unset: the provider's default). A `--provider` run on another provider ignores it |
65
65
  | `healModel` | Cheaper model for heal sessions only |
66
+ | `ci` | Where `saffron runs` and `import --run` find CI runs: `{"provider": "github" \| "azure", "organization": ..., "project": ...}`. Unset, an Azure Repos remote means Azure Pipelines (through `az`), anything else GitHub Actions (through `gh`). `organization` and `project` are for a GitHub repository built by Azure Pipelines |
66
67
 
67
68
  ## CLI
68
69
 
69
70
  | Command | Purpose |
70
71
  |---|---|
71
72
  | `saffron run [paths] [--filter @tag] [--no-agent] [--strict] [--browser b] [--workers n] [--shard i/n] [--shard-by scenario\|file] [--provider p] [--heal-model m] [--headed] [--trace mode]` | Run; cached replay, agent on misses/failures. `--shard 2/4` runs one part of the suite on one CI machine and writes `shard-2-of-4.json` instead of `latest.json`; `--trace retain-on-failure` keeps an execution trace of each scenario that is not green |
72
- | `saffron trace [scenario] [--port n] [--no-open] [--json]` | Open the execution replay of a scenario from the last run (scenario name, feature path or `feature:scenario`; default: every traced scenario in one replay, opening on a red one, else a yellow one); `--json` prints the parsed trace |
73
+ | `saffron trace [scenario] [--port n] [--no-open] [--json] [--run startedAt]` | Open the execution replay of a scenario from the last run (scenario name, feature path or `feature:scenario`; default: every traced scenario in one replay, opening on a red one, else a yellow one); `--json` prints the parsed trace; `--run` opens it only while the last run is that one |
73
74
  | `saffron accept [files... \| --all] [--include-unverified] [--with-feature-edit] [--propagate]` | Promote proposals (`--all` skips UNVERIFIED ones unless `--include-unverified`); `--with-feature-edit` rewrites adapted steps in the feature file; `--propagate` applies a heal's locator fix to every cache using that locator |
74
75
  | `saffron reject [files... \| --all]` | Discard proposals |
75
76
  | `saffron prune [--yes] [--check] [--json]` | List recordings no scenario owns any more; `--yes` deletes them, `--check` exits 1 for CI |
@@ -80,9 +81,13 @@ your-project/
80
81
  | `saffron mcp` / `saffron lsp` | MCP tools (`search_steps`, `list_step_sets`, `project_status`) for AI assistants / language server for editors |
81
82
  | `saffron init [--examples] [--agents list]` | Install this skill into the project's agent directories, register MCP, add an AGENTS.md block, scaffold config; `--examples` adds the Saucedemo example suite |
82
83
  | `saffron report [--merge [paths]]` | Open the latest HTML report; `--merge` combines a complete set of shard reports into `latest.json`, `latest.html` and one history line |
84
+ | `saffron export [-o file] [--branch name [--base branch]]` | In CI: pack the pending proposals, the run's report, screenshots and traces into `.saffron/reports/saffron-bundle.zip` to upload as an artifact. `--branch` also pushes the proposals as a new branch and opens a draft pull request (GitHub through `gh`, Azure DevOps through `az`); exit 1 only when the branch is pushed but the pull request could not be opened |
85
+ | `saffron runs [--branch b] [--limit n] [--provider github\|azure] [--json]` | The branch's CI runs, with how many of each run's proposals are pending here; exit 2 when `gh` or `az` is missing or signed out |
86
+ | `saffron import <bundles...> \| --run <id> [--overwrite] [--allow-unknown-repository] [--json]` | Bring a CI run's bundle into this checkout: its proposals (each checked against the files here), report and traces. Then `saffron diff` and `saffron accept` as usual. Exit 1 when a proposal was not imported, 2 when the bundle was refused |
83
87
 
84
88
  Exit codes: 0 green/yellow, 1 red (or yellow with `--strict`), 2 usage /
85
- preflight (e.g. a missing `{env:VAR}`).
89
+ preflight (e.g. a missing `{env:VAR}`) or any expected failure, printed as
90
+ one line (`SAFFRON_DEBUG=1` shows the stack).
86
91
 
87
92
  ## AI access
88
93