Skip to content

refactor(qa): drive Matrix lifecycle through channel drivers - #101055

Merged
RomneyDa merged 6 commits into
mainfrom
dallin/wave2-matrix-lifecycle
Jul 7, 2026
Merged

RomneyDa merged 6 commits into
mainfrom
dallin/wave2-matrix-lifecycle

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

Closes #101054

What Problem This Solves

Matrix lifecycle proof needs to follow the same channel-driver selection seam as the rest of QA Lab. Selecting live:matrix should create the existing Matrix live transport, which privately owns Tuwunel; selecting crabline:matrix should create Crabline through the same transport-adapter registry.

Why This Change Was Made

This PR now puts the lifecycle foundation at the QA Lab transport-adapter boundary:

  1. createQaChannelDriverLifecycle() owns generic start, idempotent start, restart, stop, and resume control around createQaTransportAdapter().
  2. The selected driver is the only switch. live:matrix resolves the registered Matrix live adapter; crabline:matrix resolves the built-in Crabline adapter.
  3. Live adapter discovery is lazy, so exporting the lifecycle contract does not eagerly pull the live transport CLI graph into the default QA runtime entry.
  4. One parameterized live test runs the same five scenarios through both real drivers.
  5. The previous qa-matrix lifecycle helpers and private test API are removed. The final PR diff has no qa-matrix files; full plugin migration/removal remains separate follow-up work.

This is a test/runtime-control seam inside QA Lab, not an end-user Matrix runtime or configuration surface. It adds no environment variable and no Matrix-plugin policy.

User Impact

No end-user behavior or configuration changes. Maintainers get one channel-driver lifecycle contract and real parity proof for Tuwunel-backed live Matrix and Crabline without intertwining the foundation with the qa-matrix plugin.

The Matrix plugin bundle does not grow: the final diff contains no extensions/qa-matrix/** changes. QA Lab's runtime entry gains only the lifecycle export; channel-driver factory discovery remains a lazy dynamic import.

Evidence

Exact pushed head: 395b864d203.

Blacksmith Testbox tbx_01kwx3qb2wvp9x0mv9v3way3h1 (golden-crab):

  • OPENCLAW_BUILD_PRIVATE_QA=1 corepack pnpm build passed.
  • corepack pnpm test extensions/qa-lab/src/channel-driver-lifecycle.test.ts passed 2/2 tests.
  • node scripts/test-live.mjs -- extensions/qa-lab/src/matrix-channel-driver.lifecycle.live.test.ts passed both real drivers and all five lifecycle scenarios.
  • corepack pnpm tsgo:extensions passed.
  • corepack pnpm tsgo:extensions:test passed.
  • Targeted extension oxlint passed with 0 warnings and 0 errors.
  • git diff --check passed.

Fresh canonical autoreview thread 019f3a53-cf96-7f22-bd96-219e9a99b1d1 reported no accepted/actionable findings and judged the patch correct.

Developed with AI assistance. A sanitized agent transcript is available but is not included without explicit approval.

@RomneyDa
RomneyDa requested a review from a team as a code owner July 6, 2026 17:33
@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Jul 6, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: 395b864d2037ab9a3d50416fca2eb4ecdc49efa4

@github-actions github-actions Bot removed the dependencies-changed PR changes dependency-related files label Jul 6, 2026
@RomneyDa

RomneyDa commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper

clawsweeper Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 10:30 PM ET / 02:30 UTC.

Summary
The branch adds a QA Lab channel-driver lifecycle helper/export plus unit and live Matrix lifecycle coverage for both live and Crabline drivers.

PR surface: Source +128, Tests +141. Total +269 across 4 files.

Reproducibility: not applicable. This PR adds QA infrastructure coverage rather than fixing an end-user bug. Source review confirms current main lacks the new createQaChannelDriverLifecycle surface.

Review metrics: 1 noteworthy metric.

  • QA Lab runtime API exports: 2 functions and 5 types added. The PR expands the QA Lab runtime API surface, so maintainers should notice the new importable lifecycle contract before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #101054
Summary: This PR is the open candidate implementation for the canonical Matrix QA lifecycle parity issue; adjacent QA routing and CI-smoke items do not replace it.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Refresh or validate the exact merge head before landing because GitHub currently reports the PR as behind.

Risk before merge

  • [P1] The live PR is mergeable but behind its base, so maintainers should require exact merge-head checks or a refresh before landing.

Maintainer options:

  1. Decide the mitigation before merge
    Land the QA Lab lifecycle contract after maintainer review and exact-head validation if this exported runtime API is the intended Matrix parity seam.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair lane is appropriate because the PR has no discrete code blocker and needs normal maintainer review plus exact-head checks.

Security
Cleared: Cleared: the final diff adds QA Lab test/runtime-control code and exports, with no workflow, dependency, lockfile, script, secret, or production config change.

Review details

Best possible solution:

Land the QA Lab lifecycle contract after maintainer review and exact-head validation if this exported runtime API is the intended Matrix parity seam.

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

Not applicable: this PR adds QA infrastructure coverage rather than fixing an end-user bug. Source review confirms current main lacks the new createQaChannelDriverLifecycle surface.

Is this the best way to solve the issue?

Yes: driving Matrix lifecycle proof through the existing QA transport-adapter registry is the narrow owner-boundary fit; duplicating Matrix-only lifecycle helpers would be more likely to drift.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is bounded QA infrastructure parity work with limited runtime blast radius, not an urgent end-user regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster 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 external-contributor proof gate does not apply to this MEMBER/maintainer-labeled PR; the body includes terminal/Testbox evidence for build, focused unit, live Matrix lifecycle, type, lint, and diff checks.
Evidence reviewed

PR surface:

Source +128, Tests +141. Total +269 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 128 0 +128
Tests 2 141 0 +141
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 269 0 +269

What I checked:

  • Repository policy read: Root AGENTS.md and extensions/AGENTS.md were read; the extension boundary and PR review guidance applied because the PR changes a bundled plugin runtime API surface and QA Lab tests. (AGENTS.md:1, b2cecd8ece47)
  • PR lifecycle helper: The PR head defines createQaChannelDriverLifecycle with start, restart, stop, state tracking, lazy adapter factory discovery, and cleanup-backed stop semantics. (extensions/qa-lab/src/channel-driver-lifecycle.ts:41, 395b864d2037)
  • Current transport registry seam: Current main already centralizes QA transport creation through createQaTransportAdapter, with built-in Crabline routing and injectable live adapter factories, so the PR uses the existing owner boundary rather than duplicating a Matrix-only runtime path. (extensions/qa-lab/src/qa-transport-registry.ts:39, b2cecd8ece47)
  • Matrix live driver registration: Current main exposes a Matrix QA adapter factory matching live:matrix, which supports the PR's live driver path through QA Lab's adapter factory registry. (extensions/qa-matrix/src/cli.ts:59, b2cecd8ece47)
  • Live lifecycle coverage: The PR head adds a live test that loads the built runtime API and runs the same five lifecycle scenarios for live and Crabline Matrix drivers. (extensions/qa-lab/src/matrix-channel-driver.lifecycle.live.test.ts:52, 395b864d2037)
  • Live GitHub state: Live PR metadata shows the PR is open, not draft, mergeable but behind, has the maintainer label, and closes the canonical Matrix QA lifecycle parity issue. (395b864d2037)

Likely related people:

  • RomneyDa: Dallin Romney authored recent QA Lab channel-driver and Matrix QA adapter changes in the same transport path and authored this PR's current implementation branch. (role: recent area contributor and likely follow-up owner; confidence: high; commits: 253b784468c6, c1b9e3622162, 395b864d2037; files: extensions/qa-lab/src/crabline-transport.ts, extensions/qa-matrix/src/adapter.runtime.ts, extensions/qa-matrix/src/cli.ts)
  • zengLingbiao: Blame and log history show zengLingbiao on the current grafted QA transport registry, Matrix adapter factory wrapper, and Crabline adapter body that the new lifecycle drives through. (role: current transport registry contributor; confidence: medium; commits: db25e9ec5218; files: extensions/qa-lab/src/qa-transport-registry.ts, extensions/qa-lab/src/crabline-transport.ts, extensions/qa-matrix/src/adapter.runtime.ts)
  • gumadeiras: Gustavo Madeira Santana's Matrix QA split moved the Matrix live transport into the optional qa-matrix plugin and established much of the plugin boundary this PR builds on. (role: introduced Matrix QA plugin split; confidence: medium; commits: 82a2db71e892; files: extensions/qa-matrix/src/substrate/harness.runtime.ts, extensions/qa-matrix/src/cli.ts, extensions/qa-lab/src/live-transports/cli.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (5 earlier review cycles)
  • reviewed 2026-07-06T18:34:58.017Z sha aa67587 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T20:13:57.922Z sha ed2e697 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T20:30:32.332Z sha f55aaa9 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T21:29:09.873Z sha 056ad75 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T23:47:17.553Z sha 056ad75 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 6, 2026
@RomneyDa

RomneyDa commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@RomneyDa

RomneyDa commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jul 6, 2026
@RomneyDa

RomneyDa commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 6, 2026
@clawsweeper clawsweeper Bot added 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 Jul 6, 2026
@RomneyDa
RomneyDa force-pushed the dallin/wave2-matrix-lifecycle branch from f55aaa9 to 1826b11 Compare July 6, 2026 20:39
@RomneyDa

RomneyDa commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@RomneyDa
RomneyDa force-pushed the dallin/wave2-matrix-lifecycle branch from 1826b11 to 056ad75 Compare July 6, 2026 20:44
@RomneyDa

RomneyDa commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@RomneyDa RomneyDa changed the title improve(matrix): prove lifecycle parity across substrates test(matrix): verify lifecycle across Tuwunel and Crabline Jul 6, 2026
@RomneyDa RomneyDa changed the title test(matrix): verify lifecycle across Tuwunel and Crabline refactor(qa): drive Matrix lifecycle through channel drivers Jul 7, 2026
@RomneyDa

RomneyDa commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@RomneyDa
RomneyDa merged commit 3175d8e into main Jul 7, 2026
105 of 108 checks passed
@RomneyDa
RomneyDa deleted the dallin/wave2-matrix-lifecycle branch July 7, 2026 06:13
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
…w#101055)

* test(matrix): add substrate lifecycle contract

* fix(matrix): satisfy lifecycle dependency gates

* refactor(matrix): keep Crabline lifecycle in adapter

* refactor(qa): select Matrix lifecycle by driver lane

* refactor(matrix): keep lifecycle helpers test-only

* refactor(qa): drive Matrix lifecycle through channel drivers
sheyanmin pushed a commit to sheyanmin/openclaw that referenced this pull request Jul 8, 2026
…w#101055)

* test(matrix): add substrate lifecycle contract

* fix(matrix): satisfy lifecycle dependency gates

* refactor(matrix): keep Crabline lifecycle in adapter

* refactor(qa): select Matrix lifecycle by driver lane

* refactor(matrix): keep lifecycle helpers test-only

* refactor(qa): drive Matrix lifecycle through channel drivers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

[Feature]: Matrix QA lifecycle parity across Tuwunel and Crabline

1 participant