Repository navigation
fix(automations): allow explicit native CLI account adoption - #190904
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
vincentkoc
marked this pull request as ready for review
November 2, 2026 06:03
Contributor
|
Member
Author
|
Merged via squash.
|
This was referenced Nov 2, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 3, 2026
…w#190904) * fix(automations): allow explicit native CLI account adoption * fix(automations): preserve native account through run preparation * test(automations): complete pinned session fixture * test(automations): use concrete session fixture types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #190902
What Problem This Solves
Fixes automation edits rejecting an explicitly selected native Claude CLI login when the job already records a stored inference account.
User Impact
An authorized operator can select
anthropic/<model>@anthropic:claude-cliin place, preserving the automation ID, history, owner and tool cap. Ordinary model/default changes keep the stored account. Incompatible recorded or carried runtimes still reject the change.The CLI remains responsible for its own login. This does not forward stored credentials, change defaults, or preserve requester grants invalidated by an operator model edit.
Why This Change Was Made
The shared CLI selector collapsed recognized native login and missing account into the same empty result. Preserve that distinction at selection, validate the runtime the job will actually use after clearing its binding, and carry an explicit private clear through the existing Gateway and SQLite mutation flow. Declarative re-registration cannot clear an existing account.
Scheduled-run preparation also sent native login IDs through stored-account validation. Preserve recognized native choices using the prepared runtime's canonical CLI policy, then let CLI dispatch consume them. Ordinary stored-account resolution, including session-pin precedence, remains with its existing owner.
Also clarify that an explicit automation model takes precedence over a carried session preference without deleting that preference.
Evidence
cron.add/cron.update, SQLite close/reopen, run history, the account-scoped tool ceiling, and the original stored credential remaining usable.git diff --checkpass. Focused Testbox capacity queued and was stopped before tests ran; local dependencies were not qualified.4e475d7f3d8completed 40 successful jobs. The new native scheduled-run test failed and blocked the gate, exposing the preparation gap above, repaired in202175a2cf2.202175a2cf2completed 40 successful jobs. The scheduled-agent group passed 87 tests in eight files (113.32 seconds), including native-only execution and stored session-pin precedence. Test typing failed because the new fixture used an incomplete, loosely typed harness helper. Adding its missing fields in7b120ff7015exposed the helper'sskillsSnapshot: unknowntype;857a59afef7replaces both loose helpers with concrete session fixtures. Production code and assertions are unchanged. Scoped autoreview is clean.857a59afef7completed successfully: 44 successful jobs, 27 skipped, zero failed. The scheduled-agent job passed 87 tests in eight files (117.42 seconds), including native-only adoption (907 ms) and stored session-pin precedence (441 ms). The corrected core test-type job passed too. Native landing retains the separate OpenGrep scan and other required checks.953e7a8403981c5b4f210eb8e89db885146695b6) found no additional working-tree defects. Its sole INDEX-only finding was the unstaged correction; the exact reviewed files were then staged and committed.Live authentication and channel delivery are not claimed by this PR.
Follow-up audit: explicit non-native profile selection on the empty-auth-store fast path in
resolveCronAuthSelection. This PR covers native adoption; the separate fast-path case still needs runtime reproduction.