Skip to content

fix(litellm): preserve provider settings through reauthentication - #174824

Merged
steipete merged 4 commits into
mainfrom
fix/litellm-upgrade-proxy-preservation
Oct 17, 2026
Merged

steipete merged 4 commits into
mainfrom
fix/litellm-upgrade-proxy-preservation

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Related: #173300, #173164

What Problem This Solves

Fixes two LiteLLM reauthentication failures after upgrading a config created by published OpenClaw 2026.10.4: a mixed-case provider loses its proxy URL, and activating the saved sign-in restores duplicate LiteLLM/litellm rows.

User Impact

Users can reauthenticate without repeating --custom-base-url, retain their authored models and provider settings, and activate the saved sign-in with one canonical provider row. There is no schema or public API change.

Why This Change Was Made

LiteLLM selected defaults from only the lowercase key before the existing merger folded provider casing, replacing the saved URL with http://localhost:4000. It now uses the existing public provider-config resolver for setup defaults and URL handling. Catalog URL/path selection keeps its original paired lookup.

A successful live activation then exposed setup projection appending the selected row to the old config. Projection now selects the authoritative prepared row using the same canonical-first resolver and removes equivalent old keys before publishing that complete snapshot. Unrelated providers stay intact.

Production LOC: +21/-14 (net +7). Tests: +109/-42. Docs: +4/-1. Removed duplicate LiteLLM lookup logic pays for most of the projection repair; the remaining seven lines perform canonical selection and remove obsolete aliases at the publishing owner. Existing test matrices cover omitted URLs, conflicting prepared rows, eight credential forms, and unrelated provider preservation.

Evidence

  • LiteLLM regression on original code: 18 passed / 1 expected failure (wrong localhost URL and added default model). Fixed: 20/20, final wall 16.01s, including a regression for conflicting version suffixes in case-variant rows.
  • Projection regression: 8 failed / 7 passed before alias removal; the strengthened canonical-precedence cases also failed 8/7 before the shared-resolver refinement. Final: 15/15, wall 53.79s. Final focused typecheck passed (10.15s); core lint passed (29.21s); prior combined extension/core lint passed (266.74s, including boundary preparation). Cold worker setup dominates test wall time.
  • Final full build passed (110.51s), including all 155 public SDK subpaths. Codex autoreview is clean through P2; the final review includes the shared catalog owner. Import cycles, line-cap, assertion-safety, timeout-race, mock-exports, config-docs, and plugin-inventory passed. Max-lines reports the same three unrelated UI suppressions already present in pinned main, in unchanged files.
  • Published stable created inline, env-marker, SecretRef, and auth-profile credentials in shared isolated state. All four real chats passed before and after the upgrade. Discovery without key/model flags matched saved-credential hashes and preserved complete provider objects and all five authored catalog rows.
  • Final native activation and direct LiteLLM chat passed, leaving exactly one lowercase row with the original URL/models and all four sibling provider objects unchanged. Native activation uses LiteLLM's documented starter alias; the recording relay explicitly maps that alias to real Ollama qwen3:4b. Direct chats request qwen3:4b; no canned responses.
  • All four replacement-endpoint switches and all four reset-preflight variants passed: relay B received no credential, and relay A received no request during each operation. Final no-auth and stable-created SecretRef sibling chats also passed. Every recorded credential hash matched its synthetic fixture; complete custom-provider objects survived rediscovery unchanged.

Read-only Doctor preserved config bytes; supported noninteractive Doctor repair migrated stable database schema 24 with service management disabled and provider objects unchanged. No operator state, Gateway, LaunchAgent, or real credentials used. Platform scope: macOS arm64 CLI/embedded-agent upgrade; other operating systems and managed-service update paths were not exercised. The first unaliased native probe correctly reached the saved endpoint but returned 404 because Ollama does not serve the LiteLLM starter alias; that fixture result is retained separately from the final passing proof.

ClawSweeper reviewed the final head with no code findings; its proof-only/auth-provider hold requests public captures, while the final-head upgrade and relay evidence remains local for the campaign lead’s review.

CI passed on 6bf0f2b64c08d43eb0242b2c783c396e9120fcd9, including openclaw/ci-gate: https://github.com/openclaw/openclaw/actions/runs/38986285616. No landing performed.

Resolve the authored provider row before choosing onboarding defaults, so
unattended reauthentication keeps its proxy and catalog instead of staging
localhost:4000. Reuse the same existing resolver for prompt and discovery reads.

Related: #173300, #173164
@clawsweeper

clawsweeper Bot commented Oct 16, 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 docs Improvements or additions to documentation extensions: litellm size: S labels Oct 16, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Preserves LiteLLM proxy settings during reauthentication and removes obsolete provider aliases when activating a saved sign-in.

Example: Reauthenticate a saved LiteLLM provider configured as LiteLLM with baseUrl https://proxy.example/v1.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation appears correct and the earlier finding is resolved; reported upgrade and credential-destination results lack inspectable captures.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Reauthentication can replace a working proxy URL or restore conflicting provider rows, disrupting an existing connection.
Reason: The maintainer-authored direction restores documented preservation behavior without adding configuration, schema, dependencies, or public API.

Merge readiness

