@stacknext/regression 0.11.0 → 0.11.1

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/README.md CHANGED
@@ -13,6 +13,56 @@ npm install --save-dev @stacknext/cli @stacknext/next @stacknext/playwright
13
13
  npx stacknext capture --name baseline -- npx playwright test --workers=1
14
14
  ```
15
15
 
16
- This package is ESM-only and requires Node.js 20.9 or newer.
16
+ This package is normally consumed through the CLI and the optional Playwright
17
+ fixture. It does not run Playwright, start a collector or contact a remote
18
+ service.
19
+
20
+ ## Main concepts
21
+
22
+ | Concept | Purpose |
23
+ | --- | --- |
24
+ | `scenarioIdentity` | Stable `scn-...` id from an explicit annotation, test id or file/title/project fallback. |
25
+ | `verifyTraceCorrelation` | Accepts a sample only when the injected trace and a server span parented to the injected span exist. |
26
+ | `buildEnvironmentSnapshot` | Records Node.js, Next.js, OS, runtime, adapters, instrumentation, rule set and Playwright versions. |
27
+ | `compareEnvironments` | Lists environment differences before a comparison. |
28
+ | `compareBaseline` | Deterministic median/threshold comparison of a baseline and candidate. |
29
+ | `saveRun` / `saveBaseline` / `saveComparison` | Atomic local writes under `.stacknext`. |
30
+
31
+ Ids are strict: `run-<16 hex>`, `base-<16 hex>`, `cmp-<16 hex>`,
32
+ `scn-<16 hex>` and `smp-<16 hex>`.
33
+
34
+ ## Storage
35
+
36
+ Runs, baselines and comparisons live under
37
+ `.stacknext/{runs,baselines,comparisons}` with strict versioned schemas,
38
+ `0700`/`0600` permissions, atomic writes and a 16 MiB cap. Records are never
39
+ auto-deleted and are never uploaded.
40
+
41
+ ## Documentation
42
+
43
+ - [Package overview](docs/index.md)
44
+ - [Captures](docs/captures.md)
45
+ - [Comparisons](docs/comparisons.md)
46
+ - [Storage](docs/storage.md)
47
+
48
+ The `docs/` directory ships in the npm archive. Public guides live on the
49
+ [documentation site](https://github.com/marrrkkk/stacknext/tree/main/apps/docs).
50
+
51
+ ## AI agents
52
+
53
+ Agents should read `docs/comparisons.md` before explaining a result. Never
54
+ present a comparison as a statistical test or a confirmed cause. Report
55
+ `inconclusive` as inconclusive, and cite the environment differences and
56
+ correlation reasons.
57
+
58
+ ## Development
59
+
60
+ ```bash
61
+ pnpm --filter @stacknext/regression build
62
+ pnpm --filter @stacknext/regression typecheck
63
+ pnpm test
64
+ ```
65
+
66
+ The package is ESM-only and requires Node.js 20.9 or newer.
17
67
 
18
68
  License: MIT.
@@ -2,7 +2,7 @@ export declare const STACKNEXT_RUN_FORMAT = "stacknext-test-run";
2
2
  export declare const STACKNEXT_BASELINE_FORMAT = "stacknext-baseline";
3
3
  export declare const STACKNEXT_COMPARISON_FORMAT = "stacknext-comparison";
4
4
  export declare const STACKNEXT_REGRESSION_FORMAT_VERSION = 1;
5
- export declare const STACKNEXT_REGRESSION_ENGINE_VERSION = "0.11.0";
5
+ export declare const STACKNEXT_REGRESSION_ENGINE_VERSION = "0.11.1";
6
6
  export declare const RUN_STATUSES: readonly ["running", "completed", "failed", "interrupted", "incomplete"];
7
7
  export type RunStatus = (typeof RUN_STATUSES)[number];
8
8
  export declare const SAMPLE_STATUSES: readonly ["passed", "failed", "timedOut", "skipped", "interrupted"];
package/dist/constants.js CHANGED
@@ -2,7 +2,7 @@ export const STACKNEXT_RUN_FORMAT = 'stacknext-test-run';
2
2
  export const STACKNEXT_BASELINE_FORMAT = 'stacknext-baseline';
3
3
  export const STACKNEXT_COMPARISON_FORMAT = 'stacknext-comparison';
4
4
  export const STACKNEXT_REGRESSION_FORMAT_VERSION = 1;
5
- export const STACKNEXT_REGRESSION_ENGINE_VERSION = '0.11.0';
5
+ export const STACKNEXT_REGRESSION_ENGINE_VERSION = '0.11.1';
6
6
  export const RUN_STATUSES = [
7
7
  'running',
8
8
  'completed',
package/docs/captures.md CHANGED
@@ -88,5 +88,5 @@ stacknext capture --name candidate --quiet --json \
88
88
  stacknext compare <baseline-id> <candidate-run-id> --fail-on regression
89
89
  ```
90
90
 
91
- See the repository `docs/regression-testing.md` and
91
+ See the repository `apps/docs/regression-testing.md` and
92
92
  `@stacknext/playwright/docs/index.md`.
@@ -83,4 +83,4 @@ keys, 100 finding keys and 1,000 metrics per scenario.
83
83
  - No automatic pass/fail unless the CLI `--fail-on` flag matches.
84
84
 
85
85
  The full methodology is in
86
- the repository `docs/comparison-methodology.md`.
86
+ the repository `apps/docs/comparison-methodology.md`.
package/docs/storage.md CHANGED
@@ -72,4 +72,4 @@ diagnostic references, environment facts and a sanitized command snapshot.
72
72
  They never contain request/response bodies, headers, cookies, URL query values,
73
73
  SQL bind parameters, Playwright screenshots/video/trace archives or the
74
74
  collector token. The full boundary is in
75
- the repository `docs/privacy.md`.
75
+ the repository `apps/docs/privacy.md`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacknext/regression",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Deterministic Playwright-linked runtime regression capture for StackNext",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,8 +19,8 @@
19
19
  "./package.json": "./package.json"
20
20
  },
21
21
  "dependencies": {
22
- "@stacknext/core": "0.11.0",
23
- "@stacknext/diagnostics": "0.11.0",
22
+ "@stacknext/core": "0.11.1",
23
+ "@stacknext/diagnostics": "0.11.1",
24
24
  "zod": "4.6.7"
25
25
  },
26
26
  "engines": {