Skip to content

fix(models): signed-in native runtime loses to a runtime preference pinned before sign-in - #180830

Open
ivankuznetsov wants to merge 8 commits into
openclaw:mainfrom
ivankuznetsov:fix/signed-in-native-runtime
Open

ivankuznetsov wants to merge 8 commits into
openclaw:mainfrom
ivankuznetsov:fix/signed-in-native-runtime

Conversation

@ivankuznetsov

@ivankuznetsov ivankuznetsov commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: after completing a native/CLI subscription sign-in (for example Muse), chats keep resolving the model to the default API runtime and fail with missing-auth errors, because a runtime preference stored while unauthenticated suppresses the signed-in runtime forever — and runtime-choice preparation never validated the stored preference at all.

User Impact

On re-selection, the stored runtime preference is now validated against current availability:

  • A stored preference that is still available always wins (unchanged behavior).
  • A stored preference that no longer evaluates available (missing credential, expired sign-in, cooldown) makes selection fail with provider sign-in guidance for that runtime — it is never silently replaced by another runtime. This follows the no-silent-switching principle from feat: select and manage installed agents from Models #150224: re-selection validates the pin, it does not replace it. The user recovers by signing in (chat sign-in buttons / Control UI handoff) or by explicitly choosing a different runtime.
  • Sessions without a stored preference keep existing discovery behavior: a claiming CLI/native runtime may be selected when available. Stored rows holding the "no preference" values auto or default (any casing) are read the same way and are never treated as a pin.
  • A required inference="worker" profile keeps ownership of runtime selection (pinned or unpinned), so re-selection never validates worker-local credentials on the gateway.

Plain turns without re-selection are untouched; implicit runtime choices saved as pins at write time are a separate follow-up.

Why This Change Was Made

Two stacked causes: session runtime overrides skipped CLI/native runtime discovery entirely, and dual-route models that list the API catalog row first skipped runtime-choice preparation even when a native variant exists. The change always discovers claiming runtimes, treats a native variant as requiring runtime choice, and passes a stored real runtime id (not auto/default) to runtime-choice preparation as a dedicated pinnedRuntimeId. Availability-filtered choices (runtimeChoices only contains runtimes that evaluated available) decide the outcome: pin available → pin wins; pin unavailable → selection returns the existing unavailable message with sign-in guidance instead of falling through to choices[0].

Evidence

Head 04093a8390f. Current main (8ab24647379, version 2026.11.6) merged cleanly in 25502ef202c. 04093a8390f fixes a gap found during live proof.

Live gap fixed in 04093a8390f: a model whose runtime is set in config.

  • What happened. On an upgraded copy of real state, with Muse signed in and Meta's API route signed out, a session storing an openclaw pin switched to meta/muse-spark-1.3 through both typed /model and sessions.patch. It replied Model set to meta/muse-spark-1.3 and kept the pin, leaving the chat on a runtime that cannot serve the model.
  • Why. Muse models get their runtime from config (agents.defaults.models["meta/muse-spark-1.3"].agentRuntime = { id: "muse" }), not from a catalog row with nativeRuntime. The stored openclaw override made the effective runtime openclaw, so runtime-choice preparation never ran.
  • The fix. A model or provider runtime configured to something other than openclaw (runtimeSource model or provider) now also runs runtime-choice preparation, which validates the stored pin. The change is 7 lines in model-runtime-normalization.ts. Unpinned sessions are unchanged, because their effective runtime already is the configured one.
  • Regression test. "validates a stored openclaw preference against the runtime the model's config declares" uses a config-declared runtime with no nativeRuntime anywhere. On the previous head it returns status: "ready"; on this head, "rejected". The native-harness registry setup the tests repeated is now one local helper, keeping the file under the line limit.

Data-model compatibility (earlier head a2403ff6771). No schema, config, or migration changes. Existing session rows are read as stored, not rewritten. A new stored-row test, "reads a stored runtime override … from an existing session row", feeds session rows shaped like those earlier releases persisted (sessionId, updatedAt, providerOverride, modelOverride, optional agentRuntimeOverride) through re-selection. Values covered: absent, "auto", "default", unnormalized " Auto ", legacy alias "pi", and "OpenClaw". This test found a real regression in the previous head: rows storing auto/default became a hard pin on a runtime id that is never a choice, so re-selection was rejected. Fixed in 8a46c50e100; those rows now stay unpinned.

  • Previous PR head 1e2a8b9438a: auto, default, and " Auto " fail (rejected); the others pass.
  • This head: 6/6 pass.

Red on base. These are this PR's regressions run against main's model-runtime-choice.ts and model-runtime-normalization.ts with this branch's tests. All fail with assertion errors; on main, every case returns ready with the runtime unchanged, because API-first dual-route re-selection never reaches runtime-choice validation:

  • "does not silently switch from a stored openclaw preference pinned while signed out…": expected rejected, got ready.
  • "keeps a stored openclaw preference when its route is still signed in": expected { kind: "set", runtime: "openclaw" }, got { kind: "unchanged" }.
  • All 6 stored-row cases fail.
  • Base totals: 8 failed, 21 passed. This head: 29/29.

The two required-worker re-selection tests pass on both base and head. They guard the earlier P1 against regression and are not red-on-base proofs.

Tests on this head (node scripts/test-projects.mts <files> --maxWorkers=2): 13 files, 298 tests, all passing.

  • model-runtime-choice.native, sessions-patch-model-selection
  • directive-handling.model, directive-handling.mixed-inline, directive-handling.session-list, directive-handling.levels
  • session-override.user-link, openclaw-tools.session-status.gateway-model, get-reply-native-slash-fast-path
  • agents-model-selection, sessions-mutations.sticky-model, server.sessions.agent-model-catalog, apply-session-model-selection

With #202564 and #180831 combined: 131 tests across the three PRs' suites, all passing. tsgo:core is clean, and oxlint/oxfmt are clean on touched files.

Live proof

Pin cases on the owner's real state (2026-11-23). The copy of the operator's state was written by a 2026.10.10 main build and upgraded to this head (combined build e8ec8a4). It ran in an isolated Gateway with the live state mounted read-only. Muse was signed in through a Meta device code and Meta's API route had no credential. The proof session stores an openclaw pin and sits on xai/grok-4.3.

sessions.patch model=meta/muse-spark-1.3
  -> Runtime "openclaw" is not available for meta/muse-spark-1.3: sign-in needed. Connect its provider account, or choose another model.
  row unchanged: {"providerOverride":"xai","modelOverride":"grok-4.3","agentRuntimeOverride":"openclaw"}
/model meta/muse-spark-1.3  (chat.send)
  <- Runtime "openclaw" is not available for meta/muse-spark-1.3: sign-in needed. Connect its provider account, or choose another model.
  row unchanged
Keep: Meta API route given a credential (placeholder, never called), same switch
  -> accepted, {"providerOverride":"meta","modelOverride":"muse-spark-1.3","agentRuntimeOverride":"openclaw"}

On the previous build (65f0484), both rejects were accepted with the pin kept. That's the gap fixed above. Full trace: TRACES-20261123.md.

Completed Muse reply on upgraded real data. In that copy, a fresh session on meta/muse-spark-1.3 (runtime muse) replied OK — Muse Code powered by Meta Muse Spark. Native-runtime consent was granted for the test copy.

Upgrade traces (TRACES-20261123.md):

  • Real data, 2026.10.10 → Nov 21 head → this merged head. All 163 stored session rows are unchanged, including 61 account pins, 50 model overrides and the stored codex runtime pin. v2026.11.6 refuses this data (state schema 39 is newer than its 36).
  • Literal v2026.11.6 → this head. v2026.11.6 created a fresh state and seeded it with model overrides, thinking levels, fast mode, a user account pin and a stored openclaw runtime pin. This head migrated it (state schema 36 → 41). All 5 sessions are field-identical, and the pin is still read as stored (source: session-key).

Regression found live, fixed in a2403ff6771. After a Muse model was selected (Runtime set to muse), a plain /model deepseek/deepseek-flash was rejected with Runtime "muse" is not available for deepseek/deepseek-flash. resolveCompatibleAgentRuntimeForProvider treats any registered harness as compatible with any provider, so the stored muse pin reached runtime choice, and this PR made it strict. A stored runtime is now pinned only when it can serve the selected model: openclaw, the discovered CLI runtime, or a native catalog row for this exact model. Any other stored runtime stays a preference, which matches the documented rule that an incompatible pin is cleared. New test "does not let a stored native runtime that cannot serve the selected model block a model-only switch": red before the fix (rejected), green after.

Before the fix After the fix: Muse selected After the fix: plain switch back

🤖 Generated with Claude Code

@clawsweeper

clawsweeper Bot commented Oct 22, 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 agents Agent runtime and tooling size: S labels Oct 22, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Validate stored runtime pins during model re-selection while preserving compatible choices and worker-owned authentication.

Example: A session pinned to openclaw selects meta/muse-spark-1.3 while Muse is signed in and the Meta API route has no credential.

  • Before: Selection reports success and retains an unusable openclaw runtime.
  • After: Selection explains that the pinned runtime needs sign-in and preserves the previous model and session pin.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused repair with inspected production-entry-point proof and no blocking findings; required product CI remains unsatisfied.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Inspected terminal traces from isolated Gateways on the combined build exercise both sessions.patch and chat.send: unavailable openclaw pins reject without changing the row, and a locally available API credential preserves the pin. Inspected Telegram screenshots show Muse selection and the repaired switch back to DeepSeek. Upgrade traces preserve existing session fields, closing the previous review's named proof gap.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Model re-selection can report success while retaining a runtime that cannot serve the selected model.
Reason: Rejecting an unavailable compatible pin with recovery guidance restores meaningful selection validation while respecting documented runtime ownership.

Merge readiness

✅ Ready for maintainer review

This PR contains useful runtime-selection repairs still absent from current main; no blocking code defect was found, and the new live traces resolve the previous proof request.

Priority: P2
Reviewed head: 04093a8390fba0a785234cd87d8506d429b1d54b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Chat commands, model pickers, and Gateway session mutations pass model requests and stored session preferences into shared runtime preparation, which returns a validated runtime or an actionable rejection before persistence.

flowchart TD
  A[Chat command or model picker] --> C[Shared runtime preparation]
  B[Gateway session mutation] --> C
  D[Stored pin and configured routing] --> C
  C --> E[Prepared catalog and account availability]
  E --> F[Validated runtime or rejection]
  F --> G[Session selection commit]
Loading

Technical review

Best possible solution:

Retain the focused repair in the existing runtime-selection owners and complete the required CI gate before landing.

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

Current-main source shows how an openclaw session override bypasses runtime preparation for API-first or config-declared native models; the contributor supplies matching before/after Gateway traces, which were inspected without executing target code.

Is this the best way to solve the issue?

The patch uses the existing availability owner to distinguish a strict stored pin from a soft preference, preserves required-worker authentication, and introduces no competing state or selection service.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Native runtime discovery and API-first catalog selection keeps the original intent (8cd38b0: Connect installed native agents to model selection while preserving runtime ownership and prepared availability.)
  • Unavailable stored-preference fallback changes intended behavior with a stated reason (f8b06fb: Reuse prepared runtime choices for fast saved-session model selection; the PR explains why stored pins must reject rather than fall through.)
  • Worker-local provider authentication keeps the original intent (a3e037b: Required worker inference validates provider access on the worker instead of requiring Gateway credentials.)
  • Compatible versus incompatible inherited pins keeps the original intent (13d421c: Allow model-only switches to clear incompatible inherited pins while retaining compatible selections and rejecting explicit incompatible requests.)
  • Account-specific runtime rejection guidance keeps the original intent (ed4e216: Explain missing or failed sign-in instead of suggesting an ineffective catalog refresh.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 9a19582 adds src/agents/model-runtime-choice.ts:388 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9a19582e9255; files: src/agents/model-runtime-choice.ts)
  • Peter Steinberger: Raw commit a3e037b adds src/auto-reply/reply/model-runtime-normalization.ts:183 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a3e037bedb72; files: src/auto-reply/reply/model-runtime-normalization.ts)
  • Vincent Koc: Raw commit ed4e216 adds src/agents/model-runtime-choice.ts:352 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ed4e2160559a; files: src/agents/model-runtime-choice.ts)

PR surface

Source +63, Tests +349. Total +412 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 92 29 +63
Tests 1 349 0 +349
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 441 29 +412

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.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +92/-29 lines; tests +349/-0 lines Growth stays within existing owners and covers strict pins, API-first and configured native routes, legacy stored values, cross-provider switching, and worker authentication without new persistent state.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is terminal.

Label justifications:

  • P2: This repairs bounded model re-selection failures and misleading success responses while preserving explicit runtime choices.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rank-up moves

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

  • Complete the required product CI checks on the reviewed head.

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 (5 earlier review cycles)
  • reviewed 2026-10-22T17:47:17.846Z sha d635a15238889e72a76aab8bdce7d72a0d6aeeef :: needs real behavior proof before merge. :: [P1] Preserve worker-owned authentication for retained runtime pins
  • reviewed 2026-10-23T13:06:05.334Z sha e9064ea :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-23T13:54:01.033Z sha 1e2a8b9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-29T16:04:33.011Z sha 8a46c50 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-20T16:11:43.213Z sha a2403ff :: needs real behavior proof before merge. :: none

Reviewed November 23, 2026, 5:43 AM ET / 10:43 UTC (Revision 6).

@ivankuznetsov
ivankuznetsov force-pushed the fix/signed-in-native-runtime branch from d635a15 to f344c1a Compare October 23, 2026 10:04
@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 23, 2026
Model re-selection prepared no runtime choice when a session carried a
stored runtime override and the selected catalog row was the API route,
so a runtime pinned before sign-in (for example openclaw while
unauthenticated) kept winning even after a native/CLI sign-in completed.

Always discover a claiming CLI/native runtime, and treat a native
variant of the selected model as requiring runtime-choice preparation.
On re-selection the existing availability-filtered runtime choices
apply: a stored preference that is still available always wins; one
that no longer evaluates available (missing credential, expired
sign-in, or cooldown) falls through to the first available choice.
This is a deliberate re-selection repair, not a per-turn switch: plain
turns without re-selection are untouched.

Required worker inference keeps ownership of runtime selection when no
explicit non-openclaw runtime was requested, so worker-local
credentials are never validated against the gateway.
@ivankuznetsov
ivankuznetsov force-pushed the fix/signed-in-native-runtime branch from f344c1a to e9064ea Compare October 23, 2026 12:56
@ivankuznetsov

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updates since the last review:

  • P1 fixed: without an explicit non-openclaw runtime request, a required inference="worker" profile keeps ownership of runtime selection (pinned or unpinned), so re-selection never validates worker-local credentials on the gateway. New retained-pin and unpinned re-selection tests use an empty gateway auth store and assert the exact { kind: "unchanged" } result.
  • Commit message rewritten to state the actual semantics: on re-selection, availability-filtered runtime choices apply (a stored preference that is still available always wins; one that no longer evaluates available — missing credential, expired sign-in, or cooldown — falls through). Plain turns without re-selection are untouched.
  • This PR stays draft pending the owner decision on deliberate-pin preservation.

@clawsweeper

clawsweeper Bot commented Oct 23, 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 23, 2026
@clawsweeper clawsweeper Bot removed the clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. label Oct 23, 2026
…e-runtime

# Conflicts:
#	src/agents/model-runtime-choice.native.test.ts
Re-selection passed any stored agentRuntimeOverride as a hard pin. Session
rows that hold the "no preference" values "auto" or "default" (any casing)
became a pin on a runtime id that is never a choice, so re-selecting the
model was rejected instead of resolving a runtime. Only pin real runtime
ids; default ids keep their stored meaning.

