Skip to content

improve(qa): make module flow selection implementation-aware - #118069

Merged
RomneyDa merged 1 commit into
mainfrom
feat/qa-module-capability-contract
Aug 6, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
feat/qa-module-capability-contract

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Aug 2, 2026 •

Copy link
Copy Markdown
Member

Closes #118005

What Problem This Solves

QA Lab normalizes top-level module flows into ordinary flow steps before planning. That erased the fact that module flows depend on adapter-owned preparation, so eligibility was inferred from the module's ./live-transports/ source path instead of the selected transport implementation.

As a result, catalog layout owned an execution decision it could not prove. An implementation without module-flow preparation could be selected until runtime, where missing prepared context risked an unsupported execution being treated as QA coverage.

Why This Change Was Made

The catalog now preserves whether a flow was authored with module syntax as internal planning provenance. Transport factories use one narrow declaration, supportsModuleFlows: true, and every declared adapter is checked for prepareFlow when created. Planning filters unsupported module flows during implicit selection and reports the exact selected implementation during explicit selection.

This is not scenario metadata or a generic capability framework. No scenario YAML changes. The previous path-derived rule is removed. Named driver/channel constraints, selected implementation support, provider mode, model constraints, and auth constraints remain independent.

Discord, Matrix, Slack, and WhatsApp declare module-flow support because their adapters prepare flows. Telegram, Crabline, and the built-in QA channel do not. The catalog currently contains 143 module flows after main independently converted one prior module scenario to inline steps.

Historical overlap is resolved: #115777 and #116262 are closed, and #115777's evidence work was superseded by merged #119761. This patch preserves #119761's realized-driver/evidence semantics and does not change no-factory fallback behavior.

Production delta is +151/-45 (net +106), excluding tests and docs. The positive delta is the owner contract, lifecycle-safe rejection, and propagation through the independent CLI, profile, lab-server, runtime-pair, suite-planning, and runtime entry points; there is no compatibility or deprecation layer.

User Impact

No end-user behavior changes. QA operators get honest selection: module flows run only on implementations that prepare them, unsupported explicit selections explain which implementation cannot run the flow, and unsupported flows cannot fulfill coverage.

Evidence

  • Exact head: 36113539403ed9f9ef84b591ce8282c196191da1.
  • Catalog proof: 143 module flows classified from their authored syntax; zero qa/scenarios/** files changed.
  • Focused proof: 13 files, 259 tests passed across QA Lab and Plugin SDK shards.
  • Blacksmith changed-gate proof passed SDK surface/boundary checks, dead-code scans, and core/extension production and test typechecks. It found two patch-local issues in sequence (a fixture type and a lint expression); both were repaired, with focused tests and targeted lint green. Exact-head CI owns the final complete gate.
  • Required private-QA build passed on Blacksmith Testbox tbx_01kzbchf6y9pmrwyzvhewkckr8, Actions run 31096509614, including all 149 public Plugin SDK subpaths.
  • A factory/adapter mismatch attempts both cleanup phases before rejection; focused registry proof passed 13 tests, including cleanup failure without skipping post-gateway cleanup.
  • Fresh post-repair whole-branch autoreview: clean, no accepted/actionable findings; correctness confidence 0.97.
  • git diff --check passed.

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 7:32 AM ET / 11:32 UTC.

ClawSweeper review

What this changes

The PR records whether a QA flow was authored as a module and selects it only when the chosen transport adapter declares and fulfills module-flow preparation support.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No actionable patch defect found. The PR replaces a source-layout heuristic with the selected adapter’s documented capability, and it resolves both prior review findings; it remains open because it adds a compatibility-sensitive QA runner contract that needs normal maintainer acceptance.

Priority: P2
Reviewed head: 36113539403ed9f9ef84b591ce8282c196191da1
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a coherent, documented owner-boundary repair with no actionable correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored internal QA-infrastructure PR is outside the external-contributor real-behavior-proof gate; the supplied focused and exact-head CI evidence remains supplemental.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal QA-infrastructure PR is outside the external-contributor real-behavior-proof gate; the supplied focused and exact-head CI evidence remains supplemental.
Evidence reviewed 6 items Current-main behavior: Current main derives module eligibility from a module source-path prefix and injects a required live driver, so the central implementation-aware behavior is not already present.
Owner-boundary repair: The PR preserves authored module provenance in the catalog and makes lane matching reject module flows unless the selected implementation reports support.
All execution paths use selected factories: Profile, lab-server, and partitioned suite entry points pass factory-derived support into shared planning; multi-channel execution partitions before runtime adapter selection.
Findings None None.
Security None None.

How this fits together

QA Lab reads scenario YAML, plans a channel-specific execution lane, then creates an adapter to run the selected flows and emit QA evidence. This change ensures module-backed flows reach only adapters that can prepare their runtime context.

flowchart LR
  A[Authored QA scenarios] --> B[Scenario catalog]
  B --> C[Lane planner]
  D[Selected transport factory] --> E[Declared module support]
  E --> C
  C --> F[Transport adapter]
  F --> G[QA execution evidence]
Loading

Decision needed

Question Recommendation
Should OpenClaw accept supportsModuleFlows as the public optional QA-runner factory contract for module-backed flow eligibility? Accept the narrow capability contract: Keep the optional declaration, its creation-time invariant, and the documented opt-in behavior for adapters that prepare module context.

Why: The implementation is coherent, but accepting a new plugin-facing capability determines the long-term contract for third-party QA runner adapters.

Before merge

  • Resolve merge risk (P1) - The optional QA runner factory contract is compatibility-sensitive: a third-party factory that opts in but conditionally returns an adapter without prepareFlow will now fail at creation, intentionally.
  • Complete next step (P2) - A MEMBER-authored protected PR adds a plugin-facing capability contract; it needs maintainer acceptance rather than an automated repair.
Agent review details

Security

None.

PR surface

Source +108, Tests +203, Docs +8. Total +319 across 32 files.

View PR surface stats
Area Files Added Removed Net
Source 22 153 45 +108
Tests 8 218 15 +203
Docs 2 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 32 379 60 +319

Review metrics

Metric Value Why it matters
Production versus test delta production +151/-45; tests +220/-15 The production growth is attributable to one adapter-owned contract propagated through independent planning entry points, with focused regression coverage.

Stored data model

Persistent data-model change detected: vector/embedding metadata: extensions/qa-lab/src/run-config.test.ts, vector/embedding metadata: src/plugin-sdk/qa-runner-runtime.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #118005
Summary: This PR is the open implementation candidate for the canonical module-flow planning issue; merged execution-attestation work is adjacent but distinct.

Members:

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

Merge-risk options

Maintainer options:

  1. Accept the documented opt-in contract (recommended)
    Merge with the explicit understanding that opted-in third-party factories must supply prepareFlow for every created adapter.

Technical review

Best possible solution:

Adopt the optional factory capability as the single module-flow eligibility contract, with all opt-in adapters required to return prepareFlow and all other adapters retaining portable-flow selection.

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

Yes—source reproducible: current main derives eligibility from a module path, while the PR’s selected-factory path directly expresses the missing adapter capability check.

Is this the best way to solve the issue?

Yes—the selected adapter owns whether it can prepare module context, so preserving authored flow form until that selection is the narrowest maintainable fix.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • 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: This MEMBER-authored internal QA-infrastructure PR is outside the external-contributor real-behavior-proof gate; the supplied focused and exact-head CI evidence remains supplemental.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 availability: Current PR review merge-risk labels are merge-risk: 🚨 compatibility.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This repairs internal QA selection accuracy with bounded impact on operators and release evidence.
  • merge-risk: 🚨 compatibility: The PR adds an optional plugin-facing transport-factory capability whose opt-in changes adapter creation behavior.
  • 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: This MEMBER-authored internal QA-infrastructure PR is outside the external-contributor real-behavior-proof gate; the supplied focused and exact-head CI evidence remains supplemental.

Evidence

What I checked:

Likely related people:

  • fuller-stack-dev: Current-main blame ties the path-derived lane behavior and surrounding planning surface to this contributor’s retained commit. (role: recent QA planning contributor; confidence: high; commits: f5125a7e56f0; files: extensions/qa-lab/src/scenario-catalog.ts, extensions/qa-lab/src/scenario-lane.ts, extensions/qa-lab/src/suite-launch.runtime.ts)
  • vincentkoc: Authored merged QA execution-attestation work that this change explicitly preserves while changing earlier selection. (role: adjacent QA evidence owner; confidence: medium; commits: 7dcb1ad5ceeb; files: extensions/qa-lab/src/suite-launch.runtime.ts)
  • RomneyDa: The current PR author also has cited co-author history on the merged QA evidence work adjacent to this selection invariant. (role: adjacent QA evidence contributor; confidence: medium; commits: 36113539403e; files: extensions/qa-lab/src/qa-transport-registry.ts, extensions/qa-lab/src/scenario-catalog.ts)

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 (6 earlier review cycles)
  • reviewed 2026-08-02T17:00:06.384Z sha d789b98 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T17:07:11.229Z sha d789b98 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-03T14:46:31.435Z sha d789b98 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T12:35:05.078Z sha d789b98 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-05T13:09:48.784Z sha 163b2a7 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-06T10:38:40.738Z sha 163b2a7 :: needs changes before merge. :: [P2] Dispose invalid advertised adapters before throwing | [P2] Document the new adapter capability contract

@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 Aug 3, 2026
@RomneyDa
RomneyDa force-pushed the feat/qa-module-capability-contract branch from d789b98 to c8a6d2d Compare August 5, 2026 12:22
@RomneyDa
RomneyDa marked this pull request as draft August 6, 2026 10:31
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. and removed 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 Aug 6, 2026
@RomneyDa
RomneyDa force-pushed the feat/qa-module-capability-contract branch from 163b2a7 to a738431 Compare August 6, 2026 11:22
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M and removed size: L labels Aug 6, 2026
@RomneyDa
RomneyDa marked this pull request as ready for review August 6, 2026 11:22
@RomneyDa
RomneyDa force-pushed the feat/qa-module-capability-contract branch from a738431 to 3611353 Compare August 6, 2026 11:26
@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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 6, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 6, 2026
@RomneyDa
RomneyDa merged commit d6fc4a2 into main Aug 6, 2026
137 checks passed
@RomneyDa
RomneyDa deleted the feat/qa-module-capability-contract branch August 6, 2026 11:51
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: qa-lab maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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.

QA: run module flows only on prepared adapters

1 participant