⛔ Blocked before merge - 4 items remain

This PR repairs two source-confirmed configuration-preservation bugs, and the previous catalog finding is fixed. No introduced code defect was found.

Priority: P2
Reviewed head: 6bf0f2b64c08d43eb0242b2c783c396e9120fcd9

Before merge

  • Add real behavior proof - Authority-chain proof required: the body describes final-head CLI activation, real chats, and anonymous replacement/reset requests, but contains no inspectable output or request trace establishing those results. Attach redacted captures showing the authoritative endpoint receives the intended credential, a stale case-variant or replacement endpoint does not, and endpoint reassignment is respected during saved-sign-in activation; redact keys, IPs, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve security review attention item - No reachable credential leak was found, but the changed endpoint-selection path needs inspectable final-effect evidence.
  • Resolve merge risk - Saved-sign-in projection changes which persisted endpoint receives profile credentials; final-effect safety with conflicting or reassigned endpoints remains unverified.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Attach the reported shipped-CLI upgrade, saved-sign-in activation, and credential-isolation captures; baseline failures are reported but were not independently executed here.
Agent review details

How this fits together

The LiteLLM plugin prepares provider configuration, and shared setup projects the selected endpoint and credential binding into configuration used for verification and activation.

flowchart LR
  A[Saved provider configuration] --> B[LiteLLM authentication]
  B --> C[Prepared provider snapshot]
  C --> D[Shared setup projection]
  D --> E[Provider verification]
  E --> F[Activated configuration]
Loading

Technical review

Best possible solution:

Retain the focused resolver and projection repair, supported by inspectable upgrade and credential-destination captures.

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

Current-main source shows both failures: a mixed-case-only provider misses the onboarding URL lookup, and projection retains equivalent old keys; no target code was executed during this review.

Is this the best way to solve the issue?

The patch repairs the existing setup owners, reuses the public resolver, preserves unrelated providers, and restores the original paired catalog lookup.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Attach endpoint-isolation captures (recommended)
    Provide redacted final-head request traces showing the selected endpoint receives the intended credential and stale or replacement endpoints receive none, including saved-sign-in endpoint reassignment.

Provenance checked

  • LiteLLM setup defaults changes intended behavior with a stated reason (bcfddcc: Pluginization carried the lowercase lookup into the plugin; later discovery work deliberately retained default-model seeding only when no explicit URL exists or replace mode requires it.)
  • Interactive URL preservation keeps the original intent (696a60d: Prompt for the proxy URL while preserving authored settings and collapsing equivalent provider keys.)
  • Setup provider projection keeps the original intent (496433f: Save distinct credentials, verify the selected route, and publish configuration only after success; complete provider snapshots prevent omitted credentials from being revived.)
  • Catalog URL and endpoint pairing keeps the original intent (b68264d: Choose models versus v1/models from the same explicit base used by the shared builder to avoid doubled version prefixes.)

Testing

Proof path: in-process harness.

Security

Needs attention: No reachable credential leak was found, but the changed endpoint-selection path needs inspectable final-effect evidence.

Evidence

What I checked:

  • Introduced change: The pinned introduction diff changes LiteLLM configuration lookup and shared setup projection; catalog endpoint selection retains its original lookup. (extensions/litellm/onboard.ts:37, 6bf0f2b64c08)
  • Current main still needs the repair: Fetched main reads only the lowercase LiteLLM row when choosing onboarding defaults and appends the projected provider without removing equivalent existing keys. (src/system-agent/setup-model-selection.ts:291, 49940485315c)
  • Previous finding resolved: Comparison with the previously reviewed head confirms that discovery again selects its URL suffix using the same first-match lookup as the shared catalog builder; the added registered-plugin case covers conflicting version suffixes. (extensions/litellm/index.ts:139, 6bf0f2b64c08)
  • Existing ownership and intended behavior: The shared preset already owns canonical provider selection and alias removal. The merged predecessor explicitly intended to preserve authored provider settings: fix(litellm): interactive onboarding never asks for the proxy base URL #173164. Its discussion also identified duplicate provider rows during successful activation. (src/plugin-sdk/provider-onboard.ts:131, 696a60df27dd)
  • Proof supplied and inspection limit: The complete current body reports published-stable upgrades, real chats, canonical-row readback, and replacement/reset credential-isolation checks, but supplies no inspectable terminal capture, request trace, or linked artifact for those runs. (6bf0f2b64c08)
  • Feature history: History identifies substantial LiteLLM and setup work by Peter Steinberger, Ayaan Zaidi, and Midhun V Nadh. Following onboard.ts eventually encountered unavailable object 0543e7c2a680189b54beebbd551947214ea7dea7; available history and current-main blame establish the routing candidates without attributing the original pre-plugin behavior. (extensions/litellm/onboard.ts, 49940485315c)

PR surface

Source +7, Tests +67, Docs +3. Total +77 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 21 14 +7
Tests 2 109 42 +67
Docs 1 4 1 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 134 57 +77

Review metrics

Metric Value Why it matters
Production versus test LOC Production +21/-14; tests +109/-42 Small production growth repairs publication ownership, while existing test matrices expand to cover unattended reauthentication, canonical precedence, and credential representations.

Labels

Label changes:

  • add merge-risk: 🚨 auth-provider: Canonical provider selection determines the persisted endpoint and credential binding used by subsequent activation.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp. Replaced prior rating: 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 📣 needs proof.

Label justifications:

  • P2: A focused provider reauthentication and activation repair with limited scope and no demonstrated urgent runtime outage.
  • merge-risk: 🚨 auth-provider: Canonical provider selection determines the persisted endpoint and credential binding used by subsequent activation.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp. Replaced prior rating: 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Attach final-head CLI upgrade output with provider/configuration readback.
  • Add final-effect proof that stale or reassigned endpoints cannot receive the saved credential during activation.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-16T23:36:05.928Z sha 08a263f :: blocked before merge. :: [P2] Use the same provider row for discovery URL and endpoint selection

Reviewed October 16, 2026, 8:30 PM ET / October 17, 2026, 00:30 UTC (Revision 2).

@steipete steipete changed the title fix(litellm): preserve proxy URL during unattended reauthentication fix(litellm): preserve provider settings through reauthentication Oct 16, 2026
@steipete
steipete marked this pull request as ready for review October 17, 2026 00:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T00:28:17.384388Z 6bf0f2b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete

Copy link
Copy Markdown
Contributor Author

Addressed the catalog URL/path mismatch by retaining the shared catalog builder's original lookup. The new conflicting-version-suffix case failed before the correction; all 20 registered LiteLLM tests now pass. The final built head also passed native activation, explicit catalog refresh, real Ollama chats, and all eight credential-isolation switch/reset cases. The PR body contains the updated evidence.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@steipete
steipete merged commit 3f4f926 into main Oct 17, 2026
139 of 142 checks passed
@steipete
steipete deleted the fix/litellm-upgrade-proxy-preservation branch October 17, 2026 01:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…enclaw#174824)

* fix(litellm): preserve mixed-case proxy URLs during reauthentication

Resolve the authored provider row before choosing onboarding defaults, so
unattended reauthentication keeps its proxy and catalog instead of staging
localhost:4000. Reuse the same existing resolver for prompt and discovery reads.

Related: openclaw#173300, openclaw#173164

* fix(setup): retain provider alias folding during activation

* fix(setup): prefer canonical provider snapshots during activation

* fix(litellm): keep discovery URL and path selection aligned
steipete added a commit that referenced this pull request Oct 26, 2026
* test(llm): consolidate s0841 observation coverage

Remove the catalog/fast-mode replay: prepared-model-runtime.catalog-auth.test.ts already covers downgrade/recovery clearing in 'notifies downgrade, recovery, and expiry while refreshing repeats and canceling retired timers'; openai.test.ts covers 'preserves Ultrafast on the API boundary at %s'. Preserve observer forwarding and repeated-observation log severity in the retry-attribution case. Keep the real-transport cooldown and run-isolation cases.

* test(litellm): deslop s0840 tests

Consolidate authored noninteractive setup into the existing setup table and reuse onboarding model/config assertions. Keep interactive profile and normalized-key proof in the authored-settings cases, configured-URL fallback in the URL table, and merge-mode proof in onboarding's authored-metadata cases. Preserve the alias and discovery regressions from #174824 and #174818. No production or routing changes.

* test(litellm): consolidate s0840 owner-boundary coverage

Retire the mocked interactive harness in index.test.ts. The onboarding tests 'normalizes %j to %j and selects the first served model', 'rejects invalid proxy URL %s', and 'preserves authored metadata in %s mode with canonical row %s' now carry URL, validation, credential and canonical-row assertions through discovery-backed setup. Keep noninteractive defaults, alias preservation and catalog endpoint selection in index.test.ts.

Remove the provider-local credential persistence replay and internal mock call inventory. The shared owner test src/plugins/provider-api-key-auth.test.ts 'persists non-interactive credentials through the runtime auth owner' retains actual persistence proof. LiteLLM keeps its public flag/env wiring and resulting auth configuration assertions. No production or Vitest routing changes. Static checks only, per campaign CI-only mode.

* test(google-meet): deslop s0842 tests

Replace hand-built registration capture arrays with typed API spies and simplify the child-process mock factory. Keep all lazy-load, policy failure, URL validation, diagnostic, and lifecycle assertions.

Drop the active-pair SIGTERM-resistance table row: shares SIGTERM-resistant cleanup across concurrent stopByUrl calls retains the same stopSession/process termination path. Keep the retired-output row for its distinct cleanup ownership.

CI-only validation: oxfmt, git diff --check, and plain oxlint passed. No tests or coverage run. Lines 492 -> 459 (6.7%); retain unique behavior rather than force the 25% target.

* test(google-meet): remove redundant lazy import replay

Keep cold registration, node-owner activation and both policy failure boundaries. Consolidate observation launch setup and remove duplicate process counts, response inventories and backend metadata assertions.

