Repository navigation
test(plugins): align tool fixtures with owner policy - #118959
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 7:02 PM ET / 23:02 UTC. ClawSweeper reviewWhat this changesThe PR makes default plugin-tool fixtures unrestricted, scopes Feishu allowlists to Feishu cases, and reloads manifest eligibility modules after test mocks are installed. Merge readinessNo actionable patch finding: the test-only repair correctly aligns fixture ownership with the authoritative plugin policy and rebinds mocked modules in the non-isolated Plugins worker. The protected Priority: P2 Review scores
Verification
How this fits togetherPlugin tool tests create registries and config contexts, then exercise owner-policy filtering before a tool is exposed. Manifest-eligibility tests run in a shared non-isolated Vitest worker, where mocked dependencies must bind to the module graph used by assertions. flowchart LR
A[Test fixture] --> B[Plugin config and registry]
B --> C[Owner-policy decision]
C --> D[Tool and manifest eligibility]
E[Shared Plugins test worker] --> F[Mocked module graph]
F --> D
D --> G[Test assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -32. Total -32 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep owner-policy enforcement in production and land this narrowly scoped test-boundary repair after the required human review. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: a nonempty fixture allowlist excludes dynamically created owners under the current policy, and the non-isolated worker can retain a pre-mock module graph. Local execution was not performed because this is a read-only review. Is this the best way to solve the issue? Yes. Moving restrictive policy into the cases that require it and rebinding only the affected mock graph repairs the owning test boundaries without weakening production policy or altering runner-wide behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a2ccd6ea61ec. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
c10f85f to
3f0a5d4
Compare
|
Land-ready at Root cause: the default plugin-tool fixture accidentally carried a restrictive owner allowlist, while the non-isolated Plugins project could reuse a real module graph evaluated before this file's hoisted mocks. The canonical repair removes the hidden fixture restriction, opts Feishu-specific cases into their owner explicitly, and rebinds the mocked manifest module graph. Production policy is unchanged; production LOC delta is zero and test delta is -32 lines. Proof on the exact rebased candidate:
The latest ClawSweeper review covers this exact SHA and reports no actionable patch finding or remaining rank-up move. The only remaining item is the protected maintainer merge decision. |
|
Merged via squash.
|
* origin/main: (1301 commits) fix(sms): align MMS retries with network timeouts (openclaw#119002) test(qa): cover composed tool result consumption (openclaw#118991) test(cron): cover delivery outcomes (openclaw#118993) test(qa): cover guarded media fetch boundaries (openclaw#118857) test(qa): cover music generation controls (openclaw#118901) test(qa): cover core vision routing (openclaw#118861) test(qa): cover Gateway usage and memory APIs (openclaw#118995) fix(docker): use authenticated gateway health command (openclaw#118996) test(plugins): align tool fixtures with owner policy (openclaw#118959) test(qa): cover managed gateway service lifecycle (openclaw#118855) test(qa): cover audio proxy and limit handling (openclaw#118863) test(qa): cover PDF extraction dispatch (openclaw#118860) test(ui): add service-worker update primary QA proof (openclaw#118805) test(qa): cover CLI onboarding and plugin install sources (openclaw#118882) test(qa): cover remote logging boundaries (openclaw#118951) fix(sms): retry transient MMS failures before durable adoption (openclaw#118994) test(qa): cover video generation invocation (openclaw#118864) test(qa): cover media reference intake (openclaw#118858) test(qa): cover image generation task lifecycle (openclaw#118915) feat(sms): track Twilio delivery status (openclaw#118665) ...
Closes #118957
Summary
Root cause
Bundled owner-policy enforcement made
plugins.allowauthoritative for tool owners. The old default fixture carried a restrictive allowlist while dynamically creating many unrelated plugin ids, so 20 assertions correctly received no tools. Separately,manifest-contract-eligibility.test.tscould reuse a production module graph evaluated by an earlier file, bypassing its mocks and producing six order-dependent failures.The repair stays at the test owner boundary: default fixtures no longer smuggle restrictive policy into unrelated cases, tests that need external Feishu ownership configure it explicitly, and the non-isolated suite rebinds its mocked module graph. Production policy is unchanged.
Evidence
Exact candidate:
3f0a5d43ffc4c8f1428afa349f27f6273e3bf178, rebased onto currentmainatc83dcc2bc089ca22db9ba19bb602694a66e19337.node scripts/run-vitest.mjs src/plugins/tools.optional.test.ts src/plugins/manifest-contract-eligibility.test.ts— 2 files, 107 tests passedOPENCLAW_VITEST_FS_MODULE_CACHE=0 node scripts/run-vitest.mjs --config test/vitest/vitest.plugins.config.ts— 222 files, 3,369 tests passed, one skipped on Blacksmith Testboxtbx_01kz4wwsrjezd0ar8wgztd6bmb: https://github.com/openclaw/openclaw/actions/runs/30859893741.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output— clean, no accepted/actionable findings, confidence 0.99git diff --check origin/main...HEAD— passedAn earlier full-suite prepare attempt failed only three unrelated Gateway image-capability assertions in
src/gateway/server.agent.gateway-server-agent-a.test.ts; the Plugins project was green in that run. The exact-current-main Plugins run above closes the ClawSweeper shared-module-lifecycle concern without weakening the unrelated Gateway test.Risk
Low. This is test-only, removes 32 net lines, and leaves production policy unchanged. Restrictive allowlist behavior remains covered explicitly instead of leaking through the default fixture.