Adds a stored-row compatibility test covering absent, "auto", "default",
unnormalized " Auto ", legacy "pi", and "OpenClaw" overrides.
@ivankuznetsov

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Changes on head 8a46c50e100:

  • Merge conflict / current main. Merged main (fc64180eda0). The only conflict was the native test file, and both sides were kept.
  • Data-model compatibility proof. Added a stored-row test that re-selects through prepareModelSelectionRuntime with session rows shaped like those earlier releases persisted. agentRuntimeOverride is absent, auto, default, " Auto ", legacy pi, or OpenClaw. It found a real regression in the previous head: stored auto/default rows became a hard pin on a runtime id that is never a choice, so re-selection was rejected. Fixed in 8a46c50e100: only real runtime ids are pinned, and default ids keep their "no preference" meaning. The previous head fails 3/6; this head passes 6/6. No schema, config, or migration changes; stored rows are not rewritten.
  • Red on base. This branch's tests against main's two source files give 8 failed and 21 passed. Both pin tests and all 6 stored-row cases fail with assertion errors, because main returns ready with the runtime unchanged. This head passes 29/29.
  • Real behavior proof / upgrade from v2026.10.6. Still pending from the author; the PR body lists exactly what will be captured.

Focused suites: 5 files, 170 tests, all passing. tsgo core and the agents test project are clean, as are oxlint and oxfmt on touched files.

@clawsweeper

clawsweeper Bot commented Oct 29, 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-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 29, 2026
ivankuznetsov and others added 2 commits November 20, 2026 13:05
…del-only switch

A chat pinned to a native runtime (Muse for meta/*) rejected a plain
`/model deepseek/deepseek-flash` with `Runtime "muse" is not available`.
Session runtime compatibility accepts any registered harness for any
provider, so the stored muse pin reached runtime choice as a strict pin.

Pin a stored runtime only when it can serve the selected model: openclaw,
the discovered CLI runtime, or a native catalog row for this exact model.
Any other stored runtime stays a preference, so the documented "an
incompatible pin is cleared" behavior holds. Unavailable pins that can
serve the model are still rejected instead of silently switching.

Found during live Telegram proof on the combined build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ivankuznetsov

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Changes on head a2403ff6771:

  • Current main. 8479dacd2e1 merged cleanly.
  • Live proof added (the PR body's Live proof section has redacted Telegram captures from a real Gateway). It covers an explicit Muse runtime selection, a turn reaching Meta through Muse, and an in-place upgrade of a real operator state: 158 sessions, with no model, runtime, account or thinking-level changes.
  • Regression found live and fixed. After a Muse model was selected, a plain /model deepseek/deepseek-flash was rejected (Runtime "muse" is not available). That happened because session runtime compatibility accepts any registered harness, and this PR made the stored pin strict. A stored runtime is now pinned only when it can serve the selected model. New test: red before the fix, green after. Six focused files, 208 tests, pass; tsgo:core and tsgo:core:test are clean.
  • Gaps, stated in the body: the signed-out and signed-in openclaw pin scenarios don't exist in this operator's data and stay covered by the red-on-base tests. A completed Muse reply waits for the subscription quota reset (2026-11-23).

@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Nov 20, 2026
…ured runtime

Live proof on an upgraded copy of real state (Muse signed in, Meta's API route
signed out) showed a session storing an `openclaw` pin switch to
meta/muse-spark-1.3 through both typed /model and sessions.patch with
"Model set to meta/muse-spark-1.3": the pin stayed, so the chat was left on a
runtime that cannot serve the model.

Muse models get their runtime from config
(`agents.defaults.models["meta/muse-spark-1.3"].agentRuntime = { id: "muse" }`),
not from a catalog row with nativeRuntime. Runtime-choice preparation only ran
for native catalog rows, CLI runtimes, or a non-openclaw effective runtime,
and the stored `openclaw` override made the effective runtime `openclaw`. So
the configured `muse` policy was shadowed and the pin was never validated.

A model or provider runtime configured to something other than openclaw now
also sends selection through runtime-choice preparation, which validates the
stored pin and rejects it with sign-in guidance instead of keeping it.
Unpinned sessions are unchanged: their effective runtime already is the
configured one.

Regression "validates a stored openclaw preference against the runtime the
model's config declares" (config-declared runtime, no nativeRuntime anywhere):
before, status "ready"; after, "rejected". The native-harness registry setup
the tests repeated becomes one local helper, keeping the file under the line
limit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ivankuznetsov

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Nov 23, 2026

This branch has not been deployed

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

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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