Skip to content

refactor(qa-lab): deslop qa-lab - #164030

Merged
steipete merged 4 commits into
mainfrom
deslop/l343-simplify-qa-lab-20261002
Oct 3, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/l343-simplify-qa-lab-20261002

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

QA Lab still carries avoidable forwarding layers, duplicate bookkeeping, and unused internal options across scenario execution, reports, provider mocks, and Mantis commands.

User Impact

Scenario names and semantics, CLI flags, persisted data, protocol shapes, evidence/report formats, and rendered UI remain unchanged. Matrix faulted-recovery setup now closes its fault proxy if the recovery client cannot start.

Why This Change Was Made

  • Put successful WhatsApp result metadata in the scenario owner; remove the repeated result builder and unused broad result type.
  • Keep one tool-call completion state, use admitted taxonomy ownership directly, and reuse report comparisons and resolved evidence containment.
  • Select bundled plugin code and its canonical manifest together, removing repeated manifest discovery while retaining source/build precedence.
  • Remove Mantis command forwarding and its one-caller visual-driver argument builder; delete unused internal fields and options.
  • Remove request-local Anthropic ID memoization for a deterministic conversion, an unused embedding dimension parameter, and redundant mock snapshot typing.
  • Inline one-use CLI/catalog helpers, read scenario-pack YAML once, and derive the suite Gateway type from its owner.
  • Remove unused Matrix scenario knobs and single-use media/observer builders while preserving prompts, diagnostics, and evidence projections.
  • Simplify internal browser filtering and SSE arguments without changing templates, styles, or presentation.

This is the single final batch for lane l343 after coverage exhaustion: 423 net production lines removed, with 37 test lines added. It is below the 1,000-line campaign floor. The coverage log below accounts for every production TypeScript/CSS file over 200 lines, sorted by baseline size. Prior QA Lab cleanup passes and active overlap in #163911 and #163917 left no sound larger restructuring without changing behavior or inventing abstractions. Protected overlap files were read without editing. An auth-fixture cleanup was excluded because its required assertion-baseline pruning overlaps lane l326.

Fixes found along the way

runMatrixQaFaultedRecoveryOwnerVerification started the fault proxy before creating its recovery client, but entered try/finally only after client creation. Client startup rejection therefore leaked the proxy. Acquisition now occurs inside the existing cleanup boundary; the regression checks that failure propagates and the proxy closes.

Two scenario catalog codeRefs still named the private runtime forwarding file removed by #163911. They now reference the existing public runtime entry; the catalog existence assertion remains intact.

Evidence

  • Autoreview completed clean at P0-P2 after using the configured direct API route when the normal login could not refresh.

  • Both import-cycle checks reported zero. The QA Lab asset build command reported no build hooks, so no generated manifest changed.

  • AWS Crabbox: 37 focused QA Lab files / 884 tests passed; 48 plugin contract files / 1,132 tests passed, including runtime dependency ownership. No dependency declarations changed or became unused.

  • Matrix regression: the original owner failed because proxy stop was called zero times; the fixed owner passed all four tests. The regression took 32 ms in the isolated green run; its complete file took 2.86 s wall with --maxWorkers=1 (no real timers or Gateway boots added).

  • Rebased onto main before publication; the final complete diff and changed-file hashes match the remotely tested source. Static ratchets, plugin boundaries, production/test types and both Knip export scans passed. Two map-spread lint findings were repaired; all 38 changed files then passed lint. The final affected report/browser rerun passed 95 tests and the plugin contract rerun passed all 1,132 tests. These pre-integration checks passed on the original published candidate.

  • Initial hosted CI run 37096152170 failed two inherited QA E2Es: the Codex exec-server process matcher and the self-yield follow-up fixture. Integrated the already-landed fixes from fix(qa): ignore inline script text in process checks #164025 and refactor(plugins): deslop tool and misc plugins #163911 rather than duplicating them or bypassing those failures. Both E2Es then passed remotely (2 files / 2 tests, 254.28 s Vitest duration).

  • Integrated candidate on AWS Crabbox: frozen install, private-QA build, production/test types, and 883 of 884 focused tests passed; the sole failure identified the two stale catalog references repaired here. The corrected catalog passed all 10 tests, and the final plugin contracts passed all 1,132 tests across 48 files. Both final cycle checks reported zero. Source tree and full-diff digests bind this proof to the candidate.

  • The final two-line metadata repair also passed independent P0-P2 autoreview. Hosted CI run 37102283956 passed on final head c116c5e9761dbbf706fe3946606917ebde9ff392; squash-merged as dfc3f649f2c43f54783cf4e0b2c4bc28b4c27c63, verified on main.

These are deterministic harness/contract tests; no authenticated live channel run was requested or claimed.

Production-file coverage (176 files over 200 lines)

QA Lab lane l343 coverage

Integrated base: be8190f2f8c4f63eb2a3831a32dfd3e127573fe7. All 176 production TypeScript/CSS files over 200 lines, sorted by base size; tests, fixtures and generated files excluded. The initial discovery base had 177 such files; the integrated base has 176, all covered. Protected overlap files were read without editing.

