Skip to content

refactor(auth): retire superseded login helpers - #144533

Merged
obviyus merged 1 commit into
mainfrom
refactor/retire-legacy-login-paths
Sep 11, 2026
Merged

obviyus merged 1 commit into
mainfrom
refactor/retire-legacy-login-paths

Conversation

@obviyus

@obviyus obviyus commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Completed login changes left obsolete test access and scattered Models page helpers.

Why This Change Was Made

Remove the private credential test bridge and use the public reader. Consolidate credential refresh assertions and Models defaults, behavior, and probe handling under their existing owners. Remove obsolete registrations while retaining still-required credential and directive readers.

User Impact

No user-visible behavior change is intended. Login recovery and Models credential/default settings keep their existing contracts. No schema or configuration change.

Evidence

Selected credential and refresh tests passed; deliberate identity corruption failed both old and relocated assertions. Login recovery suites and 55 Models owner tests passed. All 13 browser cases passed, including key edit/removal and persisted model settings after reload. Telegram delivered provider-neutral recovery after a simulated authentication failure; both login actions opened the provider picker. The UI build reported an advisory startup-size overage.

Related: #136257, #144329, #144420, #143588.

@obviyus
obviyus requested a review from a team as a code owner September 11, 2026 00:53
@clawsweeper

clawsweeper Bot commented Sep 11, 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 app: web-ui App: web-ui agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 11, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 10, 2026, 8:59 PM ET / September 11, 2026, 00:59 UTC.

ClawSweeper review

What this changes

Removes private credential-test access, consolidates auth regression tests, and moves Models-page settings and probe helpers into the existing configuration-mutation module.

Merge readiness

⛔ Blocked before merge - 3 items remain

This remains a distinct, coherent cleanup of the merged login work, with no introduced correctness defect found. The protected PR requires confirmation of the requested refactor scope and listed auth-owner involvement.

Priority: P3
Reviewed head: 422158ec6b57771a69a32af1b28a6715126740aa
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent cleanup with relevant reported runtime observations and no blocking code finding; owner approval remains a separate workflow requirement.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): For this behavior-preserving consolidation, the captured body reports relevant after-change real Gateway/browser settings and credential parity, including reload readback; Telegram recovery observations are supplemental. These are contributor-reported results, not reviewer-executed runs or inspected private artifacts.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): For this behavior-preserving consolidation, the captured body reports relevant after-change real Gateway/browser settings and credential parity, including reload readback; Telegram recovery observations are supplemental. These are contributor-reported results, not reviewer-executed runs or inspected private artifacts.
Evidence reviewed 11 items Introduced production changes: The pinned diff removes the private credential-test publication and moves existing UI helper bodies without changing their defaults, patch fields, probe aggregation, or Gateway write operations.
Cleanup remains absent from current main: Current main still contains the private test publication and separate Models helpers. The related merged login and API-key work provides prerequisites, rather than implementing this retirement.
Credential parsing remains exercised: The public cached reader defaults ttlMs to zero and directly invokes the retained parser. Migrated parsing assertions therefore retain their original execution path; cache tests use distinct temporary homes.
Findings None None.
Security None None.

How this fits together

OpenClaw’s credential readers and auth-profile owners supply credentials to model execution. The Models page translates user settings into Gateway-owned configuration and credential operations.

flowchart LR
  A[External CLI credentials] --> B[Credential readers]
  B --> C[Auth profile owners]
  C --> D[Model execution]
  E[Models page settings] --> F[Configuration mutation helpers]
  F --> G[Gateway configuration and credentials]
  G --> C
Loading

Decision needed

Question Recommendation
Does the listed auth owner approve this test-retirement scope as part of the requested login cleanup? Approve the bounded retirement: Confirm the maintainer request and auth-owner acceptance of the retained coverage, then continue the normal merge workflow.

Why: The refactor is technically coherent, but repository policy requires explicit sponsorship and restricted-path owner involvement that the available records do not establish.

Before merge

  • Resolve merge risk (P1) - The claimed maintainer request and approval of the protected auth-test retirement are not established by the available discussion or review records.
  • Complete next step (P2) - Link the maintainer request for this retirement and obtain listed auth-owner confirmation of the test-removal scope.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source -14, Tests -1700, Other -1. Total -1715 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 6 103 117 -14
Tests 13 427 2127 -1700
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 1 2 -1
Total 21 531 2246 -1715

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Complete the owner-approved retirement while preserving the existing credential readers, auth boundaries, and Gateway-owned settings behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Complete the owner-approved retirement while preserving the existing credential readers, auth boundaries, and Gateway-owned settings behavior.

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

Not applicable: this PR requests structural retirement and explicitly claims no new functional fix; no introduced failing behavior was established.

Is this the best way to solve the issue?

Yes: reusing the public credential reader and existing Models mutation owner is a narrow consolidation that preserves the inspected production contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is behavior-preserving structural cleanup with no demonstrated urgent user-facing defect.
  • add proof: sufficient: Contributor real behavior proof is sufficient. For this behavior-preserving consolidation, the captured body reports relevant after-change real Gateway/browser settings and credential parity, including reload readback; Telegram recovery observations are supplemental. These are contributor-reported results, not reviewer-executed runs or inspected private artifacts.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): For this behavior-preserving consolidation, the captured body reports relevant after-change real Gateway/browser settings and credential parity, including reload readback; Telegram recovery observations are supplemental. These are contributor-reported results, not reviewer-executed runs or inspected private artifacts.

Label justifications:

  • P3: This is behavior-preserving structural cleanup with no demonstrated urgent user-facing defect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): For this behavior-preserving consolidation, the captured body reports relevant after-change real Gateway/browser settings and credential parity, including reload readback; Telegram recovery observations are supplemental. These are contributor-reported results, not reviewer-executed runs or inspected private artifacts.
  • proof: sufficient: Contributor real behavior proof is sufficient. For this behavior-preserving consolidation, the captured body reports relevant after-change real Gateway/browser settings and credential parity, including reload readback; Telegram recovery observations are supplemental. These are contributor-reported results, not reviewer-executed runs or inspected private artifacts.

Evidence

What I checked:

  • Introduced production changes: The pinned diff removes the private credential-test publication and moves existing UI helper bodies without changing their defaults, patch fields, probe aggregation, or Gateway write operations. (ui/src/pages/model-providers/config-mutation.ts:7, 422158ec6b57)
  • Cleanup remains absent from current main: Current main still contains the private test publication and separate Models helpers. The related merged login and API-key work provides prerequisites, rather than implementing this retirement. (src/agents/cli-credentials.ts:33, d841e35101d5)
  • Credential parsing remains exercised: The public cached reader defaults ttlMs to zero and directly invokes the retained parser. Migrated parsing assertions therefore retain their original execution path; cache tests use distinct temporary homes. (src/agents/cli-credentials.ts:470, 422158ec6b57)
  • Retained auth boundaries: The replacement tests cover MiniMax provenance, plugin overlays, scoped removal, prepared credential references, refresh persistence, route rejection, contention redaction, and locked-profile fallback. Existing external-CLI tests still reject native Codex bootstrap; the production registry contains only MiniMax. (src/agents/auth-profiles/external-cli-sync.ts:61, 422158ec6b57)
  • Dependency inspection signal: The changed credential tests assert Codex auth.json and Keychain parsing through readCodexCliCredentialsCached, establishing a concrete dependency-format contract for inspection. (src/agents/cli-credentials.test.ts:167, 422158ec6b57)
  • Personally inspected dependency contract: The sibling checkout’s backing remote identifies openai/codex. AuthDotJson retains auth_mode, OPENAI_API_KEY, tokens, and last_refresh; the inspected Keychain implementation uses the Codex Auth service and canonical-home hash. TokenData retains access_token, refresh_token, and account_id. These match the retained reader contracts. (codex-rs/login/src/auth/storage.rs:39, 3d2ee51ca2d5)

Likely related people:

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

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

This is the bounded follow-up I explicitly requested as the author of #136257. The work order authorizes retiring the named legacy login helpers, moving every still-live test invariant to its current owner, running the listed product proofs, and landing this PR. The product decisions carried forward from #136257 are approved.

The retirement keeps credential authority, persistence, consent behavior, and the live reader contracts unchanged. It retains the directive helpers because their prepared-label and endpoint replacement is missing. The required local review of head 422158ec6b57771a69a32af1b28a6715126740aa inspected the complete test ledger and raw proof: zero findings, security cleared, product proof sufficient, and no remaining maintainer or product decision. The separate public review found no code or security defect and lacked this private work-order context.

CI has completed. The startup-size failure also fails on the exact base. The plugin-settings failure is a pre-existing reconnect timing gap: an ordinary base run passes, while controlled response scheduling on unchanged base production source reproduces the same count-1 assertion failure during loading and confirms message recovery afterward. Neither failure is repaired or hidden by this PR; both are documented for the approved guarded exception.

@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 144533
head: 422158e
run: 34548405222 attempt: 1
failed: checks-ui-e2e (5/7) job=103106053339 conclusion=failure
failed: control-ui-performance job=103106052812 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit 11921d8 into main Sep 11, 2026
195 of 198 checks passed
@obviyus
obviyus deleted the refactor/retire-legacy-login-paths branch September 11, 2026 01:22
@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @obviyus!

Proof: Real Telegram failure recovery and the delivered Sign in button open the provider picker. All 13 Models browser cases passed, including real Gateway API-key edit/removal with CLI state parity and settings readback after reload. Focused authentication and recovery checks passed; the required review had zero findings and cleared security.

  • Maintenance problem: superseded test access and scattered Models helpers remained after the login cutover.
  • Fix: use the existing public credential reader and page mutation owner, preserve live regression coverage, and retain paths whose replacement contract is still absent.
Before After
Private test bridge, scattered page helpers, duplicate native-bootstrap test permutations Public-reader tests, one page mutation module, and current-owner regression coverage
Existing login recovery and Models behavior Same behavior, verified through the user flows

Merged as 11921d88856c0d1690b1036ff6e0e48d9ef9043b using the approved unrelated-CI exception for completed run 34548405222, attempt 1:

  • control-ui-performance: the exact CI merge reports 353,140 gzip bytes; the exact base cd9be2bbe7d89f4df2389cb633401d812fbd335a reports 353,134. Both exceed the unchanged 353,107 limit and exit 1. Raw startup bytes are identical. The base was built with the comparison tool's fixed identity, then checked with node --import ./scripts/tsx.mjs scripts/check-control-ui-performance.mts. The cumulative size-drift introduction was not isolated; no author attribution is claimed.
  • checks-ui-e2e (5/7): plugins-settings-admin.e2e.test.ts:592 races the existing reconnect loading state. The unchanged base passes its six ordinary cases. A focused base probe that holds the two existing catalog responses records message counts 1 → 0 during loading → 1 after recovery, and exits 1 from the original count assertion. No product code, payload, expected value, timeout, or retry was changed. The CI request trace contains the same reconnect and its later screenshot shows the restored message. The assertion was added by 4bee6152f4d45 (feat(ui): add canonical plugin settings administration #135840), already in the tested base; this PR changes neither it nor the plugin page/controller.

The aggregate openclaw/ci-gate failure derives from those two jobs. Both remain follow-ups; neither is repaired or hidden here. Scope confirmation records the requested retirement. Directive retirement remains queue item 11 because prepared auth labels and public endpoint facts are still missing.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 11, 2026
Retire private CLI credential test access and consolidate Models page helpers under the existing mutation owner. Move live refresh and external-auth assertions to their current owners, remove stale test registrations, and retain readers/directive paths whose replacement contracts are absent.

Validated with focused auth, login recovery and Models tests, real Telegram recovery and Sign in actions, real Gateway API-key edit/removal, browser settings readback, and independent source/product review. Related: openclaw#136257.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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