Skip to content

fix(test): bind visitor access SDK resource hosts - #189296

Merged
RomneyDa merged 1 commit into
mainfrom
fix/visitor-access-sdk-host-fixture
Oct 31, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/visitor-access-sdk-host-fixture

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

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 bound before the behavior under test runs.

Change

Bind one fixture-owned LegacyPluginSdkResourceHost to 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 passed
  • pnpm exec oxfmt --check src/gateway/server-methods/agent.visitor-access.test-utils.ts
  • git diff --check

Release validation evidence: FRV 41190860034, Normal CI job 124508702368.

@RomneyDa RomneyDa added the release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) label Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 31, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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].

  • Before: The fixture fails with “Gateway SDK resource host is not bound” before checking invitation behavior.
  • After: The fixture can reach the existing invitation and authority assertions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, narrowly scoped fixture repair with reported focused integration results; independently inspected execution evidence is limited and required CI remains red.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored fixture repair reports five passing in-process Gateway scenarios; it changes no shipped production behavior and claims no live-provider verification.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Release-validation visitor-access scenarios fail during fixture setup before testing their intended behavior.
Reason: The maintainer-authored repair restores existing coverage using the established lifecycle contract and changes no product policy.

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
Reviewed head: a6f8619a7f3058a78220abaf91fc9efc976703ac

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Visitor-access Gateway fixture keeps the original intent (5a679dd: Exercise admitted caller authority, guarded invitation writes, and retained visitor state through real Gateway and plugin owners.)
  • SDK shared-state admission keeps the original intent (d9837a5: Refuse late plugin state work and drain accepted operations through the Gateway-owned SDK host.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Shakker: Raw commit 5a679dd adds src/gateway/server-methods/agent.visitor-access.test-utils.ts:91 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5a679dd4af72; files: src/gateway/server-methods/agent.visitor-access.test-utils.ts)
  • Peter Steinberger: Raw commit d9837a5 adds src/plugins/legacy-sdk-resource-host.ts:73 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d9837a55eb7d; files: src/plugins/legacy-sdk-resource-host.ts)

PR surface

Tests +13. Total +13 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 13 0 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 13 0 +13

Labels

Label changes:

  • add P3: This is a focused test-fixture repair with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused test-fixture repair with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 31, 2026, 6:53 AM ET / 10:53 UTC.

@RomneyDa
RomneyDa merged commit 4ad0b3e into main Oct 31, 2026
187 of 192 checks passed
@RomneyDa
RomneyDa deleted the fix/visitor-access-sdk-host-fixture branch October 31, 2026 11:09
@RomneyDa

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

RomneyDa added a commit that referenced this pull request Oct 31, 2026
(cherry picked from commit 4ad0b3e)

Co-authored-by: RomneyDa <[email protected]>
steipete added a commit that referenced this pull request Oct 31, 2026
#189296 made LegacyPluginSdkResourceHost.close() return a Promise; the three
test-util teardown calls left it floating and fail no-floating-promises lint.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
openclaw#189296 made LegacyPluginSdkResourceHost.close() return a Promise; the three
test-util teardown calls left it floating and fail no-floating-promises lint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. release-fast-lane Release tooling PR: narrow ci-gate, ClawSweeper advisory (RELEASING.md) size: XS 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.

2 participants