Skip to content

test: remove obsolete provider runtime wrappers - #124182

Merged
steipete merged 1 commit into
mainfrom
test/remove-provider-runtime-wrappers
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/remove-provider-runtime-wrappers

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes four provider-runtime wrappers and one aggregate testing façade that no production code calls. Their tests re-dispatched provider hooks through obsolete convenience layers after replay policy, config defaults, thinking profiles, and memory embeddings moved to dedicated owners.

The cleanup also removes the cache-clear export that became test-only. Plugin runtime resets already advance the registry lifecycle version included in provider cache keys, so the provider suite remains isolated without manually mutating the cache.

Why This Change Was Made

The retained behavior is now tested where it is owned:

  • transcript replay policy in src/agents/transcript-policy.ts and shared provider replay helpers;
  • config defaults in src/config/provider-policy.ts;
  • effective thinking profiles in src/plugins/provider-thinking.ts;
  • memory embeddings through the memory-core bundled runtime and plugin implementation.

The Gateway live-model helper now calls the same effective thinking-profile resolver as the production thinking path and no longer carries an unused config parameter. Public ProviderPlugin hook contracts and their owner tests remain unchanged.

User Impact

No user-visible behavior change. Internal provider runtime APIs are smaller, tests no longer preserve dead dispatch seams, and provider cache state is lifecycle-keyed rather than manually reset by a test-only export.

Evidence

  • Provider runtime, transcript policy, config defaults, external thinking policy, memory-core facade, models-config source snapshot, and provider usage auth: 164 tests passed across 6 Vitest shards.
  • Provider runtime rerun after removing the cache reset: 65 tests passed.
  • Gateway live thinking helper against an isolated state directory: 13 tests passed; 124 unrelated live cases skipped by the test-name filter.
  • core and coreTests changed gates passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready. Typechecks, formatting, lint, dead-export scans, plugin boundaries, import cycles, and architecture guards passed.
  • git diff --check passed.
  • Fresh structured autoreview reported no accepted/actionable findings.

Production delta: +1/-65, net -64. Tests: +2/-130, net -128. Total: +3/-195, net -192. No docs, config, schema, protocol, dependency, or changelog change.

AI-assisted: yes.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 15, 2026 13:31
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Aug 15, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 9:37 AM ET / 13:37 UTC.

ClawSweeper review

What this changes

The PR removes unused provider-runtime wrapper exports and obsolete aggregate tests, and updates the Gateway live-model test helper to use the dedicated thinking-profile resolver.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking findings. Current main still contains the obsolete provider-runtime façade, while the branch removes only internal wrappers whose behavior is now owned by dedicated replay, config, thinking, and memory paths.

Priority: P3
Reviewed head: 6cc189729666d1e2a2379857175c8ea41d7b5559

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A clean, source-supported internal cleanup with no actionable correctness or security concern found.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored internal cleanup is exempt from the external-contributor real-behavior-proof gate; the PR body nevertheless records focused after-fix test runs.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored internal cleanup is exempt from the external-contributor real-behavior-proof gate; the PR body nevertheless records focused after-fix test runs.
Evidence reviewed 8 items Current-main comparison: Current main still exports the replay-policy wrapper, so the cleanup is not already implemented on main.
No remaining production callers: At the PR head, the provider-runtime barrel retains only active runtime hooks; a tree-wide exact-symbol search found no remaining production callers of the removed wrappers.
Replay policy owner: Transcript preparation directly resolves the runtime plugin and invokes its replay hook, with a documented fallback only for unowned providers.
Findings None None.
Security None None.

How this fits together

Provider plugins supply runtime hooks for model transport and policy. Those hooks feed agent replay and Gateway model-selection paths; this cleanup removes an aggregate test bridge now bypassed by owner-specific modules.

flowchart LR
A[Provider plugins] --> B[Provider hook resolution]
B --> C[Agent transport hooks]
A --> D[Transcript replay policy]
D --> C
A --> E[Thinking profile resolver]
E --> F[Gateway model checks]
G[Focused test suite] --> B
Loading

Before merge

  • Complete next step (P2) - This protected maintainer PR has no concrete repair task; it needs normal review and completion of exact-head checks.
Agent review details

Security

None.

PR surface

Source -64, Tests -128. Total -192 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 1 65 -64
Tests 4 2 130 -128
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 3 195 -192

Review metrics

Metric Value Why it matters
Production versus test LOC production +1/-65 (net -64); tests +2/-130 (net -128) The sole production addition makes the retained cache binding immutable; the rest removes internal wrappers and test-only coverage.

Technical review

Best possible solution:

Land the deletion-only cleanup after exact-head required checks finish, keeping replay, config, thinking, and embedding behavior at their existing owner boundaries.

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

Not applicable: this PR removes internal test and runtime wrappers rather than repairing a reported user-visible failure.

Is this the best way to solve the issue?

Yes. The dedicated owner modules already execute the retained behaviors, so deleting the aggregate façade avoids duplicate dispatch paths.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 987c73e79304.

Labels

Label changes:

  • add P3: This is a behavior-neutral internal cleanup with no user-facing or configuration change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored internal cleanup is exempt from the external-contributor real-behavior-proof gate; the PR body nevertheless records focused after-fix test runs.

Label justifications:

  • P3: This is a behavior-neutral internal cleanup with no user-facing or configuration change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored internal cleanup is exempt from the external-contributor real-behavior-proof gate; the PR body nevertheless records focused after-fix test runs.

Evidence

What I checked:

Likely related people:

  • steipete: Current provider hook, thinking, and replay lines blame to the recent provider-runtime refactor authored by this contributor; the same contributor authored this cleanup. (role: feature owner and recent area contributor; confidence: high; commits: 5d601233df88, 6cc189729666; files: src/plugins/provider-hook-runtime.ts, src/plugins/provider-runtime.ts, src/plugins/provider-thinking.ts)

Rank-up moves

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

  • Wait for the remaining exact-head required checks before landing.

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

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 6cc189729666d1e2a2379857175c8ea41d7b5559:

  • Provider runtime, transcript policy, config defaults, external thinking policy, memory-core facade, models-config source snapshot, and provider usage auth: 164 tests passed across 6 Vitest shards.
  • After removing the newly orphaned provider-cache reset export, src/plugins/provider-runtime.test.ts passed all 65 tests.
  • The Gateway live thinking helper passed 13 tests against an isolated state directory; 124 unrelated live cases were skipped by the test-name filter.
  • The core and coreTests changed gate passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready. Typechecks, formatting, lint, dead-export scans, plugin boundaries, import cycles, and architecture guards passed.
  • git diff --check passed.
  • Fresh structured autoreview reported no accepted/actionable findings.
  • Exact-head CI passed: https://github.com/openclaw/openclaw/actions/runs/31887451143
  • ClawSweeper found no actionable findings; its only optional rank-up move was to wait for exact-head checks, now satisfied: test: remove obsolete provider runtime wrappers #124182 (comment)
  • Native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 124182 passed by reusing hosted exact-head gates; no Testbox lease was required.

Production delta: +1/-65, net -64. Tests: +2/-130, net -128. Total: +3/-195, net -192. No behavior, docs, config, schema, protocol, dependency, or changelog change.

@steipete
steipete merged commit 3e471bd into main Aug 15, 2026
252 of 255 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the test/remove-provider-runtime-wrappers branch August 15, 2026 13:42
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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