Skip to content

fix(test): bind SDK hosts in direct Gateway fixtures - #189244

Merged
vincentkoc merged 1 commit into
mainfrom
fix/gateway-x28-fixture-sdk-hosts
Oct 31, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/gateway-x28-fixture-sdk-hosts

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Related: #188252

What Problem This Solves

Two direct Gateway fixtures omit the SDK resource host required by plugin shared-state admission. Publication dispatch and meeting-transcript cleanup therefore fail before their intended assertions.

User Impact

No production behavior or public API changes. The tests exercise the existing Gateway resource boundary without weakening its guard.

Why This Change Was Made

Bind a real test-owned SDK host to each fixture's Gateway resolver. Share that resolver with the publication runtime, and close resources after registry and service-generation cleanup. Reuse the existing lifecycle owners; keep all cases and assertions unchanged.

The change adds 18 test lines overall and changes no production code. The existing test-line ceiling has sufficient slack; no allocation or baseline change is needed.

Evidence

  • Both failures reproduced at 6527091: publication dispatch failed with the unbound-host error; meeting reload failed during transcript cleanup while its other three cases passed.
  • With the repair, all five existing cases passed through the real publication and reload fixtures. The assertions cover public creation/revocation, capture ownership, drain, replacement and retirement.
  • Both owning Gateway typecheck leaves, both targeted lint checks, formatting and whitespace checks passed. The test-line ratchet passed with 28,769 lines of existing slack.
  • Proof ran on qualified native Node 26/macOS. The same unbound-host signatures appear in Linux/Bun CI; this does not claim a Linux replay or live external-provider proof.
  • Fresh independent review of 6527091..55e84a7 found no actionable correctness or security issues. Applicable exact-head CI and native landing gates remain pending.

@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
@vincentkoc vincentkoc self-assigned this Oct 31, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 31, 2026 09:21
@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 test-owned SDK resource hosts to two direct Gateway fixtures and closes them after plugin cleanup.

Example: Run the X publication composition fixture.

  • Before: Plugin shared-state admission throws "Gateway SDK resource host is not bound" before publication assertions.
  • After: The publication runtime shares the Gateway resolver bound to the fixture’s SDK resource host.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused and correct fixture repair with reported in-process regression validation and passing changed-test CI; individual execution logs were unavailable.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only repair reports baseline failures and passing publication/reload fixtures; no shipped behavior changes require separate live-product proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Publication and meeting-reload regression tests fail during fixture admission or cleanup before exercising their intended behavior.
Reason: Maintainer direction is established, and restoring meaningful regression coverage through existing lifecycle owners has clear value.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs two incomplete Gateway fixtures without weakening production guards or existing assertions; no actionable correctness or security defects were found.

Priority: P3
Reviewed head: 55e84a7a6d17271be8333a51d27acd67f120054f

Before merge

None.

Findings

None.

Agent review details

How this fits together

Direct Gateway fixtures compose plugin dispatch, shared-state access, and lifecycle cleanup; the SDK resource host admits and drains their shared-state operations.

flowchart TD
  A[Gateway test fixture] --> B[Shared Gateway resolver]
  B --> C[SDK resource host]
  B --> D[Plugin runtime]
  D --> E[Shared-state admission]
  E --> C
  D --> F[Plugin retirement]
  F --> G[Host close]
Loading

Technical review

Best possible solution:

Bind each fixture’s exact Gateway resolver to one test-owned SDK host and retire plugin generations before closing it.

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

Source confirms both fixtures omit the host required by shared-state admission; the author reports baseline failures and passing repaired cases, while this read-only review executed no target code.

Is this the best way to solve the issue?

The patch is the smallest complete repair: it supplies existing resource ownership, shares resolver identity, and preserves assertions without changing production admission.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b7cc7ebc9b44.

Provenance checked

  • X publication fixture resolver and cleanup keeps the original intent (8787ee0: The composition fixture exercises public creation and authorization revocation; later changes preserve actual child settlement and expose original fixture failures.)
  • Meeting transcript reload fixture keeps the original intent (7234600: Verify capture survives joining-request expiry while respecting plugin drain, replacement, and retirement.)
  • SDK shared-state admission keeps the original intent (d9837a5: Refuse new plugin shared-state work during Gateway shutdown and drain admitted operations before resource retirement.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Sukhdeep: Raw commit 7234600 adds src/gateway/server-plugin-reload.meeting-transcripts.test.ts:136 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 723460077c40; files: src/gateway/server-plugin-reload.meeting-transcripts.test.ts)

PR surface

Tests +18. Total +18 across 2 files. Added test files: 0.

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

Labels

Label changes:

  • add P3: This repairs test-fixture ownership without changing production behavior or establishing a user-facing outage.
  • 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 repairs test-fixture ownership without changing production behavior or establishing a user-facing outage.
  • 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, 5:35 AM ET / 09:35 UTC.

@vincentkoc
vincentkoc merged commit 2464bd8 into main Oct 31, 2026
197 checks passed
@vincentkoc
vincentkoc deleted the fix/gateway-x28-fixture-sdk-hosts branch October 31, 2026 09:47
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

RomneyDa added a commit that referenced this pull request Oct 31, 2026
nxmxbbd added a commit to nxmxbbd/openclaw that referenced this pull request Oct 31, 2026
…d-tool-snapshot

No conflicts. Picks up main's SDK host binding for the X publication
fixture (openclaw#189244); the allocation stays 867.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
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. 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.

1 participant