fix: CLI auth status/probe path regression#75223
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 11:41 PM ET / 03:41 UTC. Summary PR surface: Source +6, Tests +124. Total +130 across 4 files. Reproducibility: yes. source-reproducible: current main loads CLI status without an external CLI discovery scope while the resolver intentionally skips missing runtime-only CLI profiles when no provider/profile scope is supplied. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow scoped-discovery repair after maintainer acceptance of the auth-provider visibility behavior and fresh exact-head CLI proof or waiver. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main loads CLI status without an external CLI discovery scope while the resolver intentionally skips missing runtime-only CLI profiles when no provider/profile scope is supplied. Is this the best way to solve the issue? Yes; reusing the existing scoped discovery helper and matching the gateway auth-status pattern is the narrowest maintainable fix. Restoring broad unscoped scans would fight the scoped external CLI contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +6, Tests +124. Total +130 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
24edcd5 to
b2695bb
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
10312a9 to
1eb7a42
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: CLI auth status/probe path regression This is item 1/1 in the current shard. Shard 0/22. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Summary
Found one regression in the CLI auth status/probe path. The commit intentionally makes unscoped external CLI discovery skip missing runtime-only profiles, but
models statusandmodels status --probestill load the auth store without passing the providers they are about to report or probe.What ClawSweeper Is Fixing
models status --probemisses CLI-only credentials after scoped discovery (regression)src/commands/models/list.probe.ts:259src/agents/auth-profiles/external-cli-sync.ts:210now returns false for unscoped missing external CLI profiles unless a matching stored OAuth profile already exists.buildProbeTargetsstill callsensureAuthProfileStore(agentDir)withoutallowKeychainPrompt: false,externalCliProviderIds, orexternalCliProfileIds, even though the function receives the exactprovidersand probe profile filters atsrc/commands/models/list.probe.ts:254-256. A focused smoke with a temporary Codex CLI auth file confirmedresolveExternalCliAuthProfiles(emptyStore)returns[], whileresolveExternalCliAuthProfiles(emptyStore, { providerIds: ["openai-codex"] })returns["openai-codex:default"].openclaw models status --probewill build no profile target for that same credential. This produces false “nothing to probe” or missing-auth diagnostics for the provider most likely being checked.buildProbeTargets, load the store with a scope derived from the requested probe surface, for exampleensureAuthProfileStore(agentDir, { allowKeychainPrompt: false, config: cfg, externalCliProviderIds: providers, externalCliProfileIds: options.profileIds }). The plain status path atsrc/commands/models/list.status-command.ts:223should likewise pass the config-derived external CLI scope, matchingsrc/gateway/server-methods/models-auth-status.ts:296-301.Expected Repair Surface
src/commands/models/list.probe.tssrc/agents/auth-profiles.external-cli-scope.test.tssrc/agents/auth-profiles.external-cli-sync.test.tssrc/agents/auth-profiles/external-cli-scope.tssrc/agents/auth-profiles/external-cli-sync.tssrc/agents/model-auth.profiles.test.tssrc/agents/model-auth.tsSource And Review Context
ClawSweeper report: https://github.com/openclaw/clawsweeper/blob/main/records/openclaw-openclaw/commits/581fbea1d65355917886babffe4161f8b3178a12.md
Commit under review: 581fbea
Latest main at intake: 581fbea
Original commit author: Peter Steinberger
GitHub author: @steipete
Highest severity: medium
Review confidence: high
Diff:
54e6e3d7daf5d0d857edf756b35628a29d11c7f5..581fbea1d65355917886babffe4161f8b3178a12Changed files:
src/agents/auth-profiles.external-cli-scope.test.ts,src/agents/auth-profiles.external-cli-sync.test.ts,src/agents/auth-profiles/external-cli-scope.ts,src/agents/auth-profiles/external-cli-sync.ts,src/agents/model-auth.profiles.test.ts,src/agents/model-auth.tsCode read: changed files, auth store overlay path, external auth overlay, auth profile order, CLI model status/probe callers, gateway auth-status caller
Dependencies/web: no dependency changes; no web lookup needed
Expected validation
pnpm check:changedClawSweeper already ran:
pnpm docs:listpnpm install --frozen-lockfilepnpm test src/agents/auth-profiles.external-cli-sync.test.ts src/agents/auth-profiles.external-cli-scope.test.ts src/agents/model-auth.profiles.test.ts src/commands/models/list.probe.targets.test.tsgit diff --check 54e6e3d7daf5d0d857edf756b35628a29d11c7f5..581fbea1d65355917886babffe4161f8b3178a12Known review limits:
models status --probelive provider call, because the actionable regression is in target construction before network probing.ClawSweeper Guardrails
mainbefore changing code.ClawSweeper 🐠 replacement reef notes:
fish notes: model gpt-5.5, reasoning medium; reviewed against 24edcd5.