Skip to content

qa-lab: support script-backed evidence scenarios#94276

Merged
RomneyDa merged 3 commits into
openclaw:mainfrom
Solvely-Colin:codex/qa-lab-script-scenario
Jun 17, 2026
Merged

qa-lab: support script-backed evidence scenarios#94276
RomneyDa merged 3 commits into
openclaw:mainfrom
Solvely-Colin:codex/qa-lab-script-scenario

Conversation

@Solvely-Colin

@Solvely-Colin Solvely-Colin commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Why

QA Lab already knows how to run flow, Vitest, and Playwright-backed scenarios. The UX Matrix split needs one more reusable layer first: a native script execution kind for scenario producers that create their own qa-evidence.json artifacts.

This PR is intentionally only that infrastructure layer.

What changed

  • add scenario.execution.kind: script to the QA scenario catalog schema
  • run script scenarios through Node/tsx with ${outputDir} and ${scenarioId} argument token expansion
  • import producer-written qa-evidence.json artifacts into the suite evidence output
  • preserve fallback script-runner evidence when the script process itself fails
  • count script-backed native evidence in QA coverage/scorecard reporting

Split context

This is PR 1 split out from the closed combined UX Matrix spike PR #94273.

Follow-up slices should stay separate:

  • PR 2: QA web app / evidence gallery for QA evidence artifacts
  • PR 3: UX Matrix scenario using this script execution kind
  • PR 4 or later: GitHub Action / smoke-ci profile wiring

This PR does not add the UX Matrix scenario, evidence gallery UI changes, dashboard script, or GitHub Action.

Real behavior proof

  • Behavior or issue addressed: QA Lab can now recognize script-backed native scenarios while keeping existing QA coverage commands usable after the schema/coverage changes.
  • Real environment tested: Local OpenClaw source checkout on macOS from PR head 9df6cecb3595fb2f0cee897e241ddc0e1878f4ab.
  • Exact steps or command run after this patch: pnpm openclaw qa coverage --help and pnpm openclaw qa coverage --match playwright.
  • Evidence after fix: Copied terminal output from the local OpenClaw CLI after this patch:
$ node scripts/run-node.mjs qa coverage --help

OpenClaw 2026.6.8 (9df6cec) — All your chats, one OpenClaw.

Usage: openclaw qa coverage [options]

Print the YAML QA coverage inventory

Options:
  --json              Print JSON instead of Markdown (default: false)
  --match <query>     Search scenario metadata and print matching scenario refs

$ node scripts/run-node.mjs qa coverage --match playwright
# QA Scenario Matches

- Query: playwright
- Matches: 1
- Suite command: `pnpm openclaw qa suite --scenario control-ui-chat-flow-playwright`

- control-ui-chat-flow-playwright: Control UI chat flow Playwright coverage
  - source: qa/scenarios/ui/control-ui-chat-flow-playwright.yaml
  - surface: control-ui
  - execution: playwright ui/src/ui/e2e/chat-flow.e2e.test.ts
  - coverage IDs: ui.control
  • Observed result after fix: The QA coverage CLI started from the patched checkout, printed the coverage command help, and rendered a native execution scenario match without schema/catalog errors. Local environment warnings were emitted before the report but did not block the command.
  • What was not tested: UX Matrix itself, evidence gallery UI, dashboard script, and GitHub Action wiring are intentionally not included in this PR.

Supplemental validation

  • node scripts/run-vitest.mjs extensions/qa-lab/src/test-file-scenario-runner.test.ts extensions/qa-lab/src/coverage-report.test.ts extensions/qa-lab/src/scenario-catalog.test.ts extensions/qa-lab/src/suite-launch.runtime.test.ts
  • pnpm qa:lab:build
  • node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental false
  • pnpm lint --threads=8
  • pnpm run lint:extensions:bundled
  • git diff --check --cached

Copilot AI review requested due to automatic review settings June 17, 2026 21:09
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 17, 2026
@Solvely-Colin Solvely-Colin changed the title qa: add script scenario execution kind qa-lab: support script-backed evidence scenarios Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new QA Lab native scenario execution kind (script) so QA scenarios can run producer scripts (via Node + tsx) and import their qa-evidence.json output into suite evidence/coverage reporting.

Changes:

  • Extend scenario catalog + runner types to support scenario.execution.kind: script with optional args token expansion (${outputDir}, ${scenarioId}).
  • Import and normalize producer-written qa-evidence.json for script scenarios, merging it into the suite evidence output (and preserving fallback runner evidence on script failure).
  • Update coverage reporting and tests to recognize script scenarios as native evidence sources.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
qa/scenarios/index.yaml Docs/comments updated to include script as an execution kind.
extensions/qa-lab/src/test-file-scenario-runner.ts Adds script runner support, token expansion, producer evidence import/normalization, and evidence merge logic.
extensions/qa-lab/src/test-file-scenario-runner.test.ts Adds coverage for running script scenarios and importing producer evidence (including failure cases).
extensions/qa-lab/src/suite-launch.runtime.test.ts Updates mocked scenario execution kind union to include script.
extensions/qa-lab/src/scorecard-taxonomy.ts Extends native evidence kind union to include script.
extensions/qa-lab/src/scenario-catalog.ts Adds script to execution schema with optional args.
extensions/qa-lab/src/evidence-summary.ts Adds buildScriptEvidenceSummary helper.
extensions/qa-lab/src/coverage-report.ts Includes script in scenario match grouping order.
extensions/qa-lab/src/coverage-report.test.ts Adds coverage test asserting script evidence fulfills coverage IDs.

Comment thread extensions/qa-lab/src/test-file-scenario-runner.ts
Comment thread extensions/qa-lab/src/test-file-scenario-runner.ts
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jun 17, 2026
@RomneyDa
RomneyDa merged commit 591313e into openclaw:main Jun 17, 2026
159 checks passed
crh-code pushed a commit to crh-code/openclaw that referenced this pull request Jun 18, 2026
* qa: add script scenario execution kind

* fix(qa-lab): carry suite profile into script producer evidence and simplify artifact path resolution

* fix(qa-lab): keep out-of-repo producer artifacts absolute to avoid ../ traversal refs

---------

Co-authored-by: Dallin Romney <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 18, 2026
* qa: add script scenario execution kind

* fix(qa-lab): carry suite profile into script producer evidence and simplify artifact path resolution

* fix(qa-lab): keep out-of-repo producer artifacts absolute to avoid ../ traversal refs

---------

Co-authored-by: Dallin Romney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: qa-lab proof: supplied External PR includes structured after-fix real behavior proof. size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants