Skip to content

improve(qa): verify plugin tool ownership in gateway flow - #118958

Merged
vincentkoc merged 1 commit into
mainfrom
test/qa-plugin-tools-effective
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test/qa-plugin-tools-effective

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The QA portfolio classified plugins.plugin-tools only as secondary coverage, even though the existing Tool Search gateway scenario exercises a staged external plugin with a large tool catalog.

Why This Change Was Made

The scenario now reads the real tools.effective inventory after both direct and compact Tool Search lanes and requires the selected tool to be attributed to source=plugin and pluginId=tool-search-e2e-fixture. With that ownership proof in the artifact, the scenario becomes the primary owner for plugins.plugin-tools.

The change is confined to QA Lab fixture code, its focused tests, and scenario metadata. Production LOC delta is zero.

User Impact

No runtime behavior changes. Maintainers get stronger regression evidence that plugin-owned tools remain correctly attributed through both gateway execution modes.

Evidence

  • node scripts/run-vitest.mjs extensions/qa-lab/src/tool-search-gateway.fixture.test.ts - 19 tests passed.
  • Blacksmith Testbox private-QA build - passed on tbx_01kz4me39bmfj9zmvjb047tdc1.
  • Exact tool-search-gateway-e2e scenario - passed 1/1 with mock OpenAI and qa-channel.
  • qa-evidence.json records plugins.plugin-tools as primary.
  • Scenario report records both direct and compact identities as source=plugin, pluginId=tool-search-e2e-fixture.
  • Blacksmith Testbox pnpm check:changed - passed in 14m22s, including project typecheck, all lint shards, and import-cycle checks.
  • Sol/high branch autoreview - clean, correctness 0.99.
  • Testbox run: https://github.com/openclaw/openclaw/actions/runs/30849615040

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 20:49
@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:03 PM ET / 21:03 UTC.

ClawSweeper review

What this changes

The PR makes the Tool Search gateway QA scenario prove that its selected fixture tool is reported as source=plugin with the expected plugin ID in both direct and compact lanes.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No correctness finding: this focused QA-only patch queries the session-scoped effective-tool inventory after each real gateway lane and rejects any result that loses the fixture plugin attribution. Keep this maintainer-authored, maintainer-labeled PR open for normal landing review; recheck the existing ClawSweeper comment’s rank-up moves once GitHub access is available.

Priority: P3
Reviewed head: 5491740c29ae72a7bf2b1ae77da950a9c926e47b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, contract-aligned QA patch with strong supplied scenario and CI evidence; its only remaining review task is confirming the prior ClawSweeper comment’s outstanding moves.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This is a maintainer-authored QA-only PR; its supplied Testbox scenario and successful CI checks are useful supporting evidence, while the external-contributor proof gate does not apply.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored QA-only PR; its supplied Testbox scenario and successful CI checks are useful supporting evidence, while the external-contributor proof gate does not apply.
Evidence reviewed 7 items Correct session boundary: The PR creates one session key per lane, uses it in the response request, and queries tools.effective with that exact key after the response completes.
Ownership assertion: The scenario now fails unless both lane inventories identify the target tool as plugin-owned by tool-search-e2e-fixture; the focused unit test also covers a mismatched ownership result.
Gateway contract: The effective-tool inventory contract exposes source and optional pluginId, and the gateway derives its inventory context from the persisted session rather than caller-supplied routing.
Findings None None.
Security None None.

How this fits together

QA Lab stages an external fixture plugin, drives gateway response sessions in direct and Tool Search modes, and records regression evidence. The gateway’s tools.effective endpoint resolves the session-owned inventory, including each tool’s source and plugin identity, which this PR adds to the scenario’s assertions and report.

flowchart LR
  A[Fixture plugin catalog] --> B[Gateway response session]
  B --> C[Direct or Tool Search lane]
  C --> D[Session effective-tools inventory]
  D --> E[Plugin ownership assertion]
  E --> F[QA scenario evidence]
Loading

Before merge

  • Resolve merge risk (P1) - The supplied timeline records an earlier ClawSweeper comment, but GitHub API access was unavailable to inspect its Rank-up moves; confirm that no outstanding move remains before merging.
  • Complete next step (P2) - This protected, maintainer-authored PR needs normal review and landing checks; no concrete repair lane is indicated.
Agent review details

Security

None.

PR surface

Source +46, Tests +59, Other +3. Total +108 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 47 1 +46
Tests 1 60 1 +59
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 1 +3
Total 3 111 3 +108

Review metrics

Metric Value Why it matters
Production versus QA LOC production +0, QA/test +108 net All net growth is fixture assertions, focused tests, and scenario evidence; no production runtime path changes.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the ownership proof at the session-scoped tools.effective boundary, retain the scenario as primary coverage for plugin tools, and merge after confirming the prior ClawSweeper review has no unresolved rank-up move.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the ownership proof at the session-scoped tools.effective boundary, retain the scenario as primary coverage for plugin tools, and merge after confirming the prior ClawSweeper review has no unresolved rank-up move.

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

Not applicable: this PR strengthens regression evidence for an existing QA scenario rather than reporting a user-facing failure. The supplied scenario and focused fixture test give a concrete validation path for the changed behavior.

Is this the best way to solve the issue?

