Skip to content

feat(models): add auth cooldown recovery command - #120305

Closed
jsasson wants to merge 1 commit into
openclaw:mainfrom
jsasson:fix/auth-clear-provider-cooldown
Closed

jsasson wants to merge 1 commit into
openclaw:mainfrom
jsasson:fix/auth-clear-provider-cooldown

Conversation

@jsasson

@jsasson jsasson commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add openclaw models auth clear-cooldown <profileId> for explicit recovery after a confirmed provider account reset
  • refresh a running gateway after local auth state changes
  • document the workflow and cover command behavior with focused tests

Why

OpenClaw correctly persists provider cooldowns to avoid repeated failing requests. When an account recovers on the provider side (for example, after a subscription reset), there is no direct operator command to clear that local state without re-authenticating or editing the auth store. This command clears only local cooldown/disable state; it does not change credentials or contact the provider.

Test plan

  • pnpm exec vitest run src/commands/models/auth-clear-cooldown.test.ts src/commands/models/auth-list.test.ts src/commands/models/auth-logout.test.ts
  • pnpm exec oxfmt --check src/cli/models-cli.ts src/commands/models/auth-clear-cooldown.ts src/commands/models/auth-clear-cooldown.test.ts docs/cli/models.md
  • pnpm exec oxlint src/cli/models-cli.ts src/commands/models/auth-clear-cooldown.ts src/commands/models/auth-clear-cooldown.test.ts

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes commands Command implementations size: S triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Aug 7, 2026
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the contribution. This PR has been inactive for a while and still is not in a landable state.

Close as an abandoned draft: the head and checks have been inactive for over 45 days, no maintainer engagement is recorded, and the earlier proof request remains unanswered. The recovery idea is useful, but this branch has unresolved implementation concerns and no demonstrated recovery run.

So I’m closing this as inactive for now. If you pick the work back up, push a rebased branch with green checks and reopen (or open a fresh PR) and it will be reviewed again.

Review details

Best possible solution:

Any renewed manual recovery command should reset the authoritative profile owner, report the durable result, and explicitly acknowledge Gateway convergence.

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

Not applicable to the feature request itself; source inspection establishes the command’s false-success path, but no runtime reproduction was executed.

Is this the best way to solve the issue?

No, not as submitted: reusing the locked owner is appropriate, but a recovery command needs a checked persistence outcome and verified runtime convergence rather than an unconditional success message.

Security review:

Security review cleared: No concrete security or supply-chain regression was found in this local bookkeeping command; it introduces no new authorization boundary or credential format.

AGENTS.md: found and applied where relevant.

What I checked:

  • Verified draft and inactivity: Live GitHub reads confirm an open draft at the pinned head, with no assignees or requested reviewers. The head commit is dated 2026-08-07T17:30:11Z; the latest of all 81 check runs completed at 2026-08-07T17:42:35Z. Commit statuses are empty. This exceeds the 30-day abandoned-draft threshold. (e13a59a36273)
  • Engagement and proof history: Live reviews are empty; both discussion comments are from clawsweeper[bot]. No protected label, assignment, milestone, or requested reviewer is present. The supplied timeline dates the proof label to August 7. The complete supplied body contains test/check commands without an after-fix runtime transcript; the prior completed review identifies the same proof gap at this unchanged head. (e13a59a36273)
  • Pinned introduced change: The merge-base-to-head patch adds the command, its lazy CLI registration, three mocked tests, and documentation. Production growth is 55 lines, justified by the new operator capability; tests add 110 lines. No dependency, workflow, schema, or credential-format change is introduced. (src/commands/models/auth-clear-cooldown.ts:16, e13a59a36273)
  • Persistence concern remains: The new command prints success after a void-returning reset. The reset helper logs and returns when the locked store update fails; the store owner catches transaction errors and returns null. Thus a failed write can still produce the command’s success message. Its tests mock both persistence and refresh, so they do not establish a durable reset. (src/commands/models/auth-clear-cooldown.ts:36, e13a59a36273)
  • Refresh and documentation review continuity: The command passes no selected agent to the refresh helper. That helper calls models.authStatus with refresh enabled, whose handler can schedule provider usage loading, contradicting the new no-provider-contact statement. The handler also refreshes global runtime snapshots, so omitted agent scope alone does not prove that every selected-agent runtime reset fails; the earlier finding is retained as an unproven convergence concern rather than that stronger assertion. Public docs: docs/cli/models.md. (docs/cli/models.md:174, e13a59a36273)
  • Current-main and release comparison: Current-main CLI and model-command searches do not expose clear-cooldown; the v2026.9.5 CLI fetched through GitHub also lacks it. Current main uses an agent-aware models.authRefresh operation with explicit refresh outcomes. These are behavioral context, not evidence that merging this branch would remove main’s changes. No implemented-on-main closure is claimed. (src/commands/models/auth-refresh.ts:14, 5171c37c9f77)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Codex review notes: model internal, reasoning medium; reviewed against 5171c37c9f77.

@clawsweeper clawsweeper Bot added 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. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Sep 22, 2026
@clawsweeper

clawsweeper Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper recorded closeout evidence for this proposed close.

  • Action: close remains subject to final live verification.
  • Close reason: abandoned inactive PR.
    Review evidence: durable ClawSweeper review.

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

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant