Skip to content

refactor(qa-lab): deslop QA Lab fourth pass - #159582

Merged
steipete merged 9 commits into
mainfrom
deslop/l118-qalab4
Sep 27, 2026
Merged

steipete merged 9 commits into
mainfrom
deslop/l118-qalab4

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

QA Lab still retained forwarding layers, duplicated result projection, and unregistered Matrix implementations after its earlier cleanup passes.

User Impact

Keeps registered QA scenarios, assertions, live-transport behavior, and report contracts intact while removing 1,050 net production lines. Also repairs four small QA defects found during the sweep. No operator configuration, schema, protocol, or release changes.

Why This Change Was Made

  • Remove six retired Matrix entry points whose registrations moved to portable YAML flows in test(qa): migrate channel thread and DM isolation scenarios #101112 and test(qa): use qa flow for channel routing scenarios #101076; retain every currently registered scenario and its assertions. Reuse the existing Matrix config/artifact owners and simplify UIAA and message-content selection.
  • Remove the runtime-agent forwarding barrel, import its actual owners, and update the scenario catalog's source reference.
  • Share parity comparison, bus publication, Gateway readiness polling, live credential parsing, RTT projection, and credential CLI result/error handling at their existing owners.
  • Keep mock request snapshot fields and runtime-context recognition in shared provider helpers; replace repeated history scans with one equivalent traversal.
  • Retain resolved plugin source directories through staging, share timeout handling, and simplify server response and fixture traversal paths.
  • Give each WhatsApp scenario module one typed descriptor map and compose those maps explicitly, preserving all 38 scenario keys and catalog selection.
  • Simplify suite task/result metadata, Mantis result construction, and capture drag/render state without changing appearance or output fields.

Fixes found along the way

  • Mock tool evidence now validates the plan linked to the actual output after an earlier unlinked plan.
  • Matrix recovery CLI setup removes its private temp state on failure and preserves cleanup failures.
  • Matrix progress diagnostics detect unexpected top-level “Working” events when no preview exists.
  • Mantis expands leading $HOME/ and ~/ browser profile paths on the remote host while keeping the suffix literal.

The dormant planning-lane selector defect is already owned by #156908; its duplicate repair was removed from this PR.

Evidence

Current head: 0370085c72d004f32fd403f4c18c27467a2c4f51. Fresh independent review of the full rebased diff found no actionable P0–P2 issue. Main's Tasks/TaskFlow retirement added readNativeQaSubagentRuns to the removed forwarding barrel; the resolved cutover imports it from its existing owner and retains it in the scenario dependency map.

Blacksmith Testbox tbx_01m3j1a27w4s1bpzh3bzqg3va1 (run, stopped) completed:

  • pnpm test:extensions:batch qa-lab qa-channel: 4,195 tests in 329 files pass.
  • All selected consumers pass: QA Lab/channel/protocol/runtime/runner SDK tests, runner integration, message-tool delivery, maturity rendering, QA startup script, and Gateway QA RPC replay.
  • All 50 import-boundary tests pass, including src/infra/fs-safe-import-boundary.test.ts and its three sibling suites.
  • pnpm build and pnpm qa:lab:build pass.
  • The four-scenario registered CLI run and independent artifact-accounting assertions below both pass.

Current landing blocker: node scripts/check-changed.mjs and current-head CI 36341623358 fail the inherited type error at src/agents/tools/media-generate-background-retention.test.ts:233: the spy forwards consume(result) instead of the reader's required (result, owner). Existing #159819 and #159836 both own the exact repair, so this PR does not duplicate it. The fix is not yet on main as of the latest check. After it lands, rebase and refresh the type/check and CI gates before landing this PR.

Before that main rebase, full check-changed and CI 36335764787 were green (151 successful jobs, 22 intentional skips). The refreshed QA, consumer, boundary, build, and runtime proofs above are current; the inherited type gate remains red.

Regression negative controls remain valid for the unchanged fixes: original source fails two mock-evidence cases, three Matrix cases, and three Mantis home-relative-path cases. The candidate passes the focused suites; the absolute-path shell control passes on both revisions. Production is 1,050 net lines smaller; test/support code grows by 263 lines.

Registered suite accounting proof

pnpm openclaw qa suite --provider-mode mock-openai --transport qa-channel --concurrency 3 --scenario dm-chat-baseline --scenario channel-chat-baseline --scenario group-visible-reply-tool --scenario subagent-empty-completion-non-delivery --output-dir .artifacts/qa-e2e/l118-native-registered-suite

4 requested, 4 passed, 0 failed, 0 skipped. This exercises shared and isolated suite partitions, actual Gateway/QA Channel turns, visible message-tool delivery, and the newly preserved native-subagent helper before and after a Gateway restart.

qa-suite-summary.json records a completed run, the four requested IDs, and matching counts. Schema-v3 qa-evidence.json projects exactly the same four passing scheduled instances, each with its selected occurrence ID matching the summary result. qa-suite-report.md contains all four passing sections and matching totals. All artifacts were verified under .artifacts/qa-e2e/l118-native-registered-suite/. No live account or credential was used.

Changed-test cost

Testbox wall time uses pnpm test <file> --maxWorkers=1 and includes cold transform/import startup. CI seconds sum verbose per-case durations in the last green run's QA jobs 97–100, excluding shared startup. These measurements predate the final main rebase; the test files listed here are unchanged.

File Testbox wall seconds CI test seconds
src/runtime-tool-fixture.test.ts 20.43 6.157
src/runtime-tool-fixture.mock-linking.test.ts 15.66 0.010
src/live-transports/matrix/scenarios/scenario-runtime-e2ee-cli-runtime.test.ts 15.74 0.066
src/live-transports/matrix/scenarios/scenario-runtime-tool-progress-diagnostics.test.ts 1.63 0.017
src/live-transports/matrix/scenarios/scenario-runtime-thread.test.ts 1.60 0.014
src/suite-runtime-flow.test.ts 19.59 0.291
src/mantis/desktop-browser-smoke.runtime.test.ts 1.72 0.088
web/src/app.browser.test.ts 3.43 1.715
src/live-transports/whatsapp/whatsapp-live.config.test.ts 18.05 1.162

Earlier inherited failures are repaired in this base: Gateway line cap (#159473), ACP observer typing (e9af8ebcde6), File Transfer's filesystem import boundary (#159654), stale shared-worker reuse (e52420e1eea6), ended schema-scope classification (601bb5ba37e5), and Workboard's generated asset paths (559b4f84f615). Independent candidates for the last two matched the landed fixes byte-for-byte and were discarded without duplicate PRs.

All task-owned Testbox leases are stopped. The Matrix config changes only construct and clean disposable private CLI state; no operator config, persistent data format, migration contract, or default changes. Rendered appearance is unchanged. No live account or operator Gateway was modified.

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 27, 2026, 7:02 PM ET / 23:02 UTC (Revision 17).

ClawSweeper review

What this changes

QA Lab, OpenClaw’s scenario-testing plugin, removes retired Matrix runners and redundant QA code, consolidates suite and live-transport helpers, and adds focused QA fixes and regression tests.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: the QA Lab cleanup and focused fixes remain absent from current main. The changed QA source matches the earlier proved and reviewed head, and this review found no blocking patch defect.

Priority: P3
Reviewed head: 9976ea2b4f3b3b235c31462b3694b7ffcf6ffb3b

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong boundary proof, negative controls, measured test costs, and coherent source reduction support an above-average review; the PR body needs a factual refresh.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed suite and QA Channel owners map to the contributor’s Testbox run of the registered openclaw QA CLI against an actual Gateway and QA Channel; all four requested scenarios passed and their summary, evidence, and report totals matched. The introduced production source is unchanged from that proved head. Live-account adapter behavior was not separately exercised; focused suites are supplemental. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed suite and QA Channel owners map to the contributor’s Testbox run of the registered openclaw QA CLI against an actual Gateway and QA Channel; all four requested scenarios passed and their summary, evidence, and report totals matched. The introduced production source is unchanged from that proved head. Live-account adapter behavior was not separately exercised; focused suites are supplemental. No stored-data contract changes.
Evidence reviewed 9 items Introduced QA cutover: The pinned base-to-head diff removes the runtime-agent forwarding barrel, consolidates suite and transport helpers, and retains direct scenario dependencies.
Previous proof still maps to the source: Tree-object comparison found the introduced QA production files unchanged between the PR body’s proved head 0370085 and the pinned head. Differences were the assertion baseline and two QA viewer files brought in from main outside the introduced diff.
Current main does not contain this cleanup: The fetched main and pinned base have identical QA Lab, QA Channel, scenario-reference, and assertion-baseline tree entries; the PR remains a distinct change.
Findings None None.
Security None None.

How this fits together

QA Lab takes scenario definitions and transport settings, runs them through a Gateway and channel adapters, then writes evidence and reports. Its viewer presents those results to QA operators.

flowchart LR
  A[Scenario definitions] --> B[QA Lab suite planner]
  B --> C[Gateway and QA Channel]
  B --> D[Live transport adapters]
  C --> E[Scenario assertions]
  D --> E
  E --> F[Evidence and reports]
  F --> G[QA Lab viewer]
Loading

Before merge

  • Complete next step (P2) - Update the PR body to identify head 9976ea2 and remove its claim that the inherited media-fixture type error remains on main.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production and test balance production −1,050 net lines; test/support +263 lines The PR body’s measured split shows a substantial production reduction alongside focused regression coverage.

Stored data model

Persistent data-model change detected: serialized state: extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-cli.ts, serialized state: extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-destructive-recovery.ts, serialized state: extensions/qa-lab/src/self-check.ts, unknown-data-model-change: extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-cli.ts, unknown-data-model-change: extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-destructive-recovery.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one owner for each QA scenario and report contract, with portable YAML registrations intact and the proved suite behavior carried through landing.

Do we have a high-confidence way to reproduce the issue?

Not applicable to the cleanup as a whole. The PR records negative controls for its four incidental defects, but this read-only review did not execute a current-main reproduction.

Is this the best way to solve the issue?

Yes. The branch removes retired handlers and forwarding code while retaining the registered YAML scenarios and using existing QA owners.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f651a47ed73d.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a QA Lab cleanup with focused QA repairs and no demonstrated user-facing regression or urgent release impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed suite and QA Channel owners map to the contributor’s Testbox run of the registered openclaw QA CLI against an actual Gateway and QA Channel; all four requested scenarios passed and their summary, evidence, and report totals matched. The introduced production source is unchanged from that proved head. Live-account adapter behavior was not separately exercised; focused suites are supplemental. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed suite and QA Channel owners map to the contributor’s Testbox run of the registered openclaw QA CLI against an actual Gateway and QA Channel; all four requested scenarios passed and their summary, evidence, and report totals matched. The introduced production source is unchanged from that proved head. Live-account adapter behavior was not separately exercised; focused suites are supplemental. No stored-data contract changes.

Evidence

What I checked:

  • Introduced QA cutover: The pinned base-to-head diff removes the runtime-agent forwarding barrel, consolidates suite and transport helpers, and retains direct scenario dependencies. (extensions/qa-lab/src/suite-runtime-flow.ts:51, 9976ea2b4f3b)
  • Previous proof still maps to the source: Tree-object comparison found the introduced QA production files unchanged between the PR body’s proved head 0370085 and the pinned head. Differences were the assertion baseline and two QA viewer files brought in from main outside the introduced diff. (9976ea2b4f3b)
  • Current main does not contain this cleanup: The fetched main and pinned base have identical QA Lab, QA Channel, scenario-reference, and assertion-baseline tree entries; the PR remains a distinct change. (f651a47ed73d)
  • Recorded real QA run: The PR body reports a Testbox run of the registered openclaw QA suite through an actual Gateway and QA Channel: four requested scenarios passed, with matching summary, evidence, and report counts. It also reports focused negative controls and measured test costs. This is contributor-recorded proof, not a command executed in this read-only review. (0370085c72d0)
  • Inherited blocker was already repaired: The pinned base forwards both result and owner in the media-reader fixture, contrary to the PR body’s claim that the one-argument error remains on main. History attributes that fixture repair to merged commit 0b6f02f. (src/agents/tools/media-generate-background-retention.test.ts:233, 534b88aff663)
  • Retained Matrix scenario path: Portable YAML definitions still include thread follow-up, isolation, and subagent thread-spawn scenarios after the retired imperative handlers are removed; the merged Matrix-flow PRs in the provided context established those registrations. (qa/scenarios/channels/thread-follow-up.yaml:4, 9976ea2b4f3b)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Josh Avant: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-27T17:02:36.133Z sha e92861e :: blocked before merge. :: none
  • reviewed 2026-09-27T17:16:32.554Z sha cf3e5716b0540b171efe53f7cd32a973ee9460e6 :: blocked before merge. :: none
  • reviewed 2026-09-27T17:58:24.154Z sha cf3e5716b0540b171efe53f7cd32a973ee9460e6 :: blocked before merge. :: none
  • reviewed 2026-09-27T18:37:59.231Z sha cf3e5716b0540b171efe53f7cd32a973ee9460e6 :: blocked before merge. :: none
  • reviewed 2026-09-27T18:51:16.192Z sha 0370085 :: blocked before merge. :: none
  • reviewed 2026-09-27T19:20:26.649Z sha 0370085 :: blocked before merge. :: none
  • reviewed 2026-09-27T19:44:46.688Z sha 9d4f787 :: blocked before merge. :: none
  • reviewed 2026-09-27T22:32:10.196Z sha d239c5a :: blocked before merge. :: none

@steipete
steipete force-pushed the deslop/l118-qalab4 branch 2 times, most recently from 074804e to 5a36d06 Compare September 27, 2026 12:46
@steipete
steipete marked this pull request as ready for review September 27, 2026 13:14
@steipete
steipete force-pushed the deslop/l118-qalab4 branch 3 times, most recently from 9f38b5a to 34c7e6f Compare September 27, 2026 15:09
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 27, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 27, 2026
@steipete
steipete enabled auto-merge (squash) September 27, 2026 19:21
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 27, 2026
auto-merge was automatically disabled September 27, 2026 22:55

Head branch was modified

@steipete
steipete enabled auto-merge (squash) September 27, 2026 22:59
@steipete
steipete merged commit 9a202d4 into main Sep 27, 2026
222 checks passed
@steipete
steipete deleted the deslop/l118-qalab4 branch September 27, 2026 23:12
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
* refactor(qa-lab): deslop QA Lab fourth pass

* test(qa-lab): defer planning selector repair to existing PR

* test(qa-lab): isolate mock request linkage coverage

* chore(qa-lab): shrink removed assertion baseline entries

* refactor(qa-lab): make scenario and dependency ownership explicit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: qa-channel Channel integration: qa-channel extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant