Skip to content

chore(qa): cover plugin testing harness contracts - #118933

Merged
vincentkoc merged 2 commits into
mainfrom
codex/qa0803-plugin-testing-contracts
Aug 4, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
codex/qa0803-plugin-testing-contracts

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The plugin testing taxonomy had no primary QA owner for test fixtures, local
test environment support, or unit and integration scaffolds. The tool-contract
harness was only mapped secondarily to a startup log sentinel that does not
execute the helper surface.

Why This Change Was Made

Adds one contract test that uses the repo-local plugin test helpers against the
real registry boundary: an isolated temporary home, typed fixture inputs,
declared tool registration and execution, plus the canonical missing-contract
diagnostic. A focused QA scenario maps that proof to the four exact taxonomy
IDs.

No production, Plugin SDK, taxonomy, loader, or lifecycle behavior changes.
Production LOC delta: 0.

AI-assisted: yes.

User Impact

Plugin authors and maintainers gain regression coverage proving the supported
local test harness can register and execute a declared tool and rejects an
invalid tool contract. Runtime behavior is unchanged.

Evidence

  • Focused contract proof:
    • node scripts/run-vitest.mjs src/plugins/contracts/plugin-testing-harness.contract.test.ts src/plugins/contracts/shape.contract.test.ts src/plugins/contracts/memory-embedding-provider.contract.test.ts src/plugins/contracts/plugin-tool-contracts.test.ts
    • 4 files passed, 9 tests passed.
  • Formatting and patch checks:
    • oxfmt --check passed for both changed files.
    • git diff --check passed.
    • Production LOC delta: 0; verification-only delta: +142/-0.
  • Blacksmith Testbox tbx_01kz53227eeb0h24b3mrv0k7vw:
    • Actions run: https://github.com/openclaw/openclaw/actions/runs/30865978521
    • Exact SHA-256 checks matched both files from source head 154f983d1cdfcc19fa427a28d7076701024b960e.
    • Private QA runtime build passed.
    • All four coverage queries resolved to plugin-testing-harness-contracts.
    • Fresh schema-v2 QA evidence passed and records these IDs as primary:
      • plugins.test-fixtures
      • plugins.local-test-environment
      • plugins.harness-contracts-tools
      • plugins.unit-and-integration-scaffolds
    • check:changed passed all selected lanes, including full typecheck, all lint shards, boundary/dead-code/database guards, and runtime import cycles.
  • Sol high autoreview on 154f983d1cdfcc19fa427a28d7076701024b960e:
    • No findings.
    • patch is correct with confidence 0.99.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc
vincentkoc force-pushed the codex/qa0803-plugin-testing-contracts branch from 7b5180b to 9727bdf Compare August 3, 2026 20:29
@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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:13 PM ET / 21:13 UTC.

ClawSweeper review

What this changes

The PR adds a contract test that runs a virtual plugin tool through the public test harness and a QA scenario mapping that proof to plugin-testing taxonomy coverage.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this focused maintainer-authored QA PR open. The patch adds coverage for the supported Plugin SDK test helpers and the registry’s existing tool-contract enforcement; it is not duplicated by the adjacent gateway-flow QA coverage on current main, and the protected maintainer label plus draft state require normal maintainer review rather than automated cleanup.

Priority: P3
Reviewed head: 9727bdf4a2d28cf47ddc53e06aa16fa8e46f4731

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned QA patch with no correctness or security finding; normal maintainer review remains appropriate because the PR is draft and maintainer-labeled.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored internal QA coverage PR is exempt from the external-contributor real-behavior-proof gate; its body nevertheless supplies focused test and formatting evidence.
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 coverage PR is exempt from the external-contributor real-behavior-proof gate; its body nevertheless supplies focused test and formatting evidence.
Evidence reviewed 6 items Focused patch exercises the intended public helpers: The added contract test imports the public plugin-test-contracts, test-env, and test-fixtures SDK subpaths; it creates an isolated home, registers a declared tool, executes it, and asserts the canonical missing-contract diagnostic.
Registry behavior is real rather than a fabricated diagnostic: The registry registrar rejects tool registration when contracts.tools is empty, records exactly the diagnostic asserted by the new test, and otherwise stores the tool factory for execution.
Temporary-home assertion matches the helper contract: withTempHome creates the state directory before invoking its callback and restores environment values in finally, matching the test’s isolation and restoration assertions.
Findings None None.
Security None None.

How this fits together

The Plugin SDK exposes test-only helpers that let plugin authors create isolated state and register virtual plugins against OpenClaw’s real registry boundary. The new contract test turns those helpers into executable regression coverage, while the QA scenario records the proof under the plugin-testing surface.

flowchart LR
  A[Plugin test helpers] --> B[Isolated temporary home]
  A --> C[Virtual plugin registry]
  C --> D[Tool contract enforcement]
  D --> E[Registered tool or diagnostic]
  E --> F[Contract test]
  F --> G[QA taxonomy scenario]
Loading

Before merge

  • Complete next step (P2) - The patch is a draft, maintainer-labeled QA addition with no mechanical defect to repair; it needs ordinary maintainer acceptance and a refreshed focused validation rather than an automated fix lane.
Agent review details

Security

None.

PR surface

Tests +113, Other +29. Total +142 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 113 0 +113
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 29 0 +29
Total 2 142 0 +142

Review metrics

Metric Value Why it matters
Production versus verification delta production +0, contract test +113, QA scenario +29 The patch adds only bounded regression and taxonomy evidence; it introduces no runtime, SDK, configuration, or dependency surface.

Technical review

Best possible solution:

Keep the public SDK-harness contract test and narrow QA mapping, then merge it after a maintainer confirms the scenario taxonomy placement and refreshes the focused validation on the merge result.

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

Not applicable: this PR adds regression coverage for existing supported test helpers rather than repairing a reported runtime failure. The source path is clear, but this read-only review did not execute the contributor’s focused test command.

Is this the best way to solve the issue?

Yes. Exercising the documented SDK testing subpaths through the actual plugin registry is a better regression boundary than a metadata-only assertion, and current-main gateway-flow coverage does not cover the same isolated-harness contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a low-risk QA and regression-coverage improvement with no claimed production behavior change.
  • 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 coverage PR is exempt from the external-contributor real-behavior-proof gate; its body nevertheless supplies focused test and formatting evidence.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Authored the adjacent current-main gateway tool-ownership QA proof and recent plugin QA scenarios, in addition to this focused coverage proposal. (role: recent QA coverage contributor; confidence: high; commits: 9cbc13015cd2, d29b9ad083d1, 5b1b1e063225; files: qa/scenarios/plugins/plugin-managed-flows.yaml, qa/scenarios/plugins/plugin-testing-harness-contracts.yaml)
  • Peter Steinberger: Blame attributes the virtual-plugin fixture and temporary-home helper that this PR exercises to the recent Plugin SDK testing work. (role: introduced current test-harness surface; confidence: medium; commits: 5a65c96fc708; files: src/plugin-sdk/test-helpers/contracts-testkit.ts, src/plugin-sdk/test-helpers/temp-home.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the focused contract test and QA validation against the final merge result before marking the draft ready.

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-08-03T21:06:41.636Z sha 9727bdf :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review August 4, 2026 00:50
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 4, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc
vincentkoc merged commit 84d9e93 into main Aug 4, 2026
182 of 184 checks passed
@vincentkoc
vincentkoc deleted the codex/qa0803-plugin-testing-contracts branch August 4, 2026 01:07
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main: (54 commits)
  test(qa): cover agent session streaming (#119028)
  test(qa): cover sandbox workspace isolation (#119038)
  test(qa): cover progress followthrough evidence (#119039)
  fix(auth): cooldown inline api key billing failures (#88709)
  chore(gateway): cover update and setup RPCs
  test(qa): prove ClawHub catalog discovery (#118934)
  chore(qa): cover plugin testing harness contracts (#118933)
  test(qa): prove failure recovery visibility (#119034)
  test(qa): cover direct tool invocation (#119025)
  test(qa): close external app SDK proof gaps (#118978)
  test(qa): prove container health endpoints (#119012)
  test(qa): claim sessionless heartbeat coverage (#119027)
  fix(gateway): keep plugin model allowlists static (#118854)
  fix(plugins): refresh bundled channel skills (#119020)
  test(qa): cover ClawHub package compatibility (#118985)
  test(qa): cover agent session reconnect dedupe (#119013)
  test(qa): prove gateway chat RPCs (#118988)
  test(ui): cover Control UI auth transports (#118866)
  fix(auth): do not admit ambient environment credentials behind declared profiles (#118458)
  test(ui): cover operator administration flows (#118836)
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* commit '25e3b6c9b79dadb912195d86fbff968602d58798': (54 commits)
  fix(cli): honor local port in gateway call (#119046)
  fix(gateway): honor external status target context (#119015)
  test(qa): cover agent session streaming (#119028)
  test(qa): cover sandbox workspace isolation (#119038)
  test(qa): cover progress followthrough evidence (#119039)
  fix(auth): cooldown inline api key billing failures (#88709)
  chore(gateway): cover update and setup RPCs
  test(qa): prove ClawHub catalog discovery (#118934)
  chore(qa): cover plugin testing harness contracts (#118933)
  test(xai): cover playback mark overflow
  fix(xai): bound realtime playback marks
  test(qa): prove failure recovery visibility (#119034)
  test(qa): cover direct tool invocation (#119025)
  test(qa): close external app SDK proof gaps (#118978)
  test(qa): prove container health endpoints (#119012)
  test(qa): claim sessionless heartbeat coverage (#119027)
  fix(gateway): keep plugin model allowlists static (#118854)
  fix(plugins): refresh bundled channel skills (#119020)
  test(qa): cover ClawHub package compatibility (#118985)
  test(qa): cover agent session reconnect dedupe (#119013)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
* test(qa): cover plugin testing harness contracts

* test(qa): narrow plugin harness tool factory
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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