Yes: the patch checks ownership through the gateway’s session-scoped effective-tool inventory, the authoritative boundary for source and pluginId, rather than trying to infer plugin ownership from provider-facing tool schemas.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a low-risk QA regression-evidence improvement with no runtime behavior or user-flow change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-authored QA-only PR; its supplied Testbox scenario and successful CI checks are useful supporting evidence, while the external-contributor proof gate does not apply.

Label justifications:

  • P3: This is a low-risk QA regression-evidence improvement with no runtime behavior or user-flow change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-authored QA-only PR; its supplied Testbox scenario and successful CI checks are useful supporting evidence, while the external-contributor proof gate does not apply.

Evidence

What I checked:

  • Correct session boundary: The PR creates one session key per lane, uses it in the response request, and queries tools.effective with that exact key after the response completes. (extensions/qa-lab/src/tool-search-gateway.fixture.ts:401, 5491740c29ae)
  • Ownership assertion: The scenario now fails unless both lane inventories identify the target tool as plugin-owned by tool-search-e2e-fixture; the focused unit test also covers a mismatched ownership result. (extensions/qa-lab/src/tool-search-gateway.fixture.ts:561, 5491740c29ae)
  • Gateway contract: The effective-tool inventory contract exposes source and optional pluginId, and the gateway derives its inventory context from the persisted session rather than caller-supplied routing. (src/agents/tools-effective-inventory.types.ts:13, d29b9ad083d1)
  • QA coverage semantics: Scenario-pack policy permits a primary coverage ID only when the scenario executes that required product boundary; this patch adds direct ownership evidence through the gateway inventory rather than inferring it from provider payloads. (qa/scenarios/index.yaml:18, d29b9ad083d1)
  • Feature provenance: Blame attributes the existing Tool Search scenario and the tools.effective request handler to the same current-main feature commit, providing a clear routing owner for this regression evidence. (qa/scenarios/runtime/tool-search-gateway-e2e.yaml:58, 1f5049a417ad)
  • Provided validation evidence: The supplied PR context records successful QA Smoke CI profiles, build and static checks, and a successful Real behavior proof check; the PR body also reports a passing exact scenario and focused fixture test. (5491740c29ae)

Likely related people:

  • steipete: Current-main blame attributes both the Tool Search QA scenario and the session-owned tools.effective handler path to the same feature commit. (role: feature introducer and recent area contributor; confidence: high; commits: 1f5049a417ad; files: extensions/qa-lab/src/tool-search-gateway.fixture.ts, qa/scenarios/runtime/tool-search-gateway-e2e.yaml, src/gateway/server-methods/tools-effective.ts)

Rank-up moves

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

  • Recheck the existing ClawSweeper comment and satisfy or explicitly disposition every Rank-up move before merge.

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.

@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper Rank-up move disposition:

  • Rechecked the durable ClawSweeper comment after the exact-head review completed.
  • This is the only ClawSweeper review comment on the PR, so there is no prior or outstanding Rank-up move to apply.
  • The exact reviewed head remains 5491740c29ae72a7bf2b1ae77da950a9c926e47b.
  • Exact-head CI is green: 81 passed, 0 failed, 0 pending.

No review-driven code change is needed.

@vincentkoc
vincentkoc merged commit 9cbc130 into main Aug 3, 2026
188 of 194 checks passed
@vincentkoc
vincentkoc deleted the test/qa-plugin-tools-effective branch August 3, 2026 21:05
vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main:
  test(ui): add shell and PWA primary QA proof (#118788)
  test(qa): cover CLI distribution workflows (#118948)
  chore(i18n): refresh native locales (#118883)
  test(qa): prove plugin tool ownership in gateway flow (#118958)
  docs: correct onboarding risk flags and Google Chat credential shapes (#118936)
  fix(imessage): honor explicitly enabled accounts during startup (#118944)
  test(gateway): cover client transport defaults (#118798)
  fix(signal): normalize accounts during noninteractive setup (#118932)
  fix(msteams): enable channels for federated environment credentials (#118931)
  fix(openai): enforce final transcript bounds before callback delivery (#118928)
  test(tasks): cover plugin-managed flows (#118919)

# Conflicts:
#	qa/scenarios/runtime/docker-package-install.yaml
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…-worker-update-20260803

* origin/main: (48 commits)
  test(ui): add shell and PWA primary QA proof (#118788)
  test(qa): cover CLI distribution workflows (#118948)
  chore(i18n): refresh native locales (#118883)
  test(qa): prove plugin tool ownership in gateway flow (#118958)
  docs: correct onboarding risk flags and Google Chat credential shapes (#118936)
  fix(imessage): honor explicitly enabled accounts during startup (#118944)
  test(gateway): cover client transport defaults (#118798)
  fix(signal): normalize accounts during noninteractive setup (#118932)
  fix(msteams): enable channels for federated environment credentials (#118931)
  fix(openai): enforce final transcript bounds before callback delivery (#118928)
  test(tasks): cover plugin-managed flows (#118919)
  test(agents): prove process control roundtrip (#118843)
  test(qa): add memory redaction boundary coverage (#118916)
  fix(kilocode): model discovery overstates the usable context window (#118868)
  fix(media): isolate generated-provider text from delivery directives (#118780)
  test(gateway): add node control-plane QA coverage (#118784)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
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