saffron-ai 0.8.3 → 0.8.4

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 (3) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/dist-pkg/cli.js +129 -125
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,119 @@ 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
5
  JetBrains plugin (`ai.saffron.jetbrains`). Dates are publish dates.
6
6
 
7
+ ## 0.8.4
8
+
9
+ Released 2026-09-24.
10
+
11
+ Runner
12
+
13
+ - **A check could point at the wrong element.** In a live heal the agent
14
+ recorded "the Morning Ritual package is applied" against `role=definition`
15
+ with no name. The booking summary has one definition per row, so replay
16
+ read the first one (the room) and the proof replay failed. `saffron_assert`
17
+ and `saffron_capture` now refuse a bare role unless it is one that occurs
18
+ once per page (`status`, `alert`, `dialog`, `main` and similar), and ask
19
+ the agent for a name, text, label or selector instead.
20
+ - **A baseURL's query string and path were lost on replay.** With
21
+ `baseURL` set to `http://localhost:5173/?flow=checkout-guest`, a recorded
22
+ visit to the start page replayed as `http://localhost:5173/`, silently
23
+ dropping the flag that picks the variant under test. A baseURL with a
24
+ path fared no better: under `http://host/app`, a cached `/rooms`
25
+ replayed as `http://host/rooms`, and a recorded `http://host/apple` was
26
+ cached as `/le`. Under `http://h/#/home`, a recorded visit to `/` with
27
+ no hash replayed back to `#/home`, a different page for a hash router;
28
+ it is now kept as `/#`, the way a missing query is kept as `?`.
29
+ The baseURL is now a prefix in both directions: cached
30
+ navigations keep its path and inherit its query, so a cache recorded
31
+ against `?flow=standard` replays against `--base-url
32
+ "...?flow=checkout-guest"`. A cached URL with a query of its own keeps
33
+ it, other origins stay untouched, and existing caches replay as before.
34
+ - **Heal summaries could describe a changed flow as a locator tweak.**
35
+ When an A/B variant folded the guest information page into checkout,
36
+ the heal was right (fields re-targeted, the "Continue to payment" click
37
+ dropped) but its note only said the selects were now found by label.
38
+ The heal prompt now asks the agent to name the kind of change (a locator
39
+ or label change, a page removed or merged, a page added or reordered)
40
+ and the page it happened on. Saffron also compares the healed recording
41
+ with the committed one and adds its own `flow change:` notes for any
42
+ click, key press, goto or tab move that was dropped or added, together
43
+ with the page replay stopped on. A renamed button still reads as a
44
+ locator change and adds no note.
45
+ - **Two data references holding the same value could bind a field to the
46
+ wrong one.** With `users.owner` and `users.recipient` both "Alice", the
47
+ recorder tokenized every typed "Alice" as the first reference, so a
48
+ recipient field read the owner. Change the recipient to "Bob" and the
49
+ scenario correctly went stale, but step reuse seeded the mis-bound
50
+ actions straight back and the proof replay agreed: verified, zero AI
51
+ calls, wrong field. The recorder now resolves an equal value by the
52
+ reference the step itself names, leaves the literal when the step names
53
+ both or neither (so the stale check catches it), and step reuse refuses
54
+ a step that names a reference its recording does not read.
55
+ - **The report could list `{unique:...}` values that were never typed.**
56
+ A recording seeded from earlier steps, and the proof replay of a pending
57
+ proposal, each drew their own seed while the report showed the values of
58
+ a third. One seed per scenario run now reaches every replay, recording
59
+ and proof, so the report's values are the ones in your application.
60
+ - **A second Ctrl-C during teardown exited before the cleanup finished.**
61
+ The first Ctrl-C started teardown; the next one fell through to Node's
62
+ default and killed the run on top of it. Saffron now answers it with a
63
+ note and keeps waiting.
64
+ - **Re-merging shards after a shard was re-run left the old result in
65
+ history.** The merge treated the run as already recorded and skipped it.
66
+ It now replaces that run's history line, and still never counts a run
67
+ twice. In CI the run is identified by the CI run id, the suite and the
68
+ base URL rather than by the earliest start time, so this holds whichever
69
+ shard was re-run; outside CI, `SAFFRON_RUN_ID` gives the same stability.
70
+ - **The proof replay of a recording reused the recording's `{unique:...}`
71
+ values.** Fixed alongside the report fix above: the proof is a second
72
+ execution, so creating the same record again failed, filed the proposal
73
+ unverified and paid for a refinement pass. Each proof now draws its own
74
+ values, and the report lists them separately from the recording's.
75
+ - **A heal or a refinement could redo earlier steps on the wrong tab and
76
+ file them under step 1.** When the agent takes over, it attaches to the
77
+ browser over CDP and sees every Saffron page as one tab list, starting
78
+ on the first. During a refinement the scenario's own page was still open
79
+ beside the proof replay's, so the agent started on the wrong page,
80
+ selected a tab, and in one run went back to the start page and redid the
81
+ search. Every action performed before its first `saffron_step` was filed
82
+ under step 1, and the merge adopted it over the recording replay had
83
+ already passed: proposals whose step 1 held only "switch to tab 1", or a
84
+ second copy of the search, and a proof replay that failed on them.
85
+ Saffron now closes the pages of other browser contexts before an agent
86
+ session, so the agent sees only the live tabs, and tells it which tab
87
+ replay left off on: the page replay was really acting on, not the newest
88
+ tab with a matching URL, which is a different page when two tabs share
89
+ one. A heal or refinement records nothing until the agent
90
+ announces the failed step: anything it clicks or navigates before that is
91
+ diagnosis and is discarded, and the prompt tells it to look with
92
+ snapshots instead. A seeded recording segment files early actions under
93
+ the first step it may record, never a step that already ran, and drops
94
+ an early tab selection. Actions the agent files under an already
95
+ completed step are discarded, and the merge keeps completed steps'
96
+ recordings whatever the session holds for them.
97
+ Each of these leaves a `recording:` note in the proposal's adaptations.
98
+ Fresh recordings from step 1 behave as before.
99
+ The live tab also follows the agent through a seeded recording: a tab
100
+ it selects, opens or closes in one segment is where the next seeded
101
+ island replays and the next segment starts, read from the browser
102
+ tool's own tab list rather than guessed from a URL.
103
+ - **A role with a text no longer matched any element showing that text.**
104
+ Role and text together now mean the element of that role that shows the
105
+ text, and nothing else.
106
+ - **Shards from different environments merged silently.** A staging shard
107
+ and a production shard combined into one report labelled with whichever
108
+ came first. The merge now refuses shards with different base URLs, by
109
+ name.
110
+
111
+ Editors (VS Code extension 0.2.9)
112
+
113
+ - **`{data:...}` diagnostics stayed stale after editing a data file.** The
114
+ extension watched feature files and caches but not the data folder or
115
+ `saffron.config.json`, so fixing a missing key in `users.json` left the
116
+ error on the feature until the feature itself was touched. Edits to data
117
+ files and to the config now refresh every open feature file, including a
118
+ custom data folder and environment overlays.
119
+
7
120
  ## 0.8.3
8
121
 
9
122
  Released 2026-09-22.