Skip to content

Commit 0a6736a

Browse files
authored
test: fold lifecycle and package proof into QA Lab (#93114)
* test: fold script coverage into qa scenarios * test: migrate script checks into qa e2e * test: point qa code refs at migrated e2e * test: fold plugin lifecycle probe into qa e2e * test: use shared temp dirs in plugin lifecycle probe * test: fold plugin lifecycle sweep into qa lab * test: trim lifecycle docker text assertions * test: keep followup script conversions split * test: make lifecycle docker runner script-safe * test: update changed helper routing expectation
1 parent e442b57 commit 0a6736a

15 files changed

Lines changed: 704 additions & 372 deletions

‎extensions/qa-lab/src/scenario-catalog.test.ts‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@ describe("qa scenario catalog", () => {
5151
expect(
5252
pack.scenarios
5353
.filter((scenario) => scenario.execution?.kind !== "flow")
54-
.map((scenario) => scenario.id),
55-
).toStrictEqual(["control-ui-chat-flow-playwright"]);
54+
.map((scenario) => scenario.id)
55+
.toSorted(),
56+
).toStrictEqual(
57+
[
58+
"control-ui-chat-flow-playwright",
59+
"package-openclaw-for-docker",
60+
"plugin-lifecycle-probe",
61+
].toSorted(),
62+
);
5663
expect(
5764
pack.scenarios
5865
.filter((scenario) => scenario.execution.kind === "flow")
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
title: Plugin lifecycle probe evidence
2+
3+
scenario:
4+
id: plugin-lifecycle-probe
5+
surface: plugins
6+
coverage:
7+
primary:
8+
- plugins.lifecycle
9+
secondary:
10+
- plugin-validation-and-repair
11+
- plugin-setup
12+
objective: Exercise strict plugin load/uninstall proof parsing through QA Lab evidence.
13+
successCriteria:
14+
- Enabled loaded plugin inspect JSON is accepted as proof.
15+
- Pending or missing inspect JSON is rejected instead of treated as loaded.
16+
- Malformed config during uninstall proof fails with a bounded diagnostic.
17+
docsRefs:
18+
- docs/plugins/manifest.md
19+
- docs/cli/plugins.md
20+
- docs/concepts/qa-e2e-automation.md
21+
codeRefs:
22+
- test/e2e/qa-lab/plugins/plugin-lifecycle-probe.e2e.test.ts
23+
execution:
24+
kind: vitest
25+
path: test/e2e/qa-lab/plugins/plugin-lifecycle-probe.e2e.test.ts
26+
summary: Vitest coverage for plugin lifecycle proof parsing.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
title: Docker package artifact QA evidence
2+
3+
scenario:
4+
id: package-openclaw-for-docker
5+
surface: docker-podman-hosting
6+
coverage:
7+
primary:
8+
- docker-e2e-package-artifact-generation
9+
secondary:
10+
- package-manager-installs
11+
- runtime.package-update
12+
objective: Exercise bounded OpenClaw package artifact generation through QA Lab evidence.
13+
successCriteria:
14+
- Package artifact output flags are parsed strictly.
15+
- The Docker package path uses the single bounded build-all step before npm pack.
16+
- Changelog trimming is restored after successful and failed ignore-scripts packaging.
17+
- Timed-out and externally terminated child process groups are cleaned up without leaked descendants.
18+
- Captured command output is bounded.
19+
docsRefs:
20+
- docs/install/updating.md
21+
- docs/help/testing.md
22+
- docs/concepts/qa-e2e-automation.md
23+
codeRefs:
24+
- test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts
25+
execution:
26+
kind: vitest
27+
path: test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts
28+
summary: Vitest coverage for Docker package artifact creation and cleanup behavior.

‎scripts/e2e/lib/plugin-lifecycle-matrix/probe.mjs‎

Lines changed: 0 additions & 159 deletions
This file was deleted.

‎scripts/e2e/lib/plugin-lifecycle-matrix/sweep.sh‎

Lines changed: 0 additions & 86 deletions
This file was deleted.

‎scripts/e2e/plugin-lifecycle-matrix-docker.sh‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ PACKAGE_TGZ="$(docker_e2e_prepare_package_tgz plugin-lifecycle-matrix "${OPENCLA
1717
docker_e2e_package_mount_args "$PACKAGE_TGZ"
1818

1919
docker_e2e_build_or_reuse "$IMAGE_NAME" plugin-lifecycle-matrix "$ROOT_DIR/scripts/e2e/Dockerfile" "$ROOT_DIR" "bare" "$SKIP_BUILD"
20-
OPENCLAW_TEST_STATE_SCRIPT_B64="$(docker_e2e_test_state_shell_b64 plugin-lifecycle-matrix empty)"
2120
DOCKER_ENV_ARGS=(
2221
-e COREPACK_ENABLE_DOWNLOAD_PROMPT=0
2322
-e OPENCLAW_SKIP_CHANNELS=1
2423
-e OPENCLAW_SKIP_PROVIDERS=1
25-
-e "OPENCLAW_TEST_STATE_SCRIPT_B64=$OPENCLAW_TEST_STATE_SCRIPT_B64"
2624
)
2725
if [ -n "${OPENCLAW_PLUGIN_LIFECYCLE_PHASE_TIMEOUT_MS:-}" ]; then
2826
DOCKER_ENV_ARGS+=(-e "OPENCLAW_PLUGIN_LIFECYCLE_PHASE_TIMEOUT_MS=$OPENCLAW_PLUGIN_LIFECYCLE_PHASE_TIMEOUT_MS")
@@ -45,6 +43,6 @@ docker_e2e_run_with_harness \
4543
"${DOCKER_ENV_ARGS[@]}" \
4644
"${DOCKER_E2E_PACKAGE_ARGS[@]}" \
4745
"$IMAGE_NAME" \
48-
bash scripts/e2e/lib/plugin-lifecycle-matrix/sweep.sh
46+
tsx test/e2e/qa-lab/plugins/plugin-lifecycle-probe-runtime.ts --lifecycle-matrix
4947

5048
echo "Plugin lifecycle matrix Docker E2E passed."

‎scripts/lib/docker-e2e-package.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ docker_e2e_harness_mount_args() {
251251
DOCKER_E2E_HARNESS_ARGS=(
252252
-v "$ROOT_DIR/scripts/e2e:/app/scripts/e2e:ro"
253253
-v "$ROOT_DIR/scripts/lib:/app/scripts/lib:ro"
254+
-v "$ROOT_DIR/test/e2e/qa-lab:/app/test/e2e/qa-lab:ro"
255+
-v "$ROOT_DIR/test/helpers:/app/test/helpers:ro"
254256
-v "$ROOT_DIR/scripts/windows-cmd-helpers.mjs:/app/scripts/windows-cmd-helpers.mjs:ro"
255257
)
256258
}

‎scripts/test-projects.test-support.mjs‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,10 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
592592
["scripts/package-changelog.mjs", ["test/scripts/package-changelog.test.ts"]],
593593
["scripts/package-mac-app.sh", ["test/scripts/package-mac-app.test.ts"]],
594594
["scripts/package-mac-dist.sh", ["test/scripts/package-mac-dist.test.ts"]],
595-
["scripts/package-openclaw-for-docker.mjs", ["test/scripts/package-openclaw-for-docker.test.ts"]],
595+
[
596+
"scripts/package-openclaw-for-docker.mjs",
597+
["test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts"],
598+
],
596599
["scripts/postinstall-bundled-plugins.mjs", ["test/scripts/postinstall-bundled-plugins.test.ts"]],
597600
["scripts/prepare-git-hooks.mjs", ["test/scripts/prepare-git-hooks.test.ts"]],
598601
[
@@ -648,14 +651,6 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
648651
"scripts/e2e/lib/plugin-lifecycle-matrix/measure.mjs",
649652
["test/scripts/plugin-lifecycle-measure.test.ts"],
650653
],
651-
[
652-
"scripts/e2e/lib/plugin-lifecycle-matrix/probe.mjs",
653-
["test/scripts/plugin-lifecycle-probe.test.ts"],
654-
],
655-
[
656-
"scripts/e2e/lib/plugin-lifecycle-matrix/sweep.sh",
657-
["test/scripts/plugin-lifecycle-probe.test.ts"],
658-
],
659654
[
660655
"scripts/e2e/release-media-memory-docker.sh",
661656
["test/scripts/docker-e2e-plan.test.ts", "test/scripts/release-media-memory-scenario.test.ts"],

‎src/scripts/test-projects.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,10 @@ describe("test-projects args", () => {
897897
},
898898
{
899899
config: "test/vitest/vitest.e2e.config.ts",
900-
forwardedArgs: ["test/openclaw-launcher.e2e.test.ts"],
900+
forwardedArgs: [
901+
"test/e2e/qa-lab/plugins/plugin-lifecycle-probe.e2e.test.ts",
902+
"test/openclaw-launcher.e2e.test.ts",
903+
],
901904
includePatterns: null,
902905
watchMode: false,
903906
},

0 commit comments

Comments
 (0)