recovery-probe 0.4.0-preview.2 → 0.4.0-preview.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
@@ -4,6 +4,11 @@ All notable changes to Recovery Probe are documented here. The project follows [
4
4
 
5
5
  Version 0.2.0 is the first npm release. Earlier 0.1.x revisions were repository-only prototypes.
6
6
 
7
+ ## 0.4.0-preview.3 (2026-10-15)
8
+
9
+ - Restore an existing instance-level `webContents.send` (for example an app's tracing wrapper) when an observation ends or the hook is disposed, instead of deleting it. Previously that wrapper was lost and later pushes bypassed it. A wrapper installed after the observation began is left in place.
10
+ - Broaden the project description: recovery after failed reads, cached content, and screens that lag behind their data. Observation and `DELAYED_UI_UPDATE` remain fault-free leads, not verdicts.
11
+
7
12
  ## 0.4.0-preview.2 (2026-10-15)
8
13
 
9
14
  - Apply consistent Prettier formatting and add formatting, ESLint and JavaScript type checks to CI.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Recovery Probe
2
2
 
3
- **Test how web and desktop applications recover when data reads fail—during loading and refresh.**
3
+ **Test whether web and desktop apps show the right data: recovery after failed reads, cached content, and screens that lag behind their data.**
4
4
 
5
- Recovery Probe injects bounded faults, compares healthy and faulted screens, and records whether content survives or returns. It helps developers and coding agents reproduce recovery problems such as disappearing lists, stuck loading states and missing retries. Installing the package does not add recovery behavior to your application.
5
+ Recovery Probe works in two ways. It injects bounded faults into data reads, compares healthy and faulted screens, and records whether content survives or returns. It also observes reads and the screen without any fault, timing what the user sees after an action against the data the app has already received. It helps developers and coding agents reproduce problems such as disappearing lists, stuck loading states, missing retries, content served from a cache and row states that stay stale after fresh data arrives. Installing the package does not add recovery behavior to your application.
6
6
 
7
7
  [![CI](https://github.com/BojanKovachki/recovery-probe/actions/workflows/validate.yml/badge.svg)](https://github.com/BojanKovachki/recovery-probe/actions/workflows/validate.yml)
8
8
  [![npm](https://img.shields.io/npm/v/recovery-probe.svg)](https://www.npmjs.com/package/recovery-probe)
@@ -16,6 +16,7 @@ Recovery Probe injects bounded faults, compares healthy and faulted screens, and
16
16
  | Electron desktop apps using renderer HTTP | The same request and UI checks | Attach through a loopback debugging endpoint |
17
17
  | Electron desktop apps using IPC reads | Renderer behavior after selected IPC rejections or null results | Add a development-only handler-registration hook and enable local inspection |
18
18
  | JavaScript code using fetch | Recovery logic around an explicitly supplied fetch wrapper | Import `recovery-probe/fetch`; Playwright is not required |
19
+ | Web and Electron apps, without faults | Selected reads, cached content and tracked row states after user actions, including delayed UI updates | Attach as above; IPC observation uses the same development hook |
19
20
 
20
21
  Desktop support currently means Electron, not arbitrary native applications. IPC faults do not exercise native/Rust networking, HTTP status handling or token refresh. An unsupported data path is inconclusive, never a successful recovery check.
21
22
 
@@ -32,7 +33,7 @@ npx recovery-probe --version
32
33
 
33
34
  If the version check reports that the version is unavailable, npm publication is still pending; use the [source installation](CONTRIBUTING.md#install-an-unpublished-source-preview). A GitHub merge alone does not publish the package. Use Node.js 22 or newer. A separate tools folder keeps the tester out of your application's production dependencies. Browser/desktop commands require Playwright; attached targets use their existing browser runtime. The guided web flow downloads Chromium when needed. See [CHANGELOG.md](CHANGELOG.md) for version history.
34
35
 
35
- For the 0.4 observation preview, install `recovery-probe@0.4.0-preview.2` (the `next` channel) with the same Playwright version. Preview.2 adds formatting, lint and implementation type checks; the action/row observation features were introduced in preview.1.
36
+ For the 0.4 observation preview, install `recovery-probe@0.4.0-preview.3` (the `next` channel) with the same Playwright version. Preview.3 restores an app's own `webContents.send` wrapper after an observation and updates the project description; preview.2 added formatting, lint and implementation type checks; the action/row observation features were introduced in preview.1.
36
37
 
37
38
  ## Choose a workflow
38
39
 
@@ -229,7 +230,7 @@ Runs the baseline and the three default recovery checks used by the JSON CLI. Fo
229
230
 
230
231
  ## Scope
231
232
 
232
- Recovery Probe deliberately focuses on deterministic request-level recovery checks. It does not simulate whole-device offline states, WebSocket interruptions, token expiry, browser sleep, slow-network profiles, or duplicate-submission safety.
233
+ Recovery Probe focuses on deterministic request-level recovery checks and on fault-free observation of whether the screen reflects the reads it received. It does not simulate whole-device offline states, WebSocket interruptions, token expiry, browser sleep, slow-network profiles, or duplicate-submission safety. Observation findings such as `DELAYED_UI_UPDATE` are leads that need review against the application logic, not verdicts: read contents are never recorded.
233
234
 
234
235
  Playwright already provides the routing primitives used here. Recovery Probe adds bounded recipes, fault-occurrence verification, cleanup, consistent result codes, a fetch adapter, and a runnable broken-versus-fixed example. If a few direct `page.route()` calls are clearer for your test, use them; this package is most useful when teams want the recovery pattern to be repeatable.
235
236
 
package/docs/observe.md CHANGED
@@ -108,7 +108,7 @@ Tracking ends at the next operator interval or capture termination, including in
108
108
 
109
109
  ## Actions, tracked rows and delayed UI updates
110
110
 
111
- Available from **0.4.0-preview.1**. The current preview target is **0.4.0-preview.2** on npm `next`; install it explicitly with `npm install --save-dev --save-exact recovery-probe@0.4.0-preview.2 playwright@1.62.1`. The development IPC hook must come from the same version.
111
+ Available from **0.4.0-preview.1**. The current preview target is **0.4.0-preview.3** on npm `next`; install it explicitly with `npm install --save-dev --save-exact recovery-probe@0.4.0-preview.3 playwright@1.62.1`. The development IPC hook must come from the same version.
112
112
 
113
113
  These options are opt-in and extend the same fault-free capture. They answer "how long after the user's action did the screen show the right state, and did data arrive before it?"
114
114
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "recovery-probe",
3
- "version": "0.4.0-preview.2",
3
+ "version": "0.4.0-preview.3",
4
4
  "type": "module",
5
- "description": "Test recovery from failed reads in web and Electron desktop apps, during loading and refresh.",
5
+ "description": "Test whether web and Electron desktop apps show the right data: recovery after failed reads, cached content, and screens that lag behind their data.",
6
6
  "license": "MIT",
7
7
  "author": "Bojan Kovachki",
8
8
  "homepage": "https://github.com/BojanKovachki/recovery-probe#readme",
@@ -104,7 +104,10 @@
104
104
  "fetch",
105
105
  "electron",
106
106
  "ipc",
107
- "refresh"
107
+ "refresh",
108
+ "observation",
109
+ "ui-state",
110
+ "cache"
108
111
  ],
109
112
  "scripts": {
110
113
  "format": "prettier --write .",
package/src/ipc-probe.cjs CHANGED
@@ -128,18 +128,23 @@ exports.installIpcProbe = function installIpcProbe(
128
128
  }
129
129
  const unwrapSend = () => {
130
130
  if (!wrappedSend) return
131
- const { contents, wrapper } = wrappedSend
132
- // Only remove our own instance property; the prototype method stays untouched.
131
+ const { contents, wrapper, previous } = wrappedSend
132
+ // Undo only our own change: restore an instance-level send that existed before the
133
+ // lease (for example an app's tracing wrapper), or remove ours to expose the prototype
134
+ // method again. A wrapper installed after ours stays; ours then only passes calls through.
133
135
  if (
134
136
  !contents.isDestroyed?.() &&
135
137
  Object.hasOwn(contents, 'send') &&
136
138
  contents.send === wrapper
137
- )
138
- delete contents.send
139
+ ) {
140
+ if (previous) Object.defineProperty(contents, 'send', previous)
141
+ else delete contents.send
142
+ }
139
143
  wrappedSend = null
140
144
  }
141
145
  const wrapSend = (contents, current) => {
142
146
  if (!allowedPushes.size || typeof contents?.send !== 'function') return
147
+ const previous = Object.getOwnPropertyDescriptor(contents, 'send')
143
148
  const send = contents.send
144
149
  const wrapper = function (channel, ...args) {
145
150
  if (
@@ -172,7 +177,7 @@ exports.installIpcProbe = function installIpcProbe(
172
177
  configurable: true,
173
178
  writable: true,
174
179
  })
175
- wrappedSend = { contents, wrapper }
180
+ wrappedSend = { contents, wrapper, previous }
176
181
  }
177
182
  const disarm = () => {
178
183
  clearTimeout(timer)