Skip to content

test(plugins): verify staged SDK named exports - #207170

Merged
vincentkoc merged 1 commit into
mainfrom
test-bundled-sdk-wrapper-proof-20261128
Nov 28, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test-bundled-sdk-wrapper-proof-20261128

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The staged SDK wrapper test reads a property that Vitest can supply from the default export, so it passes even when the named export is missing. It also repeats the same SDK-to-canonical-chunk fixture in a separate case.

User Impact

No product behavior changes. The consolidated staging case now checks that the wrapper owns the named export before checking its value.

Why This Change Was Made

Move the wrapper import into the existing staging case, assert its own export, and remove the duplicate fixture. Preserve the existing module-identity, public-export and node_modules assertions.

Evidence

  • Original staging suite: 15 cases pass.
  • Removing the named re-export leaves the old two cases passing; direct Node and Bun imports expose only the default export.
  • The strengthened keeper fails on that same missing-export fault; all 14 consolidated staging cases pass with the owner restored.
  • Scoped format, lint and plugin test types pass. Independent preservation review is clear.
  • Net 14 test lines removed; production unchanged.
  • Local ClawSweeper reviewed the complete committed range 501ee91..ff106ae with no findings.
  • Exact-head native suite and review-artifact validation pass.
  • Exact-head CI 46101712116 and completed-hosted native preparation passed; signed head unchanged.

@vincentkoc vincentkoc self-assigned this Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 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.

@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 28, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 28, 2026 03:12
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. 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. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR checks that a staged SDK wrapper owns its named export and consolidates the duplicate wrapper-import fixture.

Example: The generated channel-entry-contract.js wrapper loses its named re-export while its default export still exposes contract: true.

  • Before: The existing property-value assertion can pass through Vitest’s default-export fallback.
  • After: Object.hasOwn(wrapperModule, "contract") rejects the missing named export.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-verified test improvement backed by successful exact-head CI; the reported mutation experiment was not independently replayed.
Proof confidence 🦐 gold shrimp (3/6) Production behavior is unchanged; the test invokes real staging code and imports its generated SDK wrapper, with mutation results reported in the PR and successful exact-head CI verified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: A missing named SDK export could escape the staging suite even though native imports expose a different module contract.
Reason: This maintainer-authored change strengthens an existing packaging boundary while removing repeated setup and preserving distinct coverage.

Merge readiness

✅ Ready for maintainer review

This PR makes a useful, focused improvement to SDK export coverage while preserving the consolidated case’s existing checks; no actionable defects were found.

Reviewed head: ff106ae293d06223de626781bbdf839b48a3794e

Before merge

None.

Findings

None.

Agent review details

How this fits together

Bundled-plugin staging turns canonical dist modules into runtime wrappers and SDK aliases; this test imports the generated alias and checks its export contract.

flowchart LR
  A[Canonical SDK module] --> B[Bundled runtime staging]
  B --> C[Generated SDK alias]
  C --> D[Test module import]
  D --> E[Named export ownership and value]
Loading

Technical review

Best possible solution:

Retain the consolidated staging case with both named-export ownership and value assertions.

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

The PR reports that removing the named re-export passes the old checks and fails the strengthened keeper; source inspection supports the assertion gap, but this read-only review did not rerun that mutation.

Is this the best way to solve the issue?

The change uses the existing staging owner and fixture, preserves the removed case’s import path and value check, and adds the distinct export-ownership check without production machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • SDK wrapper import coverage keeps the original intent (4862d34: The packaging fix generated SDK alias wrappers in place of a directory symlink and added an import case verifying resolution through canonical dist chunks.)
  • Consolidated staging assertions keeps the original intent (test(core, plugins): remove low-value tests (batch d218) #175530: The earlier cleanup consolidated redundant test setup while retaining distinct packaging and runtime contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 4862d34 adds src/plugins/stage-bundled-plugin-runtime.test.ts:89 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4862d349257a; files: src/plugins/stage-bundled-plugin-runtime.test.ts)
  • Gustavo Madeira Santana: Raw commit 09df232 adds src/plugins/stage-bundled-plugin-runtime.test.ts:23 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 09df232f3937; files: src/plugins/stage-bundled-plugin-runtime.test.ts)
  • Vincent Koc: Raw commit 6805a80 adds src/plugins/stage-bundled-plugin-runtime.test.ts:80 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6805a80da245; files: src/plugins/stage-bundled-plugin-runtime.test.ts)

PR surface

Tests -14. Total -14 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 5 19 -14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 5 19 -14

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • 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 November 27, 2026, 10:39 PM ET / November 28, 2026, 03:39 UTC.

@vincentkoc
vincentkoc merged commit 9bc9532 into main Nov 28, 2026
198 of 199 checks passed
@vincentkoc
vincentkoc deleted the test-bundled-sdk-wrapper-proof-20261128 branch November 28, 2026 07:26
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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