Lines File Result
3686 extensions/qa-lab/web/src/styles.css READ: Declarative styling and responsive/theme contracts; retained without compression or visual changes.
2422 extensions/qa-lab/src/providers/mock-openai/server.ts READ: removed the single-use pre-outcome snapshot DTO; requestLog.record remains the complete snapshot type boundary. Scenario ordering and early remembered/forked fallback entrypoints make apparent repeated assistant branches reachable.
1698 extensions/qa-lab/src/cli.runtime.ts READ: inlined the one-use manual model adapter and removed a thinking-value check already guaranteed by the parser; remaining CLI validation, flag routing, and output text are contracts.
1618 extensions/qa-lab/src/suite-launch.runtime.ts READ: excluded from edits because PR 163917 owns this file; weighted partition scheduling and retained observation custody are real lifecycle responsibilities.
1504 extensions/qa-lab/web/src/app.ts READ: Removed unused force-scroll parameter and single-promise allSettled wrapper; preserved polling, selection, saved-view normalization, and UI lifecycle behavior.
1396 extensions/qa-lab/src/runtime-parity.ts READ; removed duplicate completion state and single-use usage/environment wrappers; transcript/trajectory ordering, telemetry provenance, and failure classification remain required.
1328 extensions/qa-lab/src/scorecard-taxonomy.ts READ; simplified schema-enforced unique coverage ownership, category-local missing references, repeated validation paths, and repo-path forwarding; remaining schemas and diagnostics preserve authored contracts.
1191 extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts READ: calls CommandRunner directly and records remote failure with straight-line try/catch; retained remote bootstrap, approval watcher, recovery, and credential cleanup contracts.
1189 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-destructive.ts READ; protected l326 overlap; typed recovery runner already consolidates CLI acquisition and cleanup while preserving scenario diagnostics.
1071 extensions/qa-lab/src/live-transports/discord/discord-live.runtime.ts READ: config, endpoint selection, polling and distinct scenario assertions retain real transport and report contracts.
995 extensions/qa-lab/src/evidence-gallery.ts READ; remaining complexity protects path containment, artifact authorization, privacy sanitization, producer context, and bounded previews.
966 extensions/qa-lab/src/lab-server.ts READ; request validation, evidence access, active-suite admission, UI proxying, and shutdown have distinct wire and lifecycle contracts; no sound large consolidation remains.
945 extensions/qa-lab/src/runtime-tool-fixture.ts READ; protected overlap with PR 163917; linked happy/failure receipts and workspace containment checks remain required.
803 extensions/qa-lab/src/gateway-process-boundary.ts READ; process identity, environment attestation, retained-lease quarantine, and UID quiescence are security and lifecycle contracts rather than accidental defensive layers.
777 extensions/qa-lab/src/confidence-report.ts READ; validation distinguishes unknown evidence from classified failures and preserves manifest, failure-order, and report-output contracts.
717 extensions/qa-lab/src/crabline-transport.ts READ; protected overlap with lane l326 / PR 163911; provider-native correlation and per-channel transport policy must remain distinct.
712 extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.ts READ: broker parsing, bounded chunks, retries, current lease authority and settled heartbeat ownership are required.
688 extensions/qa-lab/src/live-transports/telegram/adapter.runtime.ts READ: participant routes, native receipts, deferred replies and quarantine settlement are distinct lifecycle responsibilities.
678 extensions/qa-lab/src/character-eval.ts READ: removed unused scalar judge selection and judge thinking default, inlined its single-use option resolver, and removed a one-use status alias; retained model defaults, ranking validation, concurrency, and report formatting.
673 extensions/qa-lab/src/mantis/visual-task.runtime.ts READ: deleted the one-call visual-driver argument builder, removed constant stdio and unused error callback options, and calls CommandRunner directly.
654 extensions/qa-lab/src/providers/mock-openai/mock-openai-input.ts READ: conversation fencing, protected runtime carriers, malformed protocol input handling, and bounded image traversal each preserve distinct wire or history behavior; no sound further consolidation found.
651 extensions/qa-lab/src/test-file-scenario-runner.ts READ: command execution, producer-evidence validation, instance scheduling, and retained selection are distinct contracts; no sound further simplification found without changing evidence semantics.
643 extensions/qa-lab/src/live-transports/matrix/substrate/config.ts READ; protected l326 overlap; config ownership restoration and scenario-specific override semantics remain necessary.
638 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-approval.ts READ; approval metadata, duplicate delivery, reaction and channel/DM assertions protect distinct protocol behavior.
633 extensions/qa-lab/src/cli.ts READ: removed unnecessary option temporaries and provider alias; help order, flag descriptions, explicit-empty selection checks, and lazy runtime loading are retained contracts.
625 extensions/qa-lab/src/evidence-summary-schema.ts READ; occurrence, retry, receipt, and containment checks protect independent custody invariants and retained v2/v3 artifact contracts.
607 extensions/qa-lab/src/evidence-summary.ts READ; reused resolved containment for effective outcome projection; retained format-specific builders and profile validation side effects.
606 extensions/qa-lab/src/live-transports/matrix/substrate/recording-proxy.ts READ; route/body redaction, principal-specific sync aliases, ordering and retry evidence have separate reporting contracts.
600 extensions/qa-lab/src/agentic-parity-report.ts READ; reused canonical comparison rows for required coverage evaluation while retaining diagnostic order and report shapes.
597 extensions/qa-lab/src/scenario-catalog.ts READ: removed a generic one-use YAML reader and parsed the already-read untrimmed pack bytes; schemas, duplicate-ID checks, distribution fallback, and catalog caches retain their named responsibilities.
589 extensions/qa-lab/src/providers/mock-openai/mock-openai-tool-routing.ts READ: native Code Mode, guest Code Mode, direct tools and catalog dispatcher carry distinct output and lifecycle contracts; retained authorization and progress evidence checks.
573 extensions/qa-lab/src/suite-runtime-agent-session.ts READ: tool activity projection already has a canonical owner; remaining transcript reset, compaction, pending-run, and FTS-settlement checks serve observed evidence contracts.
571 extensions/qa-lab/src/live-transports/matrix/substrate/client.ts READ; registration UIAA, media uploads, room lifecycle and observer cursor adapters retain distinct Matrix REST boundaries.
567 extensions/qa-lab/src/multipass.runtime.ts READ; protected overlap with lane l326 / PR 163911; guest bootstrap, host paths, secret redaction, and teardown remain separate responsibilities.
566 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.ts READ; removed unused no-reply predicate and inlined single-use actor stream creation into its cache owner.
559 extensions/qa-lab/src/live-transports/slack/channel-e2e.ts READ: receipt ownership, write uncertainty, scoped mutations and post-Gateway cleanup preserve native fixture safety.
542 extensions/qa-lab/src/providers/mock-openai/mock-openai-contracts.ts READ: removed single-use MockOpenAiRequestSnapshotBase DTO and unused embedding dimensions knob. Protocol event discriminants and fixture strings remain unchanged.
520 extensions/qa-lab/src/mantis/run.runtime.ts READ: removed unread allowFailures option and scenario id fields; retained baseline/candidate worktree ownership, interrupted cleanup budget and atomic evidence publication.
518 extensions/qa-lab/src/evidence-invocation.ts READ; child admission, immutable observations, pending imports, and whole-attempt selection are required ownership boundaries.
515 extensions/qa-lab/src/live-transports/discord/channel-e2e.ts READ: exact write receipts, correlation and owned cleanup are required; no interchangeable Slack driver policy.
514 extensions/qa-lab/src/live-transports/slack/slack-live.observations.ts READ: native schemas, approval evidence, exact message reads and complete fallback delivery checks are active contracts.
510 extensions/qa-lab/src/gateway-child-setup.ts READ; protected overlap with lane l326 / PRs 163911 and 163917; packaged-candidate repair and isolated auth staging retain distinct contracts.
507 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-state-files.ts READ; SQLite and legacy fixtures remain current tagged-state recovery inputs; chunk integrity and identity probes cannot be collapsed safely.
505 extensions/qa-lab/src/suite-summary.ts READ: scenario counts and evidence check rows deliberately differ; failed-closed accounting and optional report-only skip rules cannot be collapsed without changing verdict semantics.
498 extensions/qa-lab/src/qa-transport.ts READ; protected overlap with lane l326 / PR 163911; polling, account readiness, failure cursors, and outbound lineage are independent contracts.
496 extensions/qa-lab/src/live-transports/matrix/substrate/fault-proxy.ts READ; byte-preserving proxy body collection has different error/drain semantics from shared text request reader; retained lifecycle and HTTP safeguards.
496 extensions/qa-lab/src/suite-planning.ts READ: excluded from edits because PR 163917 owns this file; selection, transport policy, isolation, and staggered fail-fast draining retain separate contracts.
495 extensions/qa-lab/src/profile-evidence-sharding.ts READ; removed a forwarding helper and unnecessary reconstructed category map; affinity grouping and aggregate artifact containment retain real contracts.
493 extensions/qa-lab/src/mantis/run-cleanup.runtime.ts READ: deadline and inode checks govern real destructive worktree cleanup. Historical Mantis paths were introduced September 2026; Git porcelain fallback is a named dependency compatibility contract.
492 extensions/qa-lab/src/suite-run-standard.ts READ: excluded from edits because PR 163917 owns this file; provider/Gateway/transport teardown, retry custody, heap evidence, and terminal publication order are deliberate.
489 extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client.ts READ; SDK state bridge, crypto lifecycle and room cursor handling preserve distinct async protocols; no safe consolidation with HTTP observer.
484 extensions/qa-lab/src/live-transports/slack/adapter.runtime.ts READ: lazy polling, native write capture and late receipt custody have distinct admission and teardown boundaries.
481 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-environment.ts READ; config diff replacement-path ownership, generation readiness, observer reset and restart callbacks enforce distinct lifecycle boundaries.
479 extensions/qa-lab/src/mantis/discord-smoke.runtime.ts READ: removed single-use snowflake assertion wrapper, repeated label parameter and async wrapper around synchronous token selection; error strings and API order remain identical.
478 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-media.ts READ; inlined four one-use media/voice wrappers and artifact builders without changing prompts, errors or report fields.
477 extensions/qa-lab/src/coverage-report.ts READ; search, inventory grouping, and command suggestions serve distinct CLI output contracts; no further sound structural reduction found.
477 extensions/qa-lab/src/live-transports/slack/slack-live.scenario-implementations.ts READ: scenario descriptors already share native data and approval owners; remaining assertions differ meaningfully.
474 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-tool-progress.ts READ; each preview/completion option is used by a distinct scenario and protects observed event ordering or mention safety.
474 extensions/qa-lab/web/src/ui-render-content.ts READ: Inlined one-caller chat selection/filtering wrappers to remove copied UiState; retained account/kind isolation and external-thread root behavior.
469 extensions/qa-lab/src/live-transports/matrix/adapter.runtime.ts READ; logical/native event mappings, interruption generations and lifecycle cleanup remain independently required.
468 extensions/qa-lab/src/bus-server.ts READ; protected overlap with lane l326 / PR 163911; existing schema dispatch already owns endpoint validation and bounded request handling.
465 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-room.ts READ; fixed acquired fault proxy leak when recovery client construction rejects; room isolation and trust/fault assertions retained.
461 extensions/qa-lab/src/suite.ts READ: lazy runtime boundary, ordered cleanup aggregation, transport cleanup after proven Gateway settlement, and heap checkpoint PID fencing are required responsibilities.
458 extensions/qa-lab/src/scenario-flow-runner.ts READ: dynamic YAML values require runtime validation; named import loaders preserve bundling and action wrappers enforce abort fencing plus finally cleanup.
456 extensions/qa-lab/src/qa-credentials-admin.runtime.ts READ; existing postJson owner already consolidates authenticated requests; schemas, specific diagnostics, and credential fingerprints protect the admin contract.
446 extensions/qa-lab/web/src/ui-render-evidence.ts READ: Concrete artifact and matrix rendering has distinct formats, fallback messages, and media-deferral behavior; no sound further simplification found.
441 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-shared.ts READ; shared verification waits, actor clients and joined cleanup already canonicalize real repeated flows.
441 extensions/qa-lab/web/src/ui-render-capture-model.ts READ: Derived fields serve capture subviews and active controls; no sound independent deletion found.
438 extensions/qa-lab/src/providers/mock-openai/mock-openai-assistant-text.ts READ: apparent duplicate scenario branches remain reachable through early remembered-fact and forked-context callers, so deleting them would change combined-prompt precedence.
435 extensions/qa-lab/src/tool-activity.ts READ; receipt correlation, conflicting identifiers, partial shell settlement, and stable nested scope ordering are independent evidence invariants.
434 extensions/qa-lab/src/token-efficiency-report.ts READ; measured/derived/unavailable cache telemetry distinctions prevent false efficiency proof; report fields and notes remain required.
432 extensions/qa-lab/src/run-config.ts READ; protected overlap with lane l326 / PR 163911; explicit selection errors, exclusions, and profile defaults preserve runner behavior.
430 extensions/qa-lab/web/src/ui-render-capture-timeline.ts READ: Geometry, marker packing, flow links, focus state, and lane rendering implement distinct visible behavior; retained.
420 extensions/qa-lab/src/suite-runtime-agent-process.ts READ: agent/chat routing, gateway retry metadata, managed dreaming recognition, and persisted tool-result settlement are distinct observable QA contracts.
399 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-cli-account.ts READ; account setup/idempotence/fault evidence differs; cleanup aggregates arbitrary rejections and joins both owners.
397 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-messages.ts READ; encrypted basic, thread, restart, notice and media scenarios assert different boundaries and redaction formats.
396 extensions/qa-lab/src/mantis/run-artifacts.runtime.ts READ: retained staging rollback, safe artifact remapping and normalized/legacy evidence readers. Current before/after defaults explicitly target May 2026 commits and require old summary artifacts.
389 extensions/qa-lab/src/suite-runtime-flow.ts READ: excluded from edits because PR 163917 owns this file; scenario and preparation deadlines, cleanup capabilities, and dependency exposure must remain ordered.
386 extensions/qa-lab/src/providers/mock-openai/mock-openai-events.ts READ: event creation already uses MockResponseStream; remaining helpers encode distinct streaming, reasoning, partial-failure and exact-byte scenario fixtures.
377 extensions/qa-lab/src/providers/mock-openai/mock-anthropic-wire.ts READ: removed one-call native-ID predicate and per-response memoization around deterministic ID hashing; wire conversion ordering and output fields remain identical.
376 extensions/qa-lab/src/suite-runtime-gateway.ts READ: config retry logic distinguishes conflicts, completed restarts, rate limits, and no-op writes; removing these paths risks duplicate state changes.
373 extensions/qa-lab/src/live-transports/discord/discord-transcripts-authorization.runtime.ts READ: denial, authorized join and emergency stop/leave proof each protect separate outcomes.
371 extensions/qa-lab/src/providers/mock-openai/mock-openai-tooling.ts READ: request planning already uses shared stream and fixture owners; remaining tool branches supply different capability arguments and failure behaviors.
371 extensions/qa-lab/src/suite-runtime-parity-runner.ts READ: parity cells retain independent child history and parent diagnostics; common-looking worker code has different selection and reconciliation behavior from isolated suites.
368 extensions/qa-lab/src/providers/mock-openai/mock-openai-directives.ts READ: directive extractors protect different precedence, delimiter, namespace and current-runtime contracts; recursive lookup supports native namespace declarations.
367 extensions/qa-lab/src/mantis/crabbox-runtime.ts READ: removed runCommand forwarding layer and migrated every caller to CommandRunner. Retained lease acquisition owner and SSH-port selection before artifact transfer.
364 extensions/qa-lab/src/bundled-plugin-staging.ts READ; consolidated source and canonical manifest selection into collectQaBundledPluginSources, removing repeated discovery and single-use selection wrappers while preserving precedence.
364 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.observations.ts READ: sender/route/time filtering, ordered reactions and exact batch accounting preserve scenario evidence.
361 extensions/qa-lab/src/qa-gateway-config.ts READ; protected overlap with lane l326 / PRs 163911 and 163917; mock/live/Codex provider routing and transport config have concrete differing contracts.
358 extensions/qa-lab/src/gateway-child-lifecycle.ts READ; one lifecycle already owns admission, all spawned processes, retained artifacts, and retryable cleanup; removing state would weaken process settlement.
358 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.scenario-implementations.conversation.ts READ: quoting, pending context, activation restoration and broadcast assertions are distinct contracts.
356 extensions/qa-lab/src/mantis/slack-desktop-smoke.artifacts.ts READ: validation prevents stale, foreign or missing approval screenshots from claiming success; safe staging and publication ownership remain necessary.
356 extensions/qa-lab/src/providers/aimock/server.ts READ: journal cursor, evicted-body bounded projections and result correlation are meaningful AIMock-specific behavior. Kept discriminated projection branches required by TypeScript correlation.
354 extensions/qa-lab/src/live-transports/slack/slack-live.scenario-fixtures.ts READ: strict progress identity, redaction and presentation assertions are active regressions.
354 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.scenario-implementations.capabilities.ts READ: media, poll, structured input and concurrent send scenarios require distinct evidence.
354 extensions/qa-lab/src/test-file-scenario-docker-batch.ts READ: candidate identity binding, repeated lane batching, and resolved alias matching are required; explicit schema and environment validation remain meaningful.
353 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-cli-gateway.ts READ; config decoy preservation and post-setup encrypted Gateway reply require separate full flows.
353 extensions/qa-lab/src/live-transports/telegram/userbot-driver.runtime.ts READ: external protocol validation, pending command settlement and process teardown retained.
350 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-room.ts READ; reused narrowed reaction artifact projection; membership restoration and block-stream assertions retain ordering guarantees.
350 extensions/qa-lab/src/live-transports/slack/slack-live.contracts.ts READ: wire schemas, native block fixtures and scenario contracts retain independent meanings.
350 extensions/qa-lab/src/web-runtime.ts READ: page acquisition, abort ownership, late handles and retained cleanup failures are real browser lifecycle contracts.
349 extensions/qa-lab/src/gateway-child.ts READ; startup and replacement converge through one launch owner; retries, authority checks, and unsent RPC replay distinctions are required.
349 extensions/qa-lab/src/mantis/desktop-browser-smoke.runtime.ts READ: calls CommandRunner directly; preserved browser profile restoration, screenshot requirements and passing-run lease cleanup.
339 extensions/qa-lab/src/docker-harness.ts READ; most size is emitted compose, environment, and README bytes; renderer arguments reflect real CLI options and are preserved.
338 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-cli.ts READ; process settlement, secret redaction, private state and interactive input each have a named lifecycle/security contract.
337 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.config.ts READ: broadcast roster ownership, audio preflight and channel policy builders serve distinct scenarios.
335 extensions/qa-lab/src/tool-coverage-report.ts READ; removed single-use summary-index wrapper and impossible empty-group guard; preserved status normalization for untrusted summary JSON.
333 extensions/qa-lab/web/src/ui-render-capture-format.ts READ: Replaced one-caller renamed SSE option bag with concrete arguments and removed unused frame id; preserved payload rendering and redaction.
332 extensions/qa-lab/src/lab-server-ui.ts READ; HTTP and WebSocket transports require distinct adapters; connection bounds, credential replacement, and path containment remain necessary.
331 extensions/qa-lab/src/suite-run-isolated.ts READ: partial artifact serialization, exclusive credential release, child import-once behavior, and cleanup aggregation cannot be replaced by parity lifecycle code without semantic changes.
330 extensions/qa-lab/src/gateway-log-sentinel.ts READ; rule descriptors already consolidate log scanning; transcript sentinel correlation and stable findings are separate report contracts.
321 extensions/qa-lab/src/live-transports/matrix/substrate/events.ts READ; event classification and relation/approval/attachment projections implement differing wire shapes and report omission semantics.
318 extensions/qa-lab/src/live-transports/discord/channel-e2e-recorder.ts READ: continuous native observation, heartbeat failure, correlation and privacy bounds retained.
317 extensions/qa-lab/src/crabline-discord-replies.ts READ; protected overlap with lane l326 / PR 163911; retained final-delivery receipts and HTTP/WebSocket endpoint rewriting are real transport contracts.
316 extensions/qa-lab/src/harness-parity.ts READ; prompt, tool schema, execution shape, and usage drift have different evidence and report semantics; no sound further unification found.
316 extensions/qa-lab/src/live-transports/slack/slack-live.capture.ts READ: successful, rejected and uncertain native mutations require separate evidence classifications.
315 extensions/qa-lab/src/gateway-child-process.ts READ; raw and redacted cursors intentionally differ; bounded log retention and cross-platform process-tree settlement cannot be collapsed safely.
315 extensions/qa-lab/src/profile-evidence-plan.ts READ; explicit proof obligations, selected-attempt rules, source matching, and attestation digests retain distinct evidence contracts.
312 extensions/qa-lab/src/confidence-self-test.ts READ; synthetic canaries exercise different verdict owners and preserve output inventory; consolidating them further would replace straightforward cases with machinery.
312 extensions/qa-lab/src/live-transports/slack/slack-live.codex-approval.ts READ: native approval route and actual operation/transcript proof retained.
305 extensions/qa-lab/src/bus-state.ts READ; protected overlap with lane l326 / PR 163911; monotonic cursors, account/conversation identity, and terminal waiter fencing are required.
301 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.scenario-implementations.user-path.ts READ: shared group/DM factories already consolidate common setup; remaining media and quote checks differ.
299 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-streaming-preview.ts READ; retained-draft and preview scenarios independently prove redaction targets, replacement identity and final retention.
298 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-cli-shared.ts READ; protected l326 overlap; shared CLI JSON, account registration and SAS helpers already absorb repeated work.
296 extensions/qa-lab/src/fixture-utils.ts READ; bounded fetch, tolerant diagnostic parsing, exact identifier matching, and SQLite/JSONL transcript sources serve distinct fixture contracts.
295 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-verification.ts READ; shared SAS owner already exists; QR, stale-device and DM verification need their distinct boundary assertions.
294 extensions/qa-lab/src/providers/live-frontier/auth.ts READ: environment keys, configured SecretRefs, setup tokens and portable Codex auth have distinct real routes; no safe behavior-neutral reduction beyond already shared auth-store owner found.
292 extensions/qa-lab/web/src/ui-render-capture-controls.ts READ: Repeated selects and filters already share concrete renderers; remaining branches are active controls.
288 extensions/qa-lab/src/runtime-tool-native-workspace.ts READ; original-entry-point workspace mutations and linked native receipts protect actual execution; per-operation error wrapping preserves session attribution.
286 extensions/qa-lab/src/live-transports/slack/slack-live.message-observations.ts READ: reply, no-reply, settle and readiness loops have different deadlines and diagnostics.
281 extensions/qa-lab/src/live-transports/slack/slack-live.config.ts READ: provider, progress, tool and approval settings preserve distinct scenario inputs.
281 extensions/qa-lab/web/src/ui-render-capture-detail.ts READ: User-selectable flow, payload, headers, and overview views have distinct output; retained.
279 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-recovery.ts READ; recovery, owner trust and backup lifecycle sequencing has observable cleanup and crypto semantics.
279 extensions/qa-lab/src/qa-cli-process.ts READ; inlined the single-use payload matcher factory and predicates, narrowed its unused environment fields, and removed the trailing export forwarder; parsing precedence and process settlement stay unchanged.
278 extensions/qa-lab/web/src/ui-render-shell.ts READ: Concrete shell/config output and shared model select rendering; retained exact UI strings and output.
277 extensions/qa-lab/src/mantis/cli.ts READ: removed exclusion for deleted unread allowFailures field; remaining Commander adapters preserve CLI flag spelling, descriptions, ordering and runtime laziness.
274 extensions/qa-lab/src/process-tree-cpu.ts READ; one metric reader already handles both CPU and RSS; Windows telemetry and Linux leader-exit RSS handling have distinct platform contracts.
267 extensions/qa-lab/src/live-transports/slack/slack-live.approvals.ts READ: pending/native-action/resolution checkpoints each protect actual approval lifecycle evidence.
264 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-thread.ts READ; shared thread runner and artifact owner already consolidate setup while explicit/nested reply assertions remain distinct.
263 extensions/qa-lab/src/posix-command-settlement.ts READ; terminal outcome, descendant quiescence, and pipe drain are separate states; timers and event handlers encode actual races and bounded cleanup.
262 extensions/qa-lab/web/src/ui-types.ts READ: Browser state and wire-view contracts use existing owners; no meaningful simplification without obscuring contracts.
261 extensions/qa-lab/src/scenario-module-flow.ts READ: excluded from edits because PR 163917 owns this file; module and shared flow lowering retains authored lane metadata and executable scenario semantics.
260 extensions/qa-lab/src/live-transports/discord/adapter.runtime.ts READ: native scenario preparation, observed bus delivery and lease-owned cleanup are required.
258 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-cli-verification.ts READ; interactive SAS control flow protects secret delivery, transaction selection, owner trust and joined CLI cleanup.
252 extensions/qa-lab/src/live-transports/discord/discord-live.evidence.ts READ: concrete normalization and two different HTML evidence formats; no presentation changes.
251 extensions/qa-lab/src/live-transports/discord/scenario-runtime.ts READ: specialized command, voice, progress and reply flows retain scenario semantics.
250 extensions/qa-lab/src/profile-planning.ts READ; membership and execution eligibility are distinct responsibilities; driver, provider, and requested-scenario diagnostics are preserved.
246 extensions/qa-lab/src/jsonl-replay.ts READ; file traversal, accepted transcript prefixes, per-turn runtime parity, and markdown output remain direct and preserve replay behavior.
244 extensions/qa-lab/src/providers/mock-openai/mock-openai-responses-websocket.ts READ: connection-local cache, warmup requests, inherited delta input and response sequence numbers implement real Responses websocket semantics; retained.
242 extensions/qa-lab/web/src/ui-render-capture-timeline-model.ts READ: Ranking, geometry, lane sorting, and focus filtering serve active controls; retained.
241 extensions/qa-lab/src/qa-transport-registry.ts READ; factory preparation, module-flow validation, and retryable serialized cleanup have multiple live callers and concrete ownership contracts.
241 extensions/qa-lab/src/runtime-tool-evidence.ts READ; provider wire normalization funnels into the canonical tool-activity owner; call/result identity and failure classification cannot be replaced with inventory-only proof.
240 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-restart.ts READ; transport restart, queued catchup and persisted stale-cursor replay require different actual-entry proof paths.
239 extensions/qa-lab/src/qa-credentials-bootstrap.ts READ; launcher fallback reflects installed-tool differences; authenticated connection resolution and cleanup uncertainty must retain their separate diagnostics.
235 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-cli-recovery.ts READ; valid and rejected recovery-key scenarios differ in CLI execution, response diagnostics and cleanup contract.
232 extensions/qa-lab/src/live-transports/telegram/cli.runtime.ts READ: published SUT command/process-boundary validation and Telegram list formatting remain distinct.
232 extensions/qa-lab/src/live-transports/whatsapp/adapter.runtime.ts READ: auth acquisition rollback, observed message routing and Gateway-before-lease cleanup retained.
232 extensions/qa-lab/src/suite-evidence.ts READ: invocation owner already centralizes scheduling and selection; retained artifact hashes and generation-relative path rebasing protect immutable evidence.
231 extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client-internals.ts READ; operation admission, timed shutdown, joined work and relation rehydration are real lifecycle/event-order contracts.
229 extensions/qa-lab/src/live-transports/slack/scenario-runtime.ts READ: native write capture precedes reply history and scenario callbacks retain cleanup context.
227 extensions/qa-lab/src/live-transports/whatsapp/scenario-runtime.ts READ: consolidated successful result metadata at the scenario owner and removed repeated result construction.
225 extensions/qa-lab/src/live-transports/matrix/substrate/sync.ts READ; shared poll promise and per-room monotonic cursors protect concurrent observation; cannot merge with E2EE event semantics.
225 extensions/qa-lab/src/providers/env.ts READ: SKIPPED edits because l326 and open PR 163911 own the file; inspected alias, auth forwarding and mock-secret scrubbing behavior.
224 extensions/qa-lab/src/live-transports/matrix/substrate/harness.runtime-internals.ts READ; racing network readiness and deadline-aware cancellation protect distinct host/container route failure modes.
220 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.contracts.ts READ: removed unused broad result DTO and metadata builder; inference uses the real result owner.
220 extensions/qa-lab/src/mantis/run-command.runtime.ts READ: command wrapper owns timeout, abort, process-tree extinction and pinned working-directory receipts; it is not a redundant forwarding layer.
218 extensions/qa-lab/src/live-transports/slack/channel-e2e-observations.ts READ: credential-safe errors, scopes, exact identities and cursor-safe native reads are required.
217 extensions/qa-lab/src/native-workspace-behavior.ts READ; six behavior descriptors already use one native execution owner; their different commands, sentinels, and expected mutations are scenario semantics.
216 extensions/qa-lab/src/live-transports/telegram/private-production.runtime.ts READ: operator-owned local-app attestations and private proof-file lifecycle retained.
212 extensions/qa-lab/src/gateway-child-env.ts READ; protected overlap with lane l326 / PRs 163911 and 163917; final scrubbing, isolated state, and forced-runtime setup are required boundaries.
212 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.approvals.ts READ: correlated pending/resolved observations and reaction/RPC paths preserve native approval behavior.
212 extensions/qa-lab/src/test-file-scenario-script-evidence.ts READ: path confinement, canonical evidence validation, unfinished scenario detection, and blocked/failed precedence are required proof contracts.
205 extensions/qa-lab/src/browser-runtime.ts READ; request helpers correspond to real supported browser commands and query fields; readiness and timeout behavior remain required.
205 extensions/qa-lab/src/ci-smoke-plan.ts READ; taxonomy eligibility, coverage completeness, and channel affinity enforce independent CI contracts; no safe removal beyond already shared profile planning.
203 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-destructive-recovery.ts READ; protected l326 overlap; recovery CLI evidence and diagnostic predicates have actual callers.
202 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.scenario-implementations.delivery.ts READ: existing approval factory and distinct chunk/reaction/allowlist checks retained.

@clawsweeper

clawsweeper Bot commented Oct 3, 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 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 2:18 AM ET / 06:18 UTC (Revision 2).

ClawSweeper review

What this changes

Simplifies QA Lab’s scenario runners, reports, provider mocks, command adapters, and browser helpers, repairs scenario references, and closes a Matrix fault proxy when recovery-client startup fails.

Merge readiness

✅ Ready for maintainer review

Keep open: the branch retains useful, distinct cleanup and fixes a Matrix resource leak still present on fetched main. No concrete introduced correctness defect or security concern was found.

Priority: P2
Reviewed head: c116c5e9761dbbf706fe3946606917ebde9ff392

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful internal simplification with a focused cleanup regression and no supported blocking finding; execution results remain contributor-reported.
Proof confidence 🌊 off-meta tidepool Not applicable: The verified repository-admin author is exempt from ordinary contributor proof. The Matrix cleanup regression uses mocked startup failure and is supplemental coverage; reported Crabbox harness checks are not claimed as live Matrix evidence. No stored-data contract changes were identified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The verified repository-admin author is exempt from ordinary contributor proof. The Matrix cleanup regression uses mocked startup failure and is supplemental coverage; reported Crabbox harness checks are not claimed as live Matrix evidence. No stored-data contract changes were identified.
Evidence reviewed 8 items Pinned introduction reviewed: Reviewed the merge-base-to-head introduced hunks across scenario execution, staging, reports, mocks, Mantis commands, browser helpers, and scenario metadata. Endpoint drift was not treated as PR-owned changes.
Distinct fix remains necessary: Fetched main still creates the recovery client before entering try/finally after acquiring the fault proxy. Client startup rejection therefore bypasses proxy cleanup; the proposed branch moves that acquisition inside the cleanup boundary.
Focused cleanup regression: The added owner-boundary regression injects recovery-client startup rejection, verifies propagation of the original failure, and requires one proxy stop. The body reports baseline failure and after-fix success, 32 ms regression time, and 2.86 s single-worker file wall time. This is mocked regression coverage, not authenticated Matrix proof.
Findings None None.
Security None None.