Remaining proof: src/shared/lazy-runtime.test.ts caches imported modules; index.test.ts keeps test-listen probes on the agent that invoked the tool, creates and joins a Meet through the create tool action by default, refreshes blocked realtime browser health read-only when status is requested, and registers the node-host command used by chrome-node transport. CLI proof remains in src/cli.test.ts accepts --json on session status and runs a listen-first health probe. Transcript lifecycle remains in src/meeting-bot/transcripts-bridge.test.ts retires simultaneous tool subscribers when meeting metadata finalization fails; native backend defaults remain in src/meeting-bot/configured-node-host.test.ts selects the native backend for macOS and Linux.

CI-only validation: oxfmt, plain oxlint and git diff --check pass; no test runs. Shard base lines: lazy-import 208 -> 121, node-host 284 -> 247; total 492 -> 368 (-25.2%).

* test(ui): deslop s0844 tests

Share scroll fixtures and frame assertions while retaining replacement, readiness, font, cancellation and disposal coverage. Remove the duplicate in-place projection case: publishes local mutations while observed and reconnects after the last reader leaves retains its synchronous-read, deferred-notification and revision assertions.

* test(ui): consolidate s0844 owner-boundary proof

Table mutable/callback adapter lifecycles and share settled-value assertions. Keep explicit-subscriber identity and pending-disposal ordering checks. Simplify restore inputs without repeating the request producer.

Covering sibling tests: shared-owner-projection.test.ts / shares the fixed projection across independent consumers, owners, and read contracts retains lazy acquisition, first/last release, reconnect and same-object mutation proof. scroll-state-observer.test.ts / releases retired publishers while fonts load and remeasures active views retains font event and retirement proof; batches geometry and scrolls retains event coalescing. Shard replacement, hidden-content and live-target disposal cases retain Solid binding lifecycle proof.

* test(comfy): deslop s0845 tests

Share workflow and response fixtures; reuse mock call recording and compact assertions without dropping any of the 24 expanded cases. Retain all private-network, redirect, credential, terminal-error, timeout, seed isolation, upload and download contracts. Static gates pass; runtime proof deferred to batch CI.

* test(comfy): consolidate s0845 provider proof

Retain all 24 expanded cases while consolidating readiness and redirect fixtures, reusing the real SSRF harness for cloud authentication, and removing internal call-count and audit-label assertions. Keep endpoint, credential, blocked-request, response-limit and lifecycle assertions. Reduce the shard from 555 original lines to 414. Static lint and formatting pass; runtime proof remains deferred to hosted CI.

* test(acpx): deslop s0843 tests

Share native-catalog registration defaults and simplify the setup probe fixture. Keep every catalog, environment-policy, error-redaction and runtime lifecycle case.

The startup/first-use test in register.runtime.test.ts now owns the service ID assertion; its start/stop behavior covers the removed index.test.ts function-shape checks. Preserve both pre-publication and post-publication shutdown races.

* test(acpx): consolidate s0843 registration suite

Move register.runtime.test.ts into index.test.ts under the same ACPX Vitest include. Table the before-publication and pending-probe shutdown races while retaining concurrent admission, stale proxy, cleanup ordering and successor ownership assertions.

The current-config native inspection case covers the removed repeated disabled inventory read after re-registration. Retain representative installed, missing and unverified states instead of copying the entire agent inventory. Share discovery setup across ready, auth-rejected and unavailable outcomes, keeping env policy and private error-data assertions.

* test(gateway): deslop s0846 tests

Share discovery setup, remove a single-use blocked-probe wrapper, and simplify deadline fixtures without removing distinct behavior. Retain public redaction, credential-discovery exclusions, ingress pressure/privacy, aggregate deadlines, wall-clock steps, drain ownership, and cross-collection permit retention. CI-only validation: oxfmt, oxlint, and diff checks; no test runs.

* test(gateway): consolidate s0846 health coverage

Combine admitted/configured-unavailable discovery into one catalog scenario, retaining public redaction, bindings, disabled accounts, failure reporting, and credential-discovery exclusion. Preserve ingress pressure forwarding in the queue admission-failure scenario.

Remove the retry-floor construction replay: src/channels/message/ingress-queue-health.test.ts covers it in 'reports durable pressured lanes without leaking private or null-lane rows'. Retrying account field preservation remains in channels.status.test.ts's 'reports admitted accounts safely without resolving removed configuration' matrix. Session SQLite paths remain covered by collector.session-store-path.test.ts's 'scopes template stores and recovers from transient reads'.

Consolidate elapsed-preparation and forward/backward clock cases into one table with all three executed branches. Retain slow-summary public negative redaction, mixed healthy/deadline results, unfinished-work draining, and cross-collection permit ownership. No production changes. CI-only checks: oxfmt, oxlint, git diff --check; no tests run.

* test(onepassword): deslop s0848 tests

* test(onepassword): consolidate s0848 broker scenarios

Share rejection and live-policy cases, unify grant/cache lifetime proof, and combine nonce session correlation checks. Preserve approval, replay, expiry, and pending-write race boundaries.

Remove duplicate list-state assertions covered by tool-list.test.ts: validates selected grants. CI-only: formatting, oxlint and diff checks passed; no tests run.

* test(llm): deslop s0847 tests

Remove the host-function identity probe; the retained installed-host test proves wrapping through the prepared request header, and the authority matrix proves empty full-completion context. Consolidate same-path read-tool source fixtures while preserving every original payload assertion. Keep distinct authority, redaction, pacing, recovery, and callback-retention cases.

* test(llm): consolidate s0847 host boundary proof

Fold installed-wrapper proof into the prepared/full authority matrix; keep both dispatch paths and current, retired, and aborted outcomes. Remove options-identity and fixture-state assertions, share embedded-stream setup, and derive ordering observations from the provider spy.

Remaining covering tests: isolated-completion.usage.test.ts retains the host's returned usage exactly once when its caller is accepted, retired, or aborted; session-tool-result-guard.test.ts preserves read bytes in model context and transcript through a real read; tool-result-redaction.test.ts preserves structured fields and source strings; packages/ai/src/providers/anthropic.test.ts preserves mixed text and image tool-result order; packages/ai/src/stream.host-scope.test.ts accepts frozen provider streams and preserves producer completion identity. The retained callback-retention probe covers iteration and result consumption lifecycles.

Keep exact installed-host image bytes, MIME/base64 normalization, both registered-secret diagnostic boundaries, and full raw source-byte fidelity in Anthropic and OpenAI-compatible payloads. Remove duplicate fake filesystem and structured-extractor layers and per-input replays through the same text path. CI-only validation: formatting, diff-check, and plain oxlint passed; no test or build runs.

* test(devices): deslop s0849 tests

Share approval snapshots, row selectors, pairing props, and pending-state assertions without dropping any case or distinct behavior. Preserve approval ownership, native read-only policy, binding loss/recovery, retry retirement, access gating, and live-region assertions.

* test(devices): consolidate s0849 behavior coverage

Remove duplicate creation-error/retry and mobile help proof covered by ui/src/e2e/mobile-pairing.e2e.test.ts: retires exact setup credentials across success, expiry, regeneration, and errors. RPC status routing remains covered by ui/src/lib/device-pair-setup.test.ts: retries an unknown outcome without minting a replacement credential.

Share the scope picker render with wildcard/agent policy assertions and the waiting node render with command, expiry, help, and persistent live-region assertions. Keep exact-ID and ambiguous-name binding paths, both default and agent bindings, loss/recovery, authority callbacks, and close/reopen late-response retirement. Supply dirty state so native-policy read-only proof cannot pass merely because the form is clean. No production changes; CI-only static validation.

* test(discord): deslop s0851 tests

Share HTTP and store fixtures, table pending-launch decision paths, and retain OAuth, body limits, session, channel, CSP, and account-isolation assertions. The global-capacity case now checks the budget both before and after settlement; the vendor retry case reads the real generated asset path. Remove redundant internal lookup/read counts and shell path-slicing source text checks.

* test(deepgram): deslop s0850 tests

Verify nested realtime configuration through the loopback request rather than duplicating its normalized object. Keep default model and endpointing assertions on the existing default-config scenario.

Flux protocol cases cover successful model routing, including case/whitespace normalization; audio.test.ts covers nova-3 HTTP routing. Keep missing-transcript rejection as the representative of the shared non-string guard. Preserve lifecycle, deadline, redaction, and private-network assertions.

CI-only shard: oxlint, oxfmt, and diff checks passed; tests and coverage not run. Retain remaining distinct behaviors despite falling short of the 25 percent LOC target.

* test(deepgram): consolidate s0850 transport fixtures

Share only the loopback server, upgrade capture and cleanup; keep Flux process/provider mocks isolated from the realtime suite. Consolidate turn, config-rejection and finalization cases into branch tables without dropping their lifecycle or security assertions.

Preserve both finalized/provisional reconnect paths, provider-reply/fallback close paths, silence gaps, transcript bounds, private-network rejection, URL redaction and Flux wire/query checks. Retain all 22 cases from the prior shard commit.

Original shard: 562 lines. Final: realtime 217 + Flux 177 + shared support 27 = 421 lines (25.1 percent reduction). CI-only: oxfmt, plain oxlint and diff checks pass; no tests or coverage run.

* test(brave): deslop s0853 tests

Remove repeated shared-cache TTL coverage; web-search-provider-common.test.ts retains the reader TTL contract, while Brave result-cap and credential tests retain cache-hit and isolation proof. Simplify fixtures and remove exact diagnostic metadata/error wording snapshots, preserving cancellation, endpoint policy, publication dates, and log redaction assertions.

* test(brave): consolidate s0853 boundary fixtures

Consolidate publication-date and wrapped-content assertions into maps-and-caches cases; retain caller cancellation as a distinct transport-table case. Move locale rejection cases into the validation table, minimize logger fixtures, and remove duplicate cache/diagnostic wiring assertions. Keep DNS handoff, cancellation, deadline, endpoint policy, credential isolation, and diagnostic privacy contracts. CI-only: formatting, diff checks, and plain oxlint passed; no test runs.

* test(github): deslop s0852 tests

Consolidate check aggregation, cache transitions, log redaction, and rejection fixtures while retaining security and lifecycle assertions. Drop the duplicate cooldown replay covered by detail.test.ts: normalizes and caches rate limits; optional-check body preservation remains in keeps the PR after HTTP. Metadata tone projection remains covered by index.test.ts: maps badges and metadata. CI-only validation: plain oxlint, oxfmt, and git diff --check.

* test(ui): deslop s0854 tests

Consolidate Labs toggle cases, exact patch assertions, and pending-save setup. Preserve all 37 expanded cases, including reconnect/navigation retirement and unavailable decision preferences. Reduce labs-page.test.tsx from 557 to 417 lines. Static oxlint, formatting, and diff checks pass; runtime proof is deferred to hosted CI per campaign instructions.

* test(link-understanding): deslop s0855 tests

* test(link-understanding): consolidate s0855 boundary coverage

Move Markdown variants and dedupe/limit proof into the real-transport extraction case. The prepared-model-text table now owns successful processing, empty-output fallback, and timeout selection; the streaming table retains separate cancellation and timeout branches. Remove redundant command call-shape instrumentation while retaining SSRF, privacy, cleanup ordering, and descendant cancellation assertions.

* test(google-meet): deslop s0856 tests

* test(google-meet): consolidate s0856 harness cleanup

* test: retain independent provider boundary coverage

* test: align consolidated fixtures with current types

* test: preserve mock isolation and bound catalog methods

* test: prune retired mock export allowances

* test(llm): preserve structural image payload assertions

* test(llm): retain transport logger fixture contract
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
)

* test(llm): consolidate s0841 observation coverage

Remove the catalog/fast-mode replay: prepared-model-runtime.catalog-auth.test.ts already covers downgrade/recovery clearing in 'notifies downgrade, recovery, and expiry while refreshing repeats and canceling retired timers'; openai.test.ts covers 'preserves Ultrafast on the API boundary at %s'. Preserve observer forwarding and repeated-observation log severity in the retry-attribution case. Keep the real-transport cooldown and run-isolation cases.

* test(litellm): deslop s0840 tests

Consolidate authored noninteractive setup into the existing setup table and reuse onboarding model/config assertions. Keep interactive profile and normalized-key proof in the authored-settings cases, configured-URL fallback in the URL table, and merge-mode proof in onboarding's authored-metadata cases. Preserve the alias and discovery regressions from openclaw#174824 and openclaw#174818. No production or routing changes.

* test(litellm): consolidate s0840 owner-boundary coverage

Retire the mocked interactive harness in index.test.ts. The onboarding tests 'normalizes %j to %j and selects the first served model', 'rejects invalid proxy URL %s', and 'preserves authored metadata in %s mode with canonical row %s' now carry URL, validation, credential and canonical-row assertions through discovery-backed setup. Keep noninteractive defaults, alias preservation and catalog endpoint selection in index.test.ts.

Remove the provider-local credential persistence replay and internal mock call inventory. The shared owner test src/plugins/provider-api-key-auth.test.ts 'persists non-interactive credentials through the runtime auth owner' retains actual persistence proof. LiteLLM keeps its public flag/env wiring and resulting auth configuration assertions. No production or Vitest routing changes. Static checks only, per campaign CI-only mode.

* test(google-meet): deslop s0842 tests

Replace hand-built registration capture arrays with typed API spies and simplify the child-process mock factory. Keep all lazy-load, policy failure, URL validation, diagnostic, and lifecycle assertions.

Drop the active-pair SIGTERM-resistance table row: shares SIGTERM-resistant cleanup across concurrent stopByUrl calls retains the same stopSession/process termination path. Keep the retired-output row for its distinct cleanup ownership.

CI-only validation: oxfmt, git diff --check, and plain oxlint passed. No tests or coverage run. Lines 492 -> 459 (6.7%); retain unique behavior rather than force the 25% target.

* test(google-meet): remove redundant lazy import replay

Keep cold registration, node-owner activation and both policy failure boundaries. Consolidate observation launch setup and remove duplicate process counts, response inventories and backend metadata assertions.

Remaining proof: src/shared/lazy-runtime.test.ts caches imported modules; index.test.ts keeps test-listen probes on the agent that invoked the tool, creates and joins a Meet through the create tool action by default, refreshes blocked realtime browser health read-only when status is requested, and registers the node-host command used by chrome-node transport. CLI proof remains in src/cli.test.ts accepts --json on session status and runs a listen-first health probe. Transcript lifecycle remains in src/meeting-bot/transcripts-bridge.test.ts retires simultaneous tool subscribers when meeting metadata finalization fails; native backend defaults remain in src/meeting-bot/configured-node-host.test.ts selects the native backend for macOS and Linux.

CI-only validation: oxfmt, plain oxlint and git diff --check pass; no test runs. Shard base lines: lazy-import 208 -> 121, node-host 284 -> 247; total 492 -> 368 (-25.2%).

* test(ui): deslop s0844 tests

Share scroll fixtures and frame assertions while retaining replacement, readiness, font, cancellation and disposal coverage. Remove the duplicate in-place projection case: publishes local mutations while observed and reconnects after the last reader leaves retains its synchronous-read, deferred-notification and revision assertions.

* test(ui): consolidate s0844 owner-boundary proof

Table mutable/callback adapter lifecycles and share settled-value assertions. Keep explicit-subscriber identity and pending-disposal ordering checks. Simplify restore inputs without repeating the request producer.

Covering sibling tests: shared-owner-projection.test.ts / shares the fixed projection across independent consumers, owners, and read contracts retains lazy acquisition, first/last release, reconnect and same-object mutation proof. scroll-state-observer.test.ts / releases retired publishers while fonts load and remeasures active views retains font event and retirement proof; batches geometry and scrolls retains event coalescing. Shard replacement, hidden-content and live-target disposal cases retain Solid binding lifecycle proof.

* test(comfy): deslop s0845 tests

Share workflow and response fixtures; reuse mock call recording and compact assertions without dropping any of the 24 expanded cases. Retain all private-network, redirect, credential, terminal-error, timeout, seed isolation, upload and download contracts. Static gates pass; runtime proof deferred to batch CI.

* test(comfy): consolidate s0845 provider proof

Retain all 24 expanded cases while consolidating readiness and redirect fixtures, reusing the real SSRF harness for cloud authentication, and removing internal call-count and audit-label assertions. Keep endpoint, credential, blocked-request, response-limit and lifecycle assertions. Reduce the shard from 555 original lines to 414. Static lint and formatting pass; runtime proof remains deferred to hosted CI.

* test(acpx): deslop s0843 tests

Share native-catalog registration defaults and simplify the setup probe fixture. Keep every catalog, environment-policy, error-redaction and runtime lifecycle case.

The startup/first-use test in register.runtime.test.ts now owns the service ID assertion; its start/stop behavior covers the removed index.test.ts function-shape checks. Preserve both pre-publication and post-publication shutdown races.

* test(acpx): consolidate s0843 registration suite

Move register.runtime.test.ts into index.test.ts under the same ACPX Vitest include. Table the before-publication and pending-probe shutdown races while retaining concurrent admission, stale proxy, cleanup ordering and successor ownership assertions.

The current-config native inspection case covers the removed repeated disabled inventory read after re-registration. Retain representative installed, missing and unverified states instead of copying the entire agent inventory. Share discovery setup across ready, auth-rejected and unavailable outcomes, keeping env policy and private error-data assertions.

* test(gateway): deslop s0846 tests

Share discovery setup, remove a single-use blocked-probe wrapper, and simplify deadline fixtures without removing distinct behavior. Retain public redaction, credential-discovery exclusions, ingress pressure/privacy, aggregate deadlines, wall-clock steps, drain ownership, and cross-collection permit retention. CI-only validation: oxfmt, oxlint, and diff checks; no test runs.

* test(gateway): consolidate s0846 health coverage

Combine admitted/configured-unavailable discovery into one catalog scenario, retaining public redaction, bindings, disabled accounts, failure reporting, and credential-discovery exclusion. Preserve ingress pressure forwarding in the queue admission-failure scenario.

Remove the retry-floor construction replay: src/channels/message/ingress-queue-health.test.ts covers it in 'reports durable pressured lanes without leaking private or null-lane rows'. Retrying account field preservation remains in channels.status.test.ts's 'reports admitted accounts safely without resolving removed configuration' matrix. Session SQLite paths remain covered by collector.session-store-path.test.ts's 'scopes template stores and recovers from transient reads'.

Consolidate elapsed-preparation and forward/backward clock cases into one table with all three executed branches. Retain slow-summary public negative redaction, mixed healthy/deadline results, unfinished-work draining, and cross-collection permit ownership. No production changes. CI-only checks: oxfmt, oxlint, git diff --check; no tests run.

* test(onepassword): deslop s0848 tests

* test(onepassword): consolidate s0848 broker scenarios

Share rejection and live-policy cases, unify grant/cache lifetime proof, and combine nonce session correlation checks. Preserve approval, replay, expiry, and pending-write race boundaries.

Remove duplicate list-state assertions covered by tool-list.test.ts: validates selected grants. CI-only: formatting, oxlint and diff checks passed; no tests run.

* test(llm): deslop s0847 tests

Remove the host-function identity probe; the retained installed-host test proves wrapping through the prepared request header, and the authority matrix proves empty full-completion context. Consolidate same-path read-tool source fixtures while preserving every original payload assertion. Keep distinct authority, redaction, pacing, recovery, and callback-retention cases.

* test(llm): consolidate s0847 host boundary proof

Fold installed-wrapper proof into the prepared/full authority matrix; keep both dispatch paths and current, retired, and aborted outcomes. Remove options-identity and fixture-state assertions, share embedded-stream setup, and derive ordering observations from the provider spy.

Remaining covering tests: isolated-completion.usage.test.ts retains the host's returned usage exactly once when its caller is accepted, retired, or aborted; session-tool-result-guard.test.ts preserves read bytes in model context and transcript through a real read; tool-result-redaction.test.ts preserves structured fields and source strings; packages/ai/src/providers/anthropic.test.ts preserves mixed text and image tool-result order; packages/ai/src/stream.host-scope.test.ts accepts frozen provider streams and preserves producer completion identity. The retained callback-retention probe covers iteration and result consumption lifecycles.

Keep exact installed-host image bytes, MIME/base64 normalization, both registered-secret diagnostic boundaries, and full raw source-byte fidelity in Anthropic and OpenAI-compatible payloads. Remove duplicate fake filesystem and structured-extractor layers and per-input replays through the same text path. CI-only validation: formatting, diff-check, and plain oxlint passed; no test or build runs.

