Skip to content

refactor(lmstudio): consolidate provider setup test fixtures - #117660

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-lmstudio-setup-fixtures-wave6-2d45
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-lmstudio-setup-fixtures-wave6-2d45

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

LM Studio's provider-setup coverage repeated configuration construction, wizard plumbing, model fixtures, discovery setup, and authentication assertions throughout one oversized suite. Maintaining those copies obscured the actual auth, retry, cancellation, and provider-selection invariants.

Why This Change Was Made

Use the existing public plugin-test SDK queued-wizard and non-exiting-runtime helpers, the canonical deferred and record helpers, and small strongly typed LM Studio-specific fixtures. Keep every existing scenario, table row, matcher, assertion argument, and provider-owner boundary unchanged.

User Impact

No production code or user-visible behavior changes. Maintainers get the identical LM Studio setup and discovery coverage with 365 fewer test lines.

Evidence

  • Only extensions/lmstudio/src/setup.test.ts changes: 1,629 -> 1,264 lines; +363/-728, net -365. Production LOC delta: 0.
  • AST comparison against the untouched main-version file proves exact ordered parity: 33 test declarations, 45 expanded cases, five table row counts [3, 3, 5, 2, 4], 83 matcher chains plus two asymmetric matchers, and unchanged actual/expected matcher arguments.
  • Ordered case/table SHA-256: d216075d40ade8db8b011119ac005992d97fe11733d8c6bf003c3777dc53e2df; ordered matcher/argument SHA-256: a5879fb042224026e42051ea4f1503bc7e595988522f98675fdf129108d7d66f.
  • Blacksmith Testbox tbx_01kyzn72qpq7g602qza2prm3t6: corepack pnpm test extensions/lmstudio/src/setup.test.ts — 45/45 passed.
  • Adjacent provider proof: corepack pnpm test extensions/lmstudio/index.test.ts extensions/lmstudio/src/runtime.test.ts extensions/lmstudio/src/models.test.ts extensions/ollama/src/setup.non-interactive-auth.test.ts — 84/84 passed across four files.
  • Full remote gate: OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 corepack pnpm check:changed — passed, including extension-test typecheck, changed-file lint, formatting, dead-export checks, and plugin boundaries.
  • Independent gpt-5.6-sol xhigh owner/dependency-contract review: CLEAN. Fresh structured .agents/skills/autoreview/scripts/autoreview --mode uncommitted --engine codex --model gpt-5.6-sol --thinking xhigh: CLEAN.
  • Fresh-main true merge: git merge-tree --write-tree origin/main bce7088fd1ffa54ac11a2d3dd95d4b8a3ec007b9 passed against 59f1f4f3fdd744837a6f69aa1e2652c2d1e4fc49; no touched-file drift.
  • AI-assisted, maintainer-requested refactor; remote Testbox lease stopped after validation.

@steipete
steipete marked this pull request as ready for review August 1, 2026 22:10
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 1, 2026
@steipete steipete self-assigned this Aug 1, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 6:15 PM ET / 22:15 UTC.

ClawSweeper review

What this changes

The PR consolidates repeated LM Studio provider-setup test fixtures around shared public test helpers and typed LM Studio-local fixture builders, without intending to change production behavior.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this fresh, assigned, maintainer-labeled test refactor open for normal maintainer review. The visible patch uses the intended public plugin-test SDK seams and reports focused remote validation, but this read-only checkout could not hydrate the complete PR blob after its promisor remote failed DNS resolution, so an independent full parity review is incomplete.

Priority: P3
Reviewed head: bce7088fd1ffa54ac11a2d3dd95d4b8a3ec007b9

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR supplies substantial focused test evidence and follows the expected boundary, but a full independent patch-parity review was blocked by unavailable promisor objects.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This is a maintainer-labeled, test-only refactor; the external live-behavior proof gate is not applicable. The PR body supplies terminal-based focused, adjacent, and changed-gate validation claims.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-labeled, test-only refactor; the external live-behavior proof gate is not applicable. The PR body supplies terminal-based focused, adjacent, and changed-gate validation claims.
Evidence reviewed 5 items Visible patch stays within the plugin test boundary: The supplied PR patch changes only the LM Studio setup test and imports createDeferred, queued-wizard, non-exiting-runtime, and record helpers from public openclaw/plugin-sdk/* entrypoints; it does not modify production code, package metadata, workflows, or dependencies.
Plugin-boundary policy supports the chosen seam: The extension policy requires bundled plugins to use public openclaw/plugin-sdk/* contracts and retain provider-specific setup and auth behavior in the provider plugin; the visible refactor follows that direction.
Shared helper contract exists on current main: createDeferred is an exported shared deferred-promise helper, while the branch’s other visible imports are from the public plugin test runtime surface rather than deep internal extension paths.
Findings None None.
Security None None.

How this fits together

LM Studio is a bundled provider plugin whose setup routines construct provider configuration, selected-model data, and authentication outcomes. Its test suite invokes those plugin-owned routines through public Plugin SDK contracts and checks the resulting config and runtime interactions.

flowchart LR
  A[Provider setup test cases] --> B[Public test SDK helpers]
  B --> C[LM Studio fixture builders]
  C --> D[LM Studio setup routines]
  D --> E[Provider config and auth outcomes]
  E --> F[Assertions]
Loading

Before merge

  • Add real behavior proof - Not applicable: This is a maintainer-labeled, test-only refactor; the external live-behavior proof gate is not applicable. The PR body supplies terminal-based focused, adjacent, and changed-gate validation claims.
  • Resolve merge risk (P1) - The PR replaces 1,091 test-file lines, but this partial checkout could not hydrate the complete proposed blob because its promisor remote could not resolve GitHub; complete assertion-parity review should occur from a checkout with the branch objects available.
Agent review details

Security

None.

PR surface

Tests -365. Total -365 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 363 728 -365
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 363 728 -365

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Review the complete branch in a fully hydrated checkout, verify that each setup scenario and matcher remains equivalent, and then land the test-only cleanup without changing LM Studio runtime behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Review the complete branch in a fully hydrated checkout, verify that each setup scenario and matcher remains equivalent, and then land the test-only cleanup without changing LM Studio runtime behavior.

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

Not applicable: this PR refactors test fixtures rather than reporting a runtime failure. The supplied body reports focused and adjacent remote test runs, but this review did not execute tests in the read-only checkout.

Is this the best way to solve the issue?

Unclear: consolidating onto existing public Plugin SDK test helpers matches the extension boundary, but the unavailable complete PR blob prevents independently confirming every claimed assertion and table-case parity detail.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 59f1f4f3fdd7.

Labels

Label changes:

  • add P3: The PR is an internal test-maintenance refactor with no intended production or user-visible behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-labeled, test-only refactor; the external live-behavior proof gate is not applicable. The PR body supplies terminal-based focused, adjacent, and changed-gate validation claims.

Label justifications:

  • P3: The PR is an internal test-maintenance refactor with no intended production or user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-labeled, test-only refactor; the external live-behavior proof gate is not applicable. The PR body supplies terminal-based focused, adjacent, and changed-gate validation claims.

Evidence

What I checked:

  • Visible patch stays within the plugin test boundary: The supplied PR patch changes only the LM Studio setup test and imports createDeferred, queued-wizard, non-exiting-runtime, and record helpers from public openclaw/plugin-sdk/* entrypoints; it does not modify production code, package metadata, workflows, or dependencies. (extensions/lmstudio/src/setup.test.ts:1, bce7088fd1ff)
  • Plugin-boundary policy supports the chosen seam: The extension policy requires bundled plugins to use public openclaw/plugin-sdk/* contracts and retain provider-specific setup and auth behavior in the provider plugin; the visible refactor follows that direction. (extensions/AGENTS.md:1, 59f1f4f3fdd7)
  • Shared helper contract exists on current main: createDeferred is an exported shared deferred-promise helper, while the branch’s other visible imports are from the public plugin test runtime surface rather than deep internal extension paths. (src/plugin-sdk/extension-shared.ts:152, 59f1f4f3fdd7)
  • Area provenance: Current-main history identifies Peter Steinberger as the dominant contributor across the LM Studio setup implementation and its test suite; the most recent relevant refactor commit is 586e1fe10e11910e9ae96ad904730fb4be0fb3bc. (extensions/lmstudio/src/setup.test.ts:62, 586e1fe10e11)
  • Independent branch inspection was infrastructure-limited: The PR tree identifies a5bea36efb6fdfcf1bf1a439328d9b85fbc97e6c as the proposed test blob, but a read-only diff/check attempted promisor hydration and failed because github.com could not resolve. The supplied PR patch and body were available, but the full proposed source could not be independently loaded from this checkout. (extensions/lmstudio/src/setup.test.ts:1, bce7088fd1ff)

Likely related people:

  • steipete: Authored the present focused LM Studio setup-test refactor and appears as Peter Steinberger in the current-main history for this setup area. (role: recent area contributor; confidence: high; commits: bce7088fd1ff, 586e1fe10e11; files: extensions/lmstudio/src/setup.test.ts, extensions/lmstudio/src/setup.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Run the final parity review from a fully hydrated checkout before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit eec96d9 into main Aug 1, 2026
152 of 160 checks passed
@steipete
steipete deleted the codex/goal100k-lmstudio-setup-fixtures-wave6-2d45 branch August 1, 2026 22:34
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: lmstudio maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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