How this fits together

QA Lab is OpenClaw’s private testing plugin. It takes scenario definitions and operator commands, exercises Gateway and transport boundaries, and produces reports and debugger views.

flowchart TD
  A[Scenario definitions] --> C[QA Lab runners]
  B[Operator commands] --> C
  C --> D[Gateway and transport adapters]
  D --> E[Observed results]
  E --> F[Evidence and reports]
  E --> G[Debugger views]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -423, Tests +37, Other 0. Total -386 across 40 files.

View PR surface stats
Area Files Added Removed Net
Source 36 429 852 -423
Tests 2 41 4 +37
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 2 2 0
Total 40 472 858 -386

Review metrics

None.

Technical review

Best possible solution:

Keep scenario and evidence contracts with their existing owners while removing redundant adapters and ensuring acquired Matrix resources are released on startup failure.

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

Yes, from source: rejecting recovery-client startup after proxy acquisition on fetched main bypasses cleanup. No runtime reproduction was executed in this read-only review.

Is this the best way to solve the issue?

Yes. Moving acquisition inside the existing cleanup owner and consolidating internal forwarding paths is a focused repair without adding configuration or competing ownership.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 65d5066c6e90.

Labels

Label changes:

  • add P2: This is bounded internal QA improvement with a concrete resource-cleanup repair and limited product blast radius.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from ordinary contributor proof. The Matrix cleanup regression uses mocked startup failure and is supplemental coverage; reported Crabbox harness checks are not claimed as live Matrix evidence. No stored-data contract changes were identified.

Label justifications:

  • P2: This is bounded internal QA improvement with a concrete resource-cleanup repair and limited product blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from ordinary contributor proof. The Matrix cleanup regression uses mocked startup failure and is supplemental coverage; reported Crabbox harness checks are not claimed as live Matrix evidence. No stored-data contract changes were identified.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the merge-base-to-head introduced hunks across scenario execution, staging, reports, mocks, Mantis commands, browser helpers, and scenario metadata. Endpoint drift was not treated as PR-owned changes. (c116c5e9761d)
  • Distinct fix remains necessary: Fetched main still creates the recovery client before entering try/finally after acquiring the fault proxy. Client startup rejection therefore bypasses proxy cleanup; the proposed branch moves that acquisition inside the cleanup boundary. (extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-room.ts:191, 65d5066c6e90)
  • Focused cleanup regression: The added owner-boundary regression injects recovery-client startup rejection, verifies propagation of the original failure, and requires one proxy stop. The body reports baseline failure and after-fix success, 32 ms regression time, and 2.86 s single-worker file wall time. This is mocked regression coverage, not authenticated Matrix proof. (extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-room.test.ts:14, c116c5e9761d)
  • Existing contracts preserved: Caller searches confirm the removed internal judge options and embedding dimension argument are not required by production callers. CLI judge selection still supplies judgeModels and per-model options. Evidence projection preserves its schema-version split, while directory creation retains containment and symlink checks. (extensions/qa-lab/src/cli.runtime.ts:1369, c116c5e9761d)
  • Author trust verified: The supplied association fields disagree, but GitHub’s repository-permission endpoint confirms steipete has admin permission. The maintainer-authored proof exemption applies; this is not an external contribution awaiting contributor setup proof.
  • Captured body identity and review continuity: The fetched body matched captured SHA-256 3de69cd359ec4ad68e327da174108bdd8e207dcced172659bea4f626ba60acf0; its omitted portion is the production-file coverage table. The prior completed review reported no findings and published no rank-up moves. Its earlier head comparison could not complete because an unavailable Git object triggered a rejected lazy fetch; no unchanged-code or historical introduction claim is made. (c116c5e9761d)

Likely related people:

  • steipete: 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 (1 earlier review cycle)
  • reviewed 2026-10-03T04:23:59.479Z sha ce1365e :: needs maintainer review before merge. :: none

Remove redundant scenario result construction, report state, command forwarding, unused options, and repeated plugin manifest discovery while preserving QA contracts. Close the Matrix fault proxy when recovery client setup rejects.
Preserve startup-status rejection handling without growing the oversized app module. Retain the auth-profile fixture because its required assertion baseline pruning overlaps the active l326 lane.
Return the private capture array after marking missing results and retain explicit shard field projection, preserving output while satisfying the no-map-spread rule.
@steipete
steipete force-pushed the deslop/l343-simplify-qa-lab-20261002 branch from ce1365e to c116c5e Compare October 3, 2026 06:12
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@steipete
steipete merged commit dfc3f64 into main Oct 3, 2026
150 checks passed
@steipete
steipete deleted the deslop/l343-simplify-qa-lab-20261002 branch October 3, 2026 06:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
Reduce QA Lab's redundant scenario result construction, report state, command forwarding, unused options, and repeated plugin discovery while preserving scenario, CLI, evidence, and UI contracts.

Close the Matrix fault proxy when recovery-client startup fails. Verified with a regression that fails on the original owner, focused QA Lab and plugin contract tests, typechecks, lint, zero-cycle checks, and independent review. The PR includes full coverage for the below-threshold production reduction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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