recovery-probe 0.4.0-preview.4 → 0.4.0
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 +17 -0
- package/README.md +2 -2
- package/docs/ci.md +1 -1
- package/docs/desktop.md +2 -2
- package/docs/ipc.md +3 -3
- package/docs/observe.md +5 -5
- package/docs/repair.md +3 -3
- package/docs/start.md +3 -3
- package/package.json +2 -2
- package/src/repair.mjs +19 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ 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 (2026-10-16)
|
|
8
|
+
|
|
9
|
+
The first stable release since 0.3.0. It contains 0.4.0-preview.1 to preview.5; their entries below have the details.
|
|
10
|
+
|
|
11
|
+
- **Observation:** record configured user actions and tracked row states. `DELAYED_UI_UPDATE` reports a row state that lags behind data the app already received. `observe --steps` runs explicit navigations, clicks and waits during a capture. The development IPC hook can count calls per method on shared channels and treat main-to-renderer pushes as data events.
|
|
12
|
+
- **Fixes:** `createFaultFetch` passes relative URLs through untouched. The IPC hook restores an app's own `webContents.send` wrapper after an observation. On Windows, repair proposals apply with Git's default line endings, and symlink sources are rejected.
|
|
13
|
+
- **Reports and checks:** HTML reports come from template files. CI checks formatting, lint and JavaScript types, and runs the repair pipeline on Windows.
|
|
14
|
+
- **Documentation:** a shorter README that leads with the demo, plus separate guides for the library API and the JSON-configured runner.
|
|
15
|
+
|
|
16
|
+
Upgrading from 0.3.0 needs no configuration or API changes. Restart a development app that loads the IPC hook, so the hook and the CLI come from the same version.
|
|
17
|
+
|
|
18
|
+
## 0.4.0-preview.5 (2026-10-16)
|
|
19
|
+
|
|
20
|
+
- Repair on Windows: the isolated checkout now holds the committed bytes instead of the CRLF line endings Git for Windows writes by default. A multi-line proposal with LF line breaks previously failed with "find text must match exactly once". `eol` rules in `.gitattributes` still apply.
|
|
21
|
+
- Repair on Windows: a committed symlink selected as a source is rejected again. Without symlink rights, Git for Windows checks it out as a plain file, which passed the old check; sources are now checked against the index.
|
|
22
|
+
- CI runs the repair pipeline on Windows.
|
|
23
|
+
|
|
7
24
|
## 0.4.0-preview.4 (2026-10-15)
|
|
8
25
|
|
|
9
26
|
- `createFaultFetch` passes relative URLs, such as `fetch('/api/x')`, to the supplied fetch untouched. Previously they threw `Invalid URL`.
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ The package includes a deliberately broken app and a corrected one. Both pass th
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
mkdir recovery-probe-tools && cd recovery-probe-tools
|
|
21
|
-
npm install --save-dev --save-exact recovery-probe@0.
|
|
21
|
+
npm install --save-dev --save-exact recovery-probe@0.4.0 playwright@1.62.1
|
|
22
22
|
npx playwright install chromium
|
|
23
23
|
npx recovery-probe --demo
|
|
24
24
|
```
|
|
@@ -77,7 +77,7 @@ If no request matches, `withFault` throws `FAULT_NOT_TRIGGERED` instead of letti
|
|
|
77
77
|
|
|
78
78
|
## Install
|
|
79
79
|
|
|
80
|
-
**0.
|
|
80
|
+
**0.4.0** is the stable release on npm's `latest` channel, and the commands above pin it for reproducible reports. Prereleases use the `next` channel and are opt-in.
|
|
81
81
|
|
|
82
82
|
Use Node.js 22 or newer. A separate tools folder keeps the tester out of your application's production dependencies. Browser and desktop commands need Playwright; attached targets use their existing browser runtime. If a version is not on npm yet, use the [source installation](CONTRIBUTING.md#install-an-unpublished-source-preview): a GitHub merge alone does not publish the package. See [CHANGELOG.md](CHANGELOG.md) for version history.
|
|
83
83
|
|
package/docs/ci.md
CHANGED
|
@@ -60,6 +60,6 @@ jobs:
|
|
|
60
60
|
|
|
61
61
|
## Adapt it to an application
|
|
62
62
|
|
|
63
|
-
Install `recovery-probe@0.
|
|
63
|
+
Install `recovery-probe@0.4.0` and your compatible Playwright runtime. Copy the example's orchestration pattern into your test suite, replace the synthetic server startup with your authorized test application, choose one read-only request and specify the expected recovery action and result. Keep the healthy control, bounded fault count, cleanup, inconclusive outcomes and process exit checks. Run the normal gate against the current app; the deliberately broken variant belongs only in a synthetic verification fixture.
|
|
64
64
|
|
|
65
65
|
This example provides local/CI execution and artifacts. It does not post PR comments, upload to a hosted Recovery Probe service or infer what your product ought to display.
|
package/docs/desktop.md
CHANGED
|
@@ -38,8 +38,8 @@ Install the exact version in a separate tester folder:
|
|
|
38
38
|
mkdir recovery-probe-desktop-test
|
|
39
39
|
cd recovery-probe-desktop-test
|
|
40
40
|
npm init -y
|
|
41
|
-
npm view recovery-probe@0.
|
|
42
|
-
npm install --save-dev --save-exact recovery-probe@0.
|
|
41
|
+
npm view recovery-probe@0.4.0 version
|
|
42
|
+
npm install --save-dev --save-exact recovery-probe@0.4.0 playwright@1.62.1
|
|
43
43
|
npx recovery-probe desktop --list
|
|
44
44
|
```
|
|
45
45
|
|
package/docs/ipc.md
CHANGED
|
@@ -12,8 +12,8 @@ Node 22+ is required for the CLI. Electron 29's bundled Node can load the small
|
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
mkdir -p recovery-probe-tools && cd recovery-probe-tools
|
|
15
|
-
npm view recovery-probe@0.
|
|
16
|
-
npm install --save-dev --save-exact recovery-probe@0.
|
|
15
|
+
npm view recovery-probe@0.4.0 version
|
|
16
|
+
npm install --save-dev --save-exact recovery-probe@0.4.0 playwright@1.62.1
|
|
17
17
|
node -p "require.resolve('recovery-probe/ipc')"
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -116,7 +116,7 @@ Exit codes: 0 all checks plus cleanup passed; 1 an observed recovery failure; 2
|
|
|
116
116
|
|
|
117
117
|
## Inspector reliability and uncertain replies
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
The inspector evaluates synchronous controls without `awaitPromise`. Window identification uses a retained remote Promise followed by `Runtime.awaitPromise`, then releases its object group. This avoids the observed Electron main-process `Promise was collected` failure for implicit awaiting of plain values.
|
|
120
120
|
|
|
121
121
|
A failed `begin` reply does not prove that arming failed. The checker records the ID before sending, attempts reset by that ID even on protocol errors, and independently reads back `armed: null`. It never retries begin or uses an unscoped reset to clear another run. If the inspector is unavailable or a plan remains armed, cleanup is unverified: stop the test app rather than continue. The hook's TTL remains a fallback, not a claim that cleanup succeeded. A protocol failure produces no application recovery verdict.
|
|
122
122
|
|
package/docs/observe.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Observe reads without resetting the app
|
|
2
2
|
|
|
3
|
-
Available
|
|
3
|
+
Available since **0.3.0**. Install an exact version and verify the CLI:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install --save-dev --save-exact recovery-probe@0.
|
|
6
|
+
npm install --save-dev --save-exact recovery-probe@0.4.0 playwright@1.62.1
|
|
7
7
|
npx recovery-probe --version
|
|
8
8
|
```
|
|
9
9
|
|
|
@@ -97,7 +97,7 @@ The browser tests include unchanged content after a failed refresh, changed cont
|
|
|
97
97
|
|
|
98
98
|
### Later samples after a comparison
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Since 0.3.0, each retained comparison also has `followUp` evidence from later completed samples in the **same operator interval**. The original `result`, `before` and `after` remain unchanged. Follow-up compares with the original `before` baseline, not the first return sample:
|
|
101
101
|
|
|
102
102
|
- `samples`, `comparableSamples` and `unavailableSamples` count later samples, including unchanged samples omitted from the timeline.
|
|
103
103
|
- `firstBaselineMatch` records the first later sample matching the baseline, or null. It records an observation, not an exact transition time.
|
|
@@ -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
|
|
111
|
+
Available since **0.4.0**. The development IPC hook must come from the same version as the CLI; restart the app after upgrading.
|
|
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
|
|
|
@@ -206,7 +206,7 @@ A document reload/navigation ends capture as incomplete because the renderer sta
|
|
|
206
206
|
|
|
207
207
|
## Supported inspector API
|
|
208
208
|
|
|
209
|
-
Advanced scripts can use `recovery-probe/ipc-inspector
|
|
209
|
+
Advanced scripts can use `recovery-probe/ipc-inspector`, available since 0.3.0, without importing private `src/` paths:
|
|
210
210
|
|
|
211
211
|
```js
|
|
212
212
|
import { randomUUID } from 'node:crypto';
|
package/docs/repair.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Web and Electron repair (experimental)
|
|
2
2
|
|
|
3
|
-
The opt-in repair workflow
|
|
3
|
+
The opt-in repair workflow has been included since 0.3.0 and remains experimental. For recovery testing without source upload or model credentials, use [guided start](start.md).
|
|
4
4
|
|
|
5
5
|
## What it actually does
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ Node 22+, Git and Playwright Chromium are required. You do not have to modify yo
|
|
|
22
22
|
mkdir recovery-probe-tools
|
|
23
23
|
cd recovery-probe-tools
|
|
24
24
|
npm init -y
|
|
25
|
-
npm install --save-dev recovery-probe@0.
|
|
25
|
+
npm install --save-dev recovery-probe@0.4.0 playwright@1.62.1
|
|
26
26
|
npx playwright install chromium
|
|
27
27
|
npx recovery-probe --version
|
|
28
28
|
```
|
|
@@ -75,7 +75,7 @@ These `web`/`desktop` checks never call an AI provider. Read their local reports
|
|
|
75
75
|
|
|
76
76
|
## Configure a repair run
|
|
77
77
|
|
|
78
|
-
The repair runner must launch a **separate build from its own checkout**, not attach to the existing app. Stop whatever is using the configured test port. Commit or stash all changes, including untracked files, in the source repository first. Ignored `.env` files, dependencies and local credentials are not copied into the checkout. Use a disposable dev environment with nonproduction settings. Your configured setup commands must prepare whatever that build needs; secret environment variables are not inherited automatically.
|
|
78
|
+
The repair runner must launch a **separate build from its own checkout**, not attach to the existing app. Stop whatever is using the configured test port. Commit or stash all changes, including untracked files, in the source repository first. Ignored `.env` files, dependencies and local credentials are not copied into the checkout. The checkout holds the committed bytes: Git line-ending conversion is off there, so on Windows its files keep LF line endings where your working tree has CRLF. `eol` rules in `.gitattributes` still apply. Use a disposable dev environment with nonproduction settings. Your configured setup commands must prepare whatever that build needs; secret environment variables are not inherited automatically.
|
|
79
79
|
|
|
80
80
|
Create `portal-repair.json` in the tools folder, outside the app repository:
|
|
81
81
|
|
package/docs/start.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Guided start
|
|
2
2
|
|
|
3
|
-
This workflow is
|
|
3
|
+
This workflow is available since 0.3.0. See the [README](../README.md) for installation and supported application paths.
|
|
4
4
|
|
|
5
5
|
Start your app using its normal development command. Recovery Probe does not need its repository or production dependencies. Node 22+ is required. Use a development/test account and backend: a locally running app can still call remote services.
|
|
6
6
|
|
|
@@ -10,8 +10,8 @@ Install the exact npm version after confirming availability:
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
mkdir recovery-probe-tools && cd recovery-probe-tools
|
|
13
|
-
npm view recovery-probe@0.
|
|
14
|
-
npm install --save-dev --save-exact recovery-probe@0.
|
|
13
|
+
npm view recovery-probe@0.4.0 version
|
|
14
|
+
npm install --save-dev --save-exact recovery-probe@0.4.0 playwright@1.62.1
|
|
15
15
|
npx recovery-probe start web http://localhost:3000
|
|
16
16
|
```
|
|
17
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recovery-probe",
|
|
3
|
-
"version": "0.4.0
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Test whether web and Electron desktop apps show the right data.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"access": "public",
|
|
96
|
-
"tag": "
|
|
96
|
+
"tag": "latest"
|
|
97
97
|
},
|
|
98
98
|
"keywords": [
|
|
99
99
|
"playwright",
|
package/src/repair.mjs
CHANGED
|
@@ -336,11 +336,18 @@ export async function prepareRepair(
|
|
|
336
336
|
await mkdir(dir, { mode: 0o700 }) // Never overwrite or reuse a run.
|
|
337
337
|
const baseCommit = (await git(repo, ['rev-parse', 'HEAD'])).trim()
|
|
338
338
|
const workspace = join(dir, 'checkout')
|
|
339
|
+
// Check out the committed bytes, whatever this machine's Git converts. Git for Windows
|
|
340
|
+
// writes CRLF by default, and a model's multi-line edit with LF breaks would not match.
|
|
341
|
+
// Explicit eol attributes in .gitattributes still apply.
|
|
339
342
|
await git(dir, [
|
|
340
343
|
'clone',
|
|
341
344
|
'--local',
|
|
342
345
|
'--no-hardlinks',
|
|
343
346
|
'--no-checkout',
|
|
347
|
+
'--config',
|
|
348
|
+
'core.autocrlf=false',
|
|
349
|
+
'--config',
|
|
350
|
+
'core.eol=lf',
|
|
344
351
|
'--',
|
|
345
352
|
repo,
|
|
346
353
|
workspace,
|
|
@@ -349,7 +356,18 @@ export async function prepareRepair(
|
|
|
349
356
|
await git(workspace, ['remote', 'remove', 'origin']) // No accidental push target.
|
|
350
357
|
const sources = []
|
|
351
358
|
for (const path of config.sourceFiles) {
|
|
352
|
-
|
|
359
|
+
// The index says what a path is. Without symlink rights, Git for Windows checks out
|
|
360
|
+
// a committed symlink as a plain file holding the link text.
|
|
361
|
+
const [mode] = (
|
|
362
|
+
await git(workspace, [
|
|
363
|
+
'ls-files',
|
|
364
|
+
'--stage',
|
|
365
|
+
'--error-unmatch',
|
|
366
|
+
'--',
|
|
367
|
+
path,
|
|
368
|
+
])
|
|
369
|
+
).split(' ')
|
|
370
|
+
if (mode === '120000') throw new Error('Source symlinks are not allowed')
|
|
353
371
|
const content = await sourceFile(workspace, path)
|
|
354
372
|
sources.push({ path, content, sha256: sha(content) })
|
|
355
373
|
}
|