Repository navigation
fix(test): bind visitor access SDK resource hosts - #189296
Conversation
Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR binds fixture-owned SDK resource hosts to the visitor-access Gateway contexts and closes them during teardown. Example: Run the administrator visitor-invitation scenario for [email protected].
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a concrete fixture failure that remains on current main, preserves the existing assertions, and has no established actionable correctness findings; required CI is still failing. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe visitor-access integration fixture connects Gateway request contexts to production plugin loading, tool invocation, and shared-state admission while replacing external provider requests with synthetic responses. flowchart TD
A[Visitor access scenarios] --> B[Gateway context resolver]
B --> C[Fixture SDK resource host]
B --> D[Plugin runtime]
D --> E[Visitor tools and shared state]
E --> F[Existing behavior assertions]
Technical reviewBest possible solution: Retain the fixture-owned host bindings so the existing visitor-access assertions exercise the intended production boundary. Do we have a high-confidence way to reproduce the issue? The missing bindings and the SDK lookup’s explicit unbound-host exception establish the failing setup path; the author reports five passing cases after repair, and no target code was executed during this review. Is this the best way to solve the issue? The change supplies the existing resource owner at each affected resolver, matching the landed sibling repair without adding production machinery or weakening assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 14b385e08047. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +13. Total +13 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 31, 2026, 6:53 AM ET / 10:53 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
(cherry picked from commit 4ad0b3e) Co-authored-by: RomneyDa <[email protected]>
#189296 made LegacyPluginSdkResourceHost.close() return a Promise; the three test-util teardown calls left it floating and fail no-floating-promises lint.
Co-authored-by: RomneyDa <[email protected]>
openclaw#189296 made LegacyPluginSdkResourceHost.close() return a Promise; the three test-util teardown calls left it floating and fail no-floating-promises lint.
Problem
The visitor-access Gateway fixture starts plugin-backed tools without binding the legacy SDK resource host. Both Node and Bun release-validation lanes fail every visitor-access scenario with
Gateway SDK resource host is not boundbefore the behavior under test runs.Change
Bind one fixture-owned
LegacyPluginSdkResourceHostto each direct Gateway context and close it after the Gateway stops. This follows the direct-fixture contract established by #189244 without changing production behavior.Proof
node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway-methods-isolated.config.ts src/gateway/server-methods/agent.visitor-access.test.ts— 5/5 passedpnpm exec oxfmt --check src/gateway/server-methods/agent.visitor-access.test-utils.tsgit diff --checkRelease validation evidence: FRV 41190860034, Normal CI job 124508702368.