* test(devices): deslop s0849 tests

Share approval snapshots, row selectors, pairing props, and pending-state assertions without dropping any case or distinct behavior. Preserve approval ownership, native read-only policy, binding loss/recovery, retry retirement, access gating, and live-region assertions.

* test(devices): consolidate s0849 behavior coverage

Remove duplicate creation-error/retry and mobile help proof covered by ui/src/e2e/mobile-pairing.e2e.test.ts: retires exact setup credentials across success, expiry, regeneration, and errors. RPC status routing remains covered by ui/src/lib/device-pair-setup.test.ts: retries an unknown outcome without minting a replacement credential.

Share the scope picker render with wildcard/agent policy assertions and the waiting node render with command, expiry, help, and persistent live-region assertions. Keep exact-ID and ambiguous-name binding paths, both default and agent bindings, loss/recovery, authority callbacks, and close/reopen late-response retirement. Supply dirty state so native-policy read-only proof cannot pass merely because the form is clean. No production changes; CI-only static validation.

* test(discord): deslop s0851 tests

Share HTTP and store fixtures, table pending-launch decision paths, and retain OAuth, body limits, session, channel, CSP, and account-isolation assertions. The global-capacity case now checks the budget both before and after settlement; the vendor retry case reads the real generated asset path. Remove redundant internal lookup/read counts and shell path-slicing source text checks.

* test(deepgram): deslop s0850 tests

Verify nested realtime configuration through the loopback request rather than duplicating its normalized object. Keep default model and endpointing assertions on the existing default-config scenario.

Flux protocol cases cover successful model routing, including case/whitespace normalization; audio.test.ts covers nova-3 HTTP routing. Keep missing-transcript rejection as the representative of the shared non-string guard. Preserve lifecycle, deadline, redaction, and private-network assertions.

CI-only shard: oxlint, oxfmt, and diff checks passed; tests and coverage not run. Retain remaining distinct behaviors despite falling short of the 25 percent LOC target.

* test(deepgram): consolidate s0850 transport fixtures

Share only the loopback server, upgrade capture and cleanup; keep Flux process/provider mocks isolated from the realtime suite. Consolidate turn, config-rejection and finalization cases into branch tables without dropping their lifecycle or security assertions.

Preserve both finalized/provisional reconnect paths, provider-reply/fallback close paths, silence gaps, transcript bounds, private-network rejection, URL redaction and Flux wire/query checks. Retain all 22 cases from the prior shard commit.

Original shard: 562 lines. Final: realtime 217 + Flux 177 + shared support 27 = 421 lines (25.1 percent reduction). CI-only: oxfmt, plain oxlint and diff checks pass; no tests or coverage run.

* test(brave): deslop s0853 tests

Remove repeated shared-cache TTL coverage; web-search-provider-common.test.ts retains the reader TTL contract, while Brave result-cap and credential tests retain cache-hit and isolation proof. Simplify fixtures and remove exact diagnostic metadata/error wording snapshots, preserving cancellation, endpoint policy, publication dates, and log redaction assertions.

* test(brave): consolidate s0853 boundary fixtures

Consolidate publication-date and wrapped-content assertions into maps-and-caches cases; retain caller cancellation as a distinct transport-table case. Move locale rejection cases into the validation table, minimize logger fixtures, and remove duplicate cache/diagnostic wiring assertions. Keep DNS handoff, cancellation, deadline, endpoint policy, credential isolation, and diagnostic privacy contracts. CI-only: formatting, diff checks, and plain oxlint passed; no test runs.

* test(github): deslop s0852 tests

Consolidate check aggregation, cache transitions, log redaction, and rejection fixtures while retaining security and lifecycle assertions. Drop the duplicate cooldown replay covered by detail.test.ts: normalizes and caches rate limits; optional-check body preservation remains in keeps the PR after HTTP. Metadata tone projection remains covered by index.test.ts: maps badges and metadata. CI-only validation: plain oxlint, oxfmt, and git diff --check.

* test(ui): deslop s0854 tests

Consolidate Labs toggle cases, exact patch assertions, and pending-save setup. Preserve all 37 expanded cases, including reconnect/navigation retirement and unavailable decision preferences. Reduce labs-page.test.tsx from 557 to 417 lines. Static oxlint, formatting, and diff checks pass; runtime proof is deferred to hosted CI per campaign instructions.

* test(link-understanding): deslop s0855 tests

* test(link-understanding): consolidate s0855 boundary coverage

Move Markdown variants and dedupe/limit proof into the real-transport extraction case. The prepared-model-text table now owns successful processing, empty-output fallback, and timeout selection; the streaming table retains separate cancellation and timeout branches. Remove redundant command call-shape instrumentation while retaining SSRF, privacy, cleanup ordering, and descendant cancellation assertions.

* test(google-meet): deslop s0856 tests

* test(google-meet): consolidate s0856 harness cleanup

* test: retain independent provider boundary coverage

* test: align consolidated fixtures with current types

* test: preserve mock isolation and bound catalog methods

* test: prune retired mock export allowances

* test(llm): preserve structural image payload assertions

* test(llm): retain transport logger fixture contract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation extensions: litellm P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant