@gfdelarue/testkit 0.6.0 → 0.6.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 +455 -56
- package/bin/testkit-windows-owner-arm64.exe +0 -0
- package/bin/testkit-windows-owner-x64.exe +0 -0
- package/dist/app/bugs/batch.js +1 -0
- package/dist/app/bugs/ci-report.js +2 -2
- package/dist/app/bugs/ci-summary.js +3 -3
- package/dist/app/bugs/draft.js +2 -2
- package/dist/app/bugs/file.js +1 -1
- package/dist/app/bugs/guide.js +1 -1
- package/dist/app/bugs/record.js +1 -1
- package/dist/app/bugs/run-reading.js +1 -1
- package/dist/app/bugs/store.js +1 -1
- package/dist/app/campaigns/summary.js +1 -1
- package/dist/app/cleanup/index.js +1 -1
- package/dist/app/db-schema/prepare.js +1 -1
- package/dist/app/db-schema/refresh.js +1 -1
- package/dist/app/db-schema/verify.js +1 -1
- package/dist/app/destroy/index.js +1 -1
- package/dist/app/environments/config-driven.js +1 -1
- package/dist/app/environments/file-setup.js +1 -1
- package/dist/app/environments/routing.js +1 -1
- package/dist/app/environments/static-values.js +1 -1
- package/dist/app/environments/supplied.js +1 -1
- package/dist/app/lint/shared.js +1 -1
- package/dist/app/run/live-run.js +1 -1
- package/dist/app/run/orchestrator.js +1 -1
- package/dist/app/run/planning.js +1 -1
- package/dist/app/run/results.js +1 -1
- package/dist/app/run/run-finalization.js +1 -1
- package/dist/app/run/run-finisher.js +1 -0
- package/dist/app/run/setup/runtime-node-setup-protocol.js +1 -1
- package/dist/app/run/setup/runtime-node-setup-worker.js +1 -1
- package/dist/app/run/setup/runtime-node-setup.js +2 -2
- package/dist/app/status/runs.js +1 -1
- package/dist/app/stop/index.js +1 -1
- package/dist/app/tracker/index.js +1 -1
- package/dist/app/tracker/token.js +2 -2
- package/dist/app/typecheck/index.js +4 -4
- package/dist/cli/command-catalog.js +1 -1
- package/dist/cli/command-flags.js +1 -1
- package/dist/cli/commands/bug/file.js +3 -2
- package/dist/cli/framework/help.js +5 -5
- package/dist/cli/framework/parser.js +1 -1
- package/dist/cli/json-errors.js +1 -1
- package/dist/cli/renderers/bug/text.js +1 -1
- package/dist/cli/renderers/run/formatting.js +1 -1
- package/dist/config/loader/config-loader.js +1 -1
- package/dist/config/loader/discover-tests.js +1 -1
- package/dist/config/loader/discovery-result.js +1 -0
- package/dist/config/loader/index.js +1 -1
- package/dist/config/loader/runtime-isolation.js +1 -1
- package/dist/config/loader/skip-config.js +1 -1
- package/dist/config/loader/test-selection.js +1 -1
- package/dist/database/admin.js +5 -2
- package/dist/database/call-caps.js +1 -0
- package/dist/database/cleanup.js +1 -1
- package/dist/database/configured-steps.js +1 -1
- package/dist/database/constants.js +1 -1
- package/dist/database/docker-endpoint.js +1 -0
- package/dist/database/docker-metadata.js +2 -2
- package/dist/database/docker.js +5 -5
- package/dist/database/index.js +2 -1
- package/dist/database/lifecycle-cleanup.js +1 -1
- package/dist/database/local-postgres.js +4 -1
- package/dist/database/naming.js +1 -1
- package/dist/database/operation-deadline.js +1 -0
- package/dist/database/postgres/connection-check.js +1 -1
- package/dist/database/postgres/index.js +2 -2
- package/dist/database/postgres/owned-exec.js +27 -0
- package/dist/database/postgres/protocol.js +2 -2
- package/dist/database/provider.js +1 -0
- package/dist/database/roles.js +2 -2
- package/dist/database/schema-operations.js +5 -1
- package/dist/database/schema-source.js +3 -3
- package/dist/database/steps.js +1 -1
- package/dist/database/template-steps.js +4 -4
- package/dist/domain/suite-selection.js +1 -1
- package/dist/engines/adapters/evidence-files.js +1 -1
- package/dist/engines/adapters/execution.js +1 -1
- package/dist/engines/node-vitest/adapter/adapter.js +1 -1
- package/dist/engines/node-vitest/adapter/driver.js +2 -2
- package/dist/engines/node-vitest/runtime/runtime-input.js +1 -1
- package/dist/engines/playwright/adapter/adapter.js +1 -1
- package/dist/engines/playwright/adapter/browser-network-evidence.js +4 -0
- package/dist/engines/playwright/adapter/config.js +16 -6
- package/dist/engines/playwright/adapter/evidence.js +2 -1
- package/dist/engines/playwright/adapter/failure-details.js +2 -2
- package/dist/engines/playwright/adapter/reporter.js +1 -1
- package/dist/engines/playwright/runtime/browser-network.js +1 -0
- package/dist/engines/playwright/runtime/browser-traffic.js +1 -0
- package/dist/engines/playwright/runtime/chromium-environment.js +1 -0
- package/dist/engines/playwright/runtime/emulation.js +1 -0
- package/dist/engines/playwright/runtime/index.js +1 -1
- package/dist/engines/playwright/runtime/managed-test.js +1 -1
- package/dist/engines/playwright/runtime/runtime-input.js +2 -2
- package/dist/environment/lifecycle-controller.js +1 -1
- package/dist/environment/lifecycle.js +1 -1
- package/dist/environment/maintenance.js +1 -1
- package/dist/environment/run-environment.js +1 -1
- package/dist/environment/run-stopping.js +1 -1
- package/dist/environment/runtime-manager.js +1 -1
- package/dist/evidence/artifacts.js +5 -2
- package/dist/evidence/bundles.js +2 -1
- package/dist/evidence/compressed-artifacts.js +1 -0
- package/dist/evidence/environment-record.js +1 -1
- package/dist/evidence/index.js +1 -1
- package/dist/evidence/live-run-summary.js +1 -0
- package/dist/evidence/local-paths.js +1 -0
- package/dist/evidence/maintenance.js +1 -1
- package/dist/evidence/operation-timings.js +1 -1
- package/dist/evidence/redaction.js +4 -4
- package/dist/evidence/run-evidence.js +1 -0
- package/dist/evidence/setup-progress.js +1 -1
- package/dist/evidence/storage-inventory.js +1 -1
- package/dist/evidence/storage.js +2 -2
- package/dist/kernel/redaction-targets.js +1 -1
- package/dist/kernel/redaction.js +7 -4
- package/dist/process/engine-environment-keys.js +1 -0
- package/dist/process/environment-overlay.js +1 -1
- package/dist/process/environment.js +1 -1
- package/dist/process/execa-bundle.json +3 -3
- package/dist/process/files/evidence-writes.js +1 -0
- package/dist/process/files/product-dir.js +1 -1
- package/dist/process/host-process.js +1 -1
- package/dist/process/index.js +1 -1
- package/dist/process/lifecycle-fence.js +1 -1
- package/dist/process/lock-progress.js +2 -0
- package/dist/process/locks.js +4 -4
- package/dist/process/process-identity.js +1 -1
- package/dist/process/process.js +35 -35
- package/dist/process/recovery.js +1 -1
- package/dist/process/runs/manifest.js +1 -1
- package/dist/process/runs/ownership.js +1 -1
- package/dist/process/runs/stop.js +1 -1
- package/dist/process/shutdown.js +1 -1
- package/dist/process/windows-native.js +1 -1
- package/dist/repo/history.js +7 -4
- package/dist/repo/managed-git.js +1 -1
- package/dist/repo/state.js +4 -4
- package/dist/steps/environment.js +1 -1
- package/dist/toolchains/node-provisioning.js +2 -2
- package/dist/tracker/gitea.js +1 -1
- package/dist/tracker/github.js +1 -1
- package/dist/tracker/http.js +1 -1
- package/dist/tracker/ownership.js +1 -0
- package/dist/tracker/redaction.js +1 -1
- package/dist/tracker/responses.js +1 -1
- package/dist/types/playwright.d.ts +21 -0
- package/dist/types/workspace.d.ts +4 -4
- package/docs/bug-records.md +16 -10
- package/docs/engines.md +52 -4
- package/docs/release-notes.md +730 -0
- package/package.json +14 -2
- package/testkit-config-schema.md +36 -42
- package/dist/config/loader/task-policy.js +0 -1
- package/dist/environment/lifecycle-artifacts.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gfdelarue/testkit",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Test orchestration platform for product acceptance and QA workflows",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -136,7 +136,19 @@
|
|
|
136
136
|
"yauzl": "3.4.0"
|
|
137
137
|
},
|
|
138
138
|
"overrides": {
|
|
139
|
-
"
|
|
139
|
+
"@verdaccio/config": {
|
|
140
|
+
"js-yaml": "5.4.1"
|
|
141
|
+
},
|
|
142
|
+
"@verdaccio/hooks": {
|
|
143
|
+
"handlebars": "4.7.10"
|
|
144
|
+
},
|
|
145
|
+
"express": {
|
|
146
|
+
"qs": "6.16.0"
|
|
147
|
+
},
|
|
148
|
+
"postcss": "8.5.24",
|
|
149
|
+
"verdaccio": {
|
|
150
|
+
"compression": "1.8.2"
|
|
151
|
+
}
|
|
140
152
|
},
|
|
141
153
|
"engines": {
|
|
142
154
|
"node": ">=22.15.0 <23.0.0 || >=24.14.1 <25.0.0",
|
package/testkit-config-schema.md
CHANGED
|
@@ -75,7 +75,7 @@ file-local metadata of a typed file may also declare skip and lock intent:
|
|
|
75
75
|
import { defineFile } from "@gfdelarue/testkit";
|
|
76
76
|
|
|
77
77
|
export const testkit = defineFile({
|
|
78
|
-
engine: "
|
|
78
|
+
engine: "playwright",
|
|
79
79
|
skip: "Billing is currently unavailable locally",
|
|
80
80
|
locks: ["payments-sandbox-webhook"],
|
|
81
81
|
});
|
|
@@ -148,8 +148,7 @@ Run documents keep the configured `run.workers` field. Observed
|
|
|
148
148
|
`workerCount`, Playwright's own `workers`, `runtime.instances` and
|
|
149
149
|
`runtime.maxConcurrentTasks` keep their existing meanings.
|
|
150
150
|
|
|
151
|
-
`fileTimeoutSeconds` is the single per-file wall clock budget for the repo.
|
|
152
|
-
helpers like `waitFor()` consume this budget automatically.
|
|
151
|
+
`fileTimeoutSeconds` is the single per-file wall clock budget for the repo.
|
|
153
152
|
|
|
154
153
|
### `lint`
|
|
155
154
|
|
|
@@ -196,7 +195,11 @@ areas: {
|
|
|
196
195
|
|
|
197
196
|
- The key is the area id: lowercase letters, digits, and single hyphens, at
|
|
198
197
|
most 40 characters.
|
|
199
|
-
- `name`: one line of 1 to 60 characters. It becomes the label's description
|
|
198
|
+
- `name`: one line of 1 to 60 characters. It becomes the label's description,
|
|
199
|
+
and the issue carries it. Testkit doesn't rewrite it, so it must hold no
|
|
200
|
+
text that Testkit redacts as a secret. `testkit bug file` stops when the
|
|
201
|
+
fault's area has such a name. [Issue body](docs/bug-records.md#issue-body)
|
|
202
|
+
lists what Testkit redacts.
|
|
200
203
|
- `paths`: at least one glob. Globs are relative to the repository root and
|
|
201
204
|
written with `/`. A leading `!` or `/` and a `..` segment are rejected.
|
|
202
205
|
|
|
@@ -592,10 +595,10 @@ Environment names are validated case-insensitively. All engines reserve
|
|
|
592
595
|
`XDG_CONFIG_HOME`, and `XDG_DATA_HOME`. Engine-specific reservations and limits
|
|
593
596
|
are:
|
|
594
597
|
|
|
595
|
-
| Engine | Additional reservations
|
|
596
|
-
| ------------- |
|
|
597
|
-
| `node-vitest` | exact keys `BASE_URL`, `FORCE_COLOR`, `NODE_OPTIONS`, `NO_COLOR`, `UPDATE_SNAPSHOT`, `VITEST_POOL_ID`, `VITEST_WORKER_ID`, and the `TESTKIT_` keys it sets
|
|
598
|
-
| `playwright` | prefixes `TESTKIT_`, `PLAYWRIGHT_`, `PWTEST_`, `PW_TEST_`; exact keys `BASE_URL`, `FORCE_COLOR`, `NODE_OPTIONS`, `NO_COLOR`
|
|
598
|
+
| Engine | Additional reservations | Consumer environment limit |
|
|
599
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------ |
|
|
600
|
+
| `node-vitest` | exact keys `BASE_URL`, `FORCE_COLOR`, `NODE_OPTIONS`, `NO_COLOR`, `UPDATE_SNAPSHOT`, `VITEST_POOL_ID`, `VITEST_WORKER_ID`, and the `TESTKIT_` keys it sets | 512 entries; 4 MiB of UTF-8 key/value data |
|
|
601
|
+
| `playwright` | prefixes `TESTKIT_`, `PLAYWRIGHT_`, `PWTEST_`, `PW_TEST_`; exact keys `BASE_URL`, `DBUS_SESSION_BUS_ADDRESS`, `FC_FONTATIONS`, `FORCE_COLOR`, `NODE_OPTIONS`, `NO_COLOR` | 512 entries; 2 MiB of UTF-8 key/value data |
|
|
599
602
|
|
|
600
603
|
Empty names, names containing `=` or NUL, values containing NUL, and
|
|
601
604
|
case-variant duplicates are rejected. The limits apply after env files and
|
|
@@ -709,13 +712,37 @@ service provisioned in the same runtime instance, as `DATABASE_URL` and in
|
|
|
709
712
|
|
|
710
713
|
### `runtime`
|
|
711
714
|
|
|
712
|
-
|
|
715
|
+
Service-local runtime instances and their preparation.
|
|
716
|
+
|
|
717
|
+
```ts
|
|
718
|
+
runtime: {
|
|
719
|
+
instances: 1,
|
|
720
|
+
maxConcurrentTasks: 4,
|
|
721
|
+
prepare: {
|
|
722
|
+
inputs: ["frontend/src", "frontend/public", "frontend/package.json"],
|
|
723
|
+
steps: [{ kind: "command", run: "npm run build", cwd: "frontend" }],
|
|
724
|
+
},
|
|
725
|
+
}
|
|
726
|
+
```
|
|
713
727
|
|
|
714
728
|
- `instances`
|
|
729
|
+
- number of reusable local runtime instances for that service graph
|
|
715
730
|
- `maxConcurrentTasks`
|
|
731
|
+
- maximum number of concurrent file tasks admitted to each runtime instance
|
|
732
|
+
- omit it to leave concurrency bounded only by the outer `taskConcurrency` setting
|
|
716
733
|
- `toolchain`
|
|
734
|
+
- `prepare`
|
|
735
|
+
- optional runtime-generation preparation hook
|
|
736
|
+
- runs once per runtime instance before local services start
|
|
737
|
+
- fingerprints declared `inputs` plus referenced step files/module inputs
|
|
738
|
+
- use this for build-once/start-many shared runtimes such as `next build` +
|
|
739
|
+
`next start`
|
|
717
740
|
- `prepare.inputs`
|
|
741
|
+
- extra repo-relative inputs that should invalidate prepared artifacts when
|
|
742
|
+
they change
|
|
718
743
|
- `prepare.steps`
|
|
744
|
+
- ordered lifecycle steps using the same step DSL as `database.template`
|
|
745
|
+
- each step supports `cwd` and `inputs`
|
|
719
746
|
|
|
720
747
|
`runtime.toolchain` may be either:
|
|
721
748
|
|
|
@@ -771,39 +798,6 @@ A run that skips a selected file fails, even when every other file passes, and
|
|
|
771
798
|
`--allow-empty` doesn't change that. Use `--ignore-skip-rules` on the CLI to run
|
|
772
799
|
skipped files anyway.
|
|
773
800
|
|
|
774
|
-
### `runtime`
|
|
775
|
-
|
|
776
|
-
Service-local runtime instance settings.
|
|
777
|
-
|
|
778
|
-
```ts
|
|
779
|
-
runtime: {
|
|
780
|
-
instances: 1,
|
|
781
|
-
maxConcurrentTasks: 4,
|
|
782
|
-
prepare: {
|
|
783
|
-
inputs: ["frontend/src", "frontend/public", "frontend/package.json"],
|
|
784
|
-
steps: [{ kind: "command", run: "npm run build", cwd: "frontend" }],
|
|
785
|
-
},
|
|
786
|
-
}
|
|
787
|
-
```
|
|
788
|
-
|
|
789
|
-
- `instances`
|
|
790
|
-
- number of reusable local runtime instances for that service graph
|
|
791
|
-
- `maxConcurrentTasks`
|
|
792
|
-
- maximum number of concurrent file tasks admitted to each runtime instance
|
|
793
|
-
- omit it to leave concurrency bounded only by the outer `taskConcurrency` setting
|
|
794
|
-
- `prepare`
|
|
795
|
-
- optional runtime-generation preparation hook
|
|
796
|
-
- runs once per runtime instance before local services start
|
|
797
|
-
- fingerprints declared `inputs` plus referenced step files/module inputs
|
|
798
|
-
- use this for build-once/start-many shared runtimes such as `next build` +
|
|
799
|
-
`next start`
|
|
800
|
-
- `prepare.inputs`
|
|
801
|
-
- extra repo-relative inputs that should invalidate prepared artifacts when
|
|
802
|
-
they change
|
|
803
|
-
- `prepare.steps`
|
|
804
|
-
- ordered lifecycle steps using the same step DSL as `database.template`
|
|
805
|
-
- each step supports `cwd` and `inputs`
|
|
806
|
-
|
|
807
801
|
### `requirements`
|
|
808
802
|
|
|
809
803
|
Task lock rules for a group's files, set as `groups.<name>.requirements`.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{matchesSuiteSelectors as a}from"../../domain/suite-selection.js";import{normalizePath as l}from"./paths.js";import{resolveRuntimeIsolationPolicy as i}from"./runtime-isolation.js";export function resolveTaskPolicy(o,t,r){return{locks:m(o,t,r),runtimeIsolation:i({testkit:o},t,r)}}function m(o,t,r){const n=l(r),s=new Set;for(const e of o.requirements.suites)if(a(t.testType,t.name,[e.selector]))for(const c of e.locks)s.add(c);for(const e of o.requirements.fileLocksByPath.get(n)??[])s.add(e);for(const e of o.fileMetadataByPath.get(n)?.locks??[])s.add(e);return[...s].sort()}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"fs";import a from"path";import{finalizeLiveRunArtifact as e}from"../evidence/index.js";import{isUnknownRecord as u}from"../kernel/unknown-values.js";export function reconcileInactiveRunArtifact(n,t){typeof t.runId=="string"&&e(n,{runId:t.runId,reason:"stale run process not active",status:"interrupted"})}export function reconcileOrphanedLiveRunArtifact(n,{activeRunIds:t=new Set}={}){const r=f(n),i=r?.run.id||null;return!i||r?.run.status!=="running"||t.has(i)?!1:e(n,{runId:i,reason:"stale live artifact has no active run manifest",status:"interrupted"})}function f(n){try{const t=JSON.parse(o.readFileSync(a.join(n,".testkit","results","live.json"),"utf8"));return c(t)}catch{return null}}function c(n){if(!u(n)||!u(n.run))return null;const t=n.run.id,r=n.run.status;return!s(t)||!s(r)?null:{run:{id:t,status:r}}}function s(n){return n===void 0||typeof n=="string"}
|