Skip to content

fix(meta): Muse subscription sign-in cannot be finished from chat and turns are rejected after sign-in - #180831

Open
ivankuznetsov wants to merge 9 commits into
openclaw:mainfrom
ivankuznetsov:fix/muse-chat-setup
Open

ivankuznetsov wants to merge 9 commits into
openclaw:mainfrom
ivankuznetsov:fix/muse-chat-setup

Conversation

@ivankuznetsov

@ivankuznetsov ivankuznetsov commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: /login meta in chat can never start the Muse device-code subscription sign-in (it always hands off to Control UI guided setup), and even after a successful sign-in every turn on meta/muse-spark-1.3 fails — first with missing-auth errors on the wrong runtime, then with Requested agent harness "muse" does not support meta/muse-spark-1.3.

User Impact

User impact: users can add and authorize Meta Muse models end-to-end in Telegram (device-code in the browser, no API key or secret handling in chat), and signed-in models actually run. Control UI guided setup behavior is unchanged. Security boundaries are preserved: nothing starts in chat without the plugin's explicit channelLogin opt-in (the same mechanism GitHub Copilot, xAI, MiniMax, and Codex device-code already use), API-key entry still hands off to secure setup, and no credentials pass through chat.

Why This Change Was Made

Four stacked gaps, each fixed at its layer:

  1. The muse-code choice never declared channelLogin, so chat could not start it.
  2. projectChannelChoice only computed a login kind for credentialOnly choices; harness-owned sign-ins (no credential profile saved — the credential lives in the Muse CLI) always projected to setup-only even with an explicit chat opt-in.
  3. Credential-only login persistence dropped the auth result's declared agentRuntimeId, so the model kept resolving to the default API runtime. It now stages the same per-agent model runtime policy guided setup writes (prepareSetupModelRuntime), scoped to the signing-in agent and the login's own default model, ignored for the default openclaw runtime. The persistence owner (runProviderAuthMethod) reports the staging outcome (stagedRuntimePolicy) itself, so chat completion and model-access consent do not reconstruct it from result metadata that the credential-only path drops. Runtime-plugin repair after the write receives the login's agent and authority: before each package, marker, or install-record effect, it reruns the caller's beforePersistentEffect and assertCurrent.
  4. Prepared native routes carry a blank baseUrl, which masked the configured official Meta endpoint in harness support facts while endpointOverrides was derived from that same config — the Muse harness therefore rejected every turn. Blank prepared baseUrls now fall back to the configured endpoint (live diagnostic before the fix: rt=muse provider=meta transport=none endpoint=present baseUrl= api=openai-responses).

Evidence

Resolved head 6892508c688 (2026-11-23). af7f1a5026c merges current main (38f4f8fe018). Its one conflict was the manifest field table in docs/plugins/manifest/setup-and-auth.md. It keeps main's new choiceLabel and appGuidedActionLabel wording and this PR's credentialOnly and channelLogin rows. 6892508c688 folds one test callback onto a single line, so auth.test.ts stays under its 1016-line cap after main's edits to that file. Checks on this head: the five test files this PR touches (bot-native-command-login, commands-login, auth.test.ts, provider-login-options, harness/selection) all pass, 190 tests. tsgo:core and tsgo:extensions pass, and oxlint, oxfmt and git diff --check are clean on the changed files.

Previous head a65800e4a42, which merges current main (8ab24647379, version 2026.11.6). There were two conflicts:

  • auth.ts: upstream dropped an OpenAI tip and reformatted the call. Kept upstream's call and this PR's stagedRuntimePolicy.
  • provider-auth-login-flow-runtime.ts: upstream removed parseModelsAuthLoginFlowResult and now returns the typed result directly. Removed it here too; stagedRuntimePolicy flows through the typed ModelsAuthLoginFlowResult.

[P3] Profileless harness sign-in in Telegram's native adapter (45d76dd0ef1). A Muse sign-in saves no credential profile, so there is no account switch that can fail. The adapter now applies the same rule as the chat /login handler:

  • A profileless result reports completion.
  • A result that saved nothing (no profile and no staged runtime) hands off to Control UI setup.

Tests "reports a harness-owned sign-in that saves no credential profile as complete" and "hands a profileless sign-in that saved nothing usable to setup" fail on the previous head and pass on this one. Live check: (C4) below.

Tests on this head: the Telegram bot-native-command-login, commands-login and provider-auth-login-flow-runtime suites, 46 tests, all passing. With #202564 and #180830 combined: 131 tests, all passing. tsgo core and extensions are clean.

[P2] Keep the provider's agent model settings when staging its runtime (de2e57b6a04). auth-runtime-staging.ts merges the staged agentRuntime into the provider's own model entry instead of replacing the agent entry. Regression "keeps the provider's own agent model settings when the CLI path stages its runtime": before the fix only agentRuntime survived; after it, the alias and params are kept.

[medium] Chat-owner authority through final effects. Upstream already proves both halves with real effects: the doctor repair stops before the npm install, the marker and the install record when the hook refuses, and the ids-based repair fences real index writes on revocation. This PR's test shows the login passes its hook into that repair. A single unit test from login through a real npm install would need a registry-served @openclaw/muse package. Live owner revocation is shown below (C3).

Earlier fixes, still on this head:

ClawSweeper findings fixed on this head (src/commands/models/auth.test.ts):

  • [P2] Return the persisted runtime-staging outcome to chat. runProviderAuthMethod now returns stagedRuntimePolicy once the staged policy is persisted (or already present). runModelsAuthLoginFlow passes it through instead of re-deriving it from result.agentRuntimeId, which credential-only results drop. Regression "reports the persisted runtime staging to chat for credential-only harness sign-ins": without the fix, expected undefined to be true; with the fix it passes. (Red runs used this head's tests with only the fix reverted, before the module extraction, which is behavior-preserving.) The cross-provider test now also asserts that nothing is reported staged.
  • [P1]/[high] Carry login authority into runtime-plugin repair. repairModelSelectionRuntimePlugins accepts beforePersistentEffect, and its internal repair chain already forwards that hook to its dependency-marker, payload-retirement, and install-record effects. The login passes a hook that reruns its own beforePersistentEffect and assertCurrent, plus the login's agentId, so the agent-scoped staged policy is the one the repair evaluates. Regression "rechecks login authority before runtime-plugin repair effects" revokes authority while repair is pending. Without the fix, the login resolves and the repair effect runs; with the fix, the login rejects with "Login authority ended." and no effect runs.

Data-model compatibility. New test "keeps an existing stored config intact and valid when a chat harness sign-in stages its runtime". It starts from a config shaped like those earlier releases persisted: an authored agents.entries.main with workspace and per-model alias/params, an agents.defaults.model.primary, and an unrelated enabled plugin. The test checks that config validates, runs a chat (credential-only) harness sign-in, then asserts:

  • every pre-existing value is unchanged;
  • only agentRuntime is added to the signed-in model's existing entry;
  • the unrelated plugin entry is untouched;
  • the result still passes validateConfigObject.

No schema or migration changes. Session rows and auth-profile stores are not touched by this PR. The test passes both before and after the finding fixes; it proves preservation and is not a regression for a bug.

Focused suites (node scripts/test-projects.mts <files> --maxWorkers=1), all passing. After the merge: 6 files, 209 tests. On this head auth.test.ts is 48/48. The combined proof branch ran all three PRs' focused suites: 21 files, 598 tests, 0 failed.

  • src/commands/models/auth.test.ts
  • src/auto-reply/reply/commands-login.test.ts
  • src/plugins/provider-login-options.test.ts
  • src/agents/harness/selection.test.ts
  • src/plugin-sdk/provider-auth-login-flow-runtime.test.ts
  • src/commands/promos/claim.test.ts (the other repairModelSelectionRuntimePlugins caller)

tsgo core and the commands test project are clean. oxlint, oxfmt, and the pre-commit line-cap ratchet pass. To stay within the line caps, the PR's runtime-staging computation moved unchanged from auth.ts into src/commands/models/auth-runtime-staging.ts, and its tests moved into auth-runtime-staging.test-support.ts, which auth.test.ts registers.

Live verification on a real Telegram + gateway install, before/after on the same account:

  • Before: /login meta answered "Meta API key needs provider setup. Open Control UI…". After an out-of-band sign-in, turns failed with missing-auth on the API route, then with Requested agent harness "muse" does not support meta/muse-spark-1.3.
  • After (earlier head, author's install): Muse Spark and Muse Wonder Full turns succeed with the session reporting the Muse runtime.

Live proof

Real Telegram private chat with a live Gateway on 2026-11-20. The Gateway ran upstream main 8479dacd2e1 merged with #180828, #180830 and #180831 (combined build 28efb83; the three PRs were merged together because the author runs them together). Telegram IDs and device codes are redacted. Screenshots are hosted at ivankuznetsov/openclaw@224a663.

C1: owner sign-in from a private chat. Selecting a Muse model that isn't signed in offers Sign in (#180828). The device code appears in chat, and after approval the chat says Meta login complete. /model meta/muse-spark-1.3 then replies Runtime set to muse, and a turn reaches Meta through the Muse runtime. Meta answered 429 … Subscription quota exhausted, which shows the signed-in account works. A completed reply is in C5. No consent prompt appears, because upstream #190019 now allowlists the provider's models at sign-in.

Device code in chat Login complete Model available, runtime muse Turn reaches Meta

Finding outside this PR: after Meta login complete, the models still showed Sign-in needed (). The config had a credential-less models.providers.meta API route, and model-catalog-view.ts returns the host evaluation whenever a provider has an authored host binding, so Muse readiness is never consulted. With that entry removed, the models are available immediately (). Tracked in #201818..

C3: owner revoked while a sign-in is pending. The owner sent /login meta, then commands.ownerAllowFrom was replaced with a different owner while the code was pending, and the code was then approved. Results:

  • The sign-in did not complete.
  • The only config path changed is the commands.ownerAllowFrom edit made by the tester.
  • All 191 plugin records are identical before and after.
  • The Muse credential file was not rewritten.

One caveat: the config reload restarted the Telegram channel, which ended the pending chat sign-in silently, before the authority recheck ran. The user got no message that the sign-in was cancelled. That is worth a follow-up, but no effect occurs either way.

C4: Muse re-login no longer says "kept its previous account" (2026-11-21). Two /login meta runs on the live build ended Meta login complete. After #202564's follow-up, a chat on another model now reads This chat still uses ….

C5: Sign-in and a completed Muse reply on upgraded real data (2026-11-23). The copy of the operator's state was written by a 2026.10.10 main build and upgraded twice, to this head (combined build e8ec8a4, 2026.11.6). It ran in an isolated Gateway with the live state read-only.

  1. The Meta device sign-in completed and the credential was saved.
  2. On the unfixed config, the first attempt reproduced Muse models stay "Sign-in needed" after a successful sign-in when models.providers.meta has no API key #201818: Requested agent harness "muse" does not support meta/muse-spark-1.3.
  3. After removing the key-less models.providers.meta host route (the Muse models stay "Sign-in needed" after a successful sign-in when models.providers.meta has no API key #201818 fix), both Muse models were available.
  4. 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. Trace.

Upgrade traces (TRACES-20261123.md):

  • Real data, 2026.10.10 → Nov 21 head → this merged head. All 163 stored session rows are unchanged: model overrides, account pins, thinking levels, harness ids and the 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 and seeded a fresh state. This head migrated it (state schema 36 → 41), and all 5 sessions are field-identical.
  • The live Gateway was upgraded in place to this build. The migration chain completed and integrity checks passed.

Not covered live: C2, a non-owner /login meta, because no second Telegram account was available. It stays covered by the commands-login tests.

Needs a maintainer decision (ClawSweeper "Decision needed"): should explicitly opted-in (channelLogin) profileless native sign-ins run from private chat and persist agent-scoped runtime routing without guided setup activation? This PR keeps runtime installation, native-permission consent, and current-authority checks in place for that path.

🤖 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 docs Improvements or additions to documentation commands Command implementations agents Agent runtime and tooling extensions: meta Extension: meta size: M 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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: ready, awaiting a maintainer decision.

What this changes

This PR enables Muse device-code sign-in from private chat, persists agent-scoped runtime routing, and fixes blank endpoint facts that reject Muse turns.

Example: An owner sends /login meta in a Telegram private chat, then selects meta/muse-spark-1.3.

  • Before: Chat hands sign-in off to guided setup, and native turns can be rejected despite successful authentication.
  • After: Chat displays the device code, reports completion, and routes the model through Muse with the configured official endpoint.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong live evidence and no outstanding correctness finding; overall readiness remains capped by the unresolved product contract decision, with required product CI still outstanding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Telegram captures show Muse device-code sign-in and corrected completion; the linked live Gateway trace records a completed Muse reply on upgraded copied state. Proof used combined branches and disclosed the separate host-route workaround, so it does not establish that adjacent readiness issue is fixed. Existing agents.entries model settings remain compatible through the unchanged config writer, preservation coverage, and supplied upgrade traces.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Muse subscribers cannot finish sign-in from chat, and signed-in models can fail runtime selection instead of answering.
Reason: The routing and endpoint repairs have demonstrated value, but profileless chat sign-in changes the setup boundary deliberately established in #171526.

Merge readiness

⏳ Ready, awaiting maintainer decision

Keep this PR open: it addresses real Muse routing failures, the previous findings are resolved, and no new correctness defect was found; the expanded chat-login contract still needs its feature owner's decision.

Priority: P1
Reviewed head: 6892508c68847138e9bd1be80816bd8224a202fc
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should an explicit channelLogin declaration permit profileless native sign-in to persist agent-scoped runtime routing without guided setup activation?
  • Recommendation: Approve the scoped chat path: Accept explicit plugin opt-in, provider-scoped staging, existing private-chat admission, and unchanged native execution consent.
  • Why: The existing owner introduced the credential-only chat restriction alongside Muse setup activation; this PR deliberately broadens that documented contract, and no owner approval of the broader path is recorded.

Before merge

None.

Findings

None.

Agent review details

How this fits together

Provider metadata selects the login flow; shared authentication persists its routing result, and harness selection uses endpoint facts to admit subsequent model turns.

flowchart LR
  A[Private chat login] --> B[Provider choice metadata]
  B --> C[Meta device authorization]
  C --> D[Shared auth persistence]
  D --> E[Agent runtime policy]
  E --> F[Harness support decision]
  F --> G[Muse model turn]
Loading

Technical review

Best possible solution:

Obtain the provider-auth owner's decision on scoped native chat sign-in, then land the supported routing and endpoint repair once required CI passes.

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

Current-main source establishes the setup-only chat projection and blank-endpoint rejection path; the contributor supplies before/after observations, but this read-only review ran no target code.

Is this the best way to solve the issue?

The patch repairs the existing projection, persistence, completion, and support owners without adding a separate runtime manager; enabling profileless chat activation is an explicit product extension rather than an established credential-only contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6587c9fd2125.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned introduction and current-main comparison: The introduced diff contains the chat opt-in, runtime staging, completion handling, and endpoint fixes; comparison with fetched main shows those production paths still retain the base behavior. (src/plugins/provider-login-options.ts:158, 6587c9fd2125)
  • Original product boundary: feat(muse): sign in to Muse Code from Model Setup #171526 deliberately put profileless Muse authentication through setup activation, including runtime installation and verification; this PR explains why it adds a separate explicitly opted-in chat path, but no feature-owner approval of that direction is recorded. (src/plugins/provider-login-options.ts:158, 525a7cd755d3)
  • Scoped persistence and resolved findings: Staging is restricted to the login provider's default model, preserves existing model settings through the config writer, and reports its outcome to both chat adapters; runtime repair receives the agent and existing effect hook. (src/commands/models/auth-runtime-staging.ts:30, 6892508c6884)
  • Endpoint failure mechanism: A blank prepared baseUrl masks the configured official Meta endpoint while endpointOverrides remains present; the Muse harness rejects that combination, and the patch restores the configured endpoint in both shared fact producers. (src/agents/harness/support.ts:180, 6892508c6884)
  • Inspected Telegram proof: The contributor's linked C1 captures show the device code and Muse runtime selection; the later M1 capture directly shows two successful /login meta completions without the erroneous previous-account warning. (pr-180831/M1-meta-login-complete-no-kept-account.png, 3f750da88cc5)
  • Completed turn and upgrade evidence: The linked trace records a completed Muse Spark reply on upgraded copied state, preservation of 163 existing session rows, and a literal v2026.11.6 upgrade preserving five seeded sessions; it explicitly discloses removal of the separate keyless-host-route problem. (shared/TRACES-20261123.md, 3f750da88cc5)

Likely related people:

  • Ayaan Zaidi: Raw commit 525a7cd adds extensions/meta/openclaw.plugin.json:296 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 525a7cd755d3; files: extensions/meta/openclaw.plugin.json)
  • Peter Steinberger: Raw commit 625f3cf adds src/agents/harness/availability.ts:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 625f3cf7ea69; files: src/agents/harness/availability.ts)

PR surface

Source +210, Tests +359, Docs +8, Other +7. Total +584 across 18 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 10 257 47 +210
Tests 6 364 5 +359
Docs 1 42 34 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 1 7 0 +7
Total 18 670 86 +584

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
Login result contract 1 optional result field: stagedRuntimePolicy Both chat adapters consume the persistence owner's success signal for profileless sign-ins.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove status: ⏳ waiting on author: Current PR status label is status: ⏳ waiting on maintainer.

Label justifications:

  • P1: The demonstrated failure blocks an existing subscription authentication and model-turn workflow.
  • merge-risk: 🚨 compatibility: The PR broadens public channelLogin semantics and allows login to persist native runtime routing outside guided setup.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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:00.698Z sha a604582fefe0b4705446a75a33d608019e7deebe :: needs real behavior proof before merge. :: [P2] Offer model access after successful profileless login | [P3] Treat profileless login as a valid completion outcome
  • reviewed 2026-10-23T13:06:16.296Z sha 8ca4dff :: needs real behavior proof before merge. :: [P2] Return the persisted runtime-staging outcome to chat | [P1] Carry login authority into runtime-plugin repair
  • reviewed 2026-10-29T16:58:45.612Z sha 9366401 :: needs real behavior proof before merge. :: [P2] Preserve the provider’s agent patch when staging its runtime
  • reviewed 2026-11-20T16:13:43.525Z sha de2e57b :: needs real behavior proof before merge. :: [P3] Handle profileless success in Telegram's native login adapter
  • reviewed 2026-11-23T10:45:24.124Z sha a65800e :: blocked before merge. :: none

Reviewed November 23, 2026, 9:27 AM ET / 14:27 UTC (Revision 6).

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Oct 23, 2026
The Muse subscription sign-in could only be activated through Control
UI guided setup: the muse-code choice was not opted into chat, the
channel projection treated every non-credential-only login as
setup-only, and credential-only login persistence dropped the result's
declared agentRuntimeId, so a completed sign-in kept resolving to the
default API runtime. Opt muse-code into channel login, honor explicit
channelLogin declarations for harness-owned sign-ins, stage the
declared runtime as per-agent model policy like guided setup does, and
stop blank prepared native baseUrls from masking the configured
endpoint in harness support facts (which made the Muse harness reject
every turn).
@ivankuznetsov

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updates since the last review:

  • P2 fixed: model-access consent now also runs after a successful profileless harness sign-in (the staged runtime policy is the success signal), so restricted model lists can reveal the newly connected provider through the existing consent flow. Covered by a new consent test.
  • P3 fixed: profileless completion no longer claims a failed account switch; a profileless result that staged no runtime now fails in chat with a setup handoff instead of reporting success.
  • Hardening: staged config patches are narrowed to the signing-in provider's catalog slice, staged agent entries deep-merge with the login's own patch, and defaultModel passes through only for staged results. A CLI (non-credential-only) staging test covers the merge branch.
  • Evidence: live traces (redacted) from the author's install are in the evidence package — Muse Spark and Muse Wonder Full turns succeed on the installed 2026.10.6 build against preserved 2026.9.6 state; Telegram screenshots from the author to follow.

@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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 23, 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. 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:17
Conflicts: src/commands/models/auth.ts, auth.test.ts and
src/plugin-sdk/provider-auth-login-flow-runtime.ts. Upstream openclaw#190019
replaced the post-login model-access consent with allowLoginProviderModels;
a harness sign-in that stages its runtime policy now takes that path too, and
the login result carries both modelAccess and stagedRuntimePolicy. The
consent regression is ported to assert the provider wildcard instead.
Upstream folded auth-authority.test-support into auth.test.ts, so that
import is dropped; auth.test.ts gets a max-lines override for the staging
tests that share its fixture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…runtime

On a non-credential-only login, spreading the staged runtime patch over the
provider's agents.entries replaced the whole agent entry, so a provider's own
model settings (alias, params, sibling models) never reached persistence.
Staging now merges the runtime into the provider's model entry instead.

Regression "keeps the provider's own agent model settings when the CLI path
stages its runtime": fails before (only agentRuntime survives), passes after.

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

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Changes on head de2e57b6a04:

  • Current main. 8479dacd2e1 merged (conflicts resolved against upstream fix(models): saving provider credentials shows that provider's models #190019's allowLoginProviderModels).
  • [P2] fixed. Runtime staging now merges agentRuntime into the provider's own model entry, so the provider's alias and params survive. New regression test: red before the fix, green after.
  • Live proof added (the PR body's Live proof section has redacted Telegram captures).
    • C1: owner /login meta in a private chat → device code in chat → Meta login complete → Runtime set to muse → a turn reaches Meta. Meta answered 429 (quota), not 401.
    • C3: owner revoked while the code was pending, then the code was approved. No sign-in, no config change beyond the tester's owner edit, plugin records identical, no credential write.
  • Gaps, stated in the body: C2 (non-owner) had no second account available. A completed Muse reply waits for the quota reset on 2026-11-23. One caveat on C3: the owner-config reload restarted the Telegram channel, which ended the pending sign-in before the authority recheck ran, and the user got no "sign-in cancelled" message.

@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Nov 20, 2026
ivankuznetsov and others added 2 commits November 20, 2026 16:58
Telegram's native /login treated every result without a credential profile
as a failed account switch, so a successful Muse sign-in said "This chat
kept its previous account". Harness-owned sign-ins save no profile and
stage runtime routing instead; there is no account switch to fail.

Match the chat /login handler: only a profiled result without a matching
profile is a failed switch, and a profileless result that staged nothing
hands off to setup instead of reporting success.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	src/commands/models/auth.ts
#	src/plugin-sdk/provider-auth-login-flow-runtime.ts
@openclaw-barnacle openclaw-barnacle Bot added the channel: telegram Channel integration: telegram label Nov 23, 2026
@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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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
@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: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 channel: telegram Channel integration: telegram commands Command implementations docs Improvements or additions to documentation extensions: meta Extension: meta merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant