Skip to content

fix: keep retired auth profile lookup runtime-free - #129387

Merged
shakkernerd merged 1 commit into
mainfrom
test/auth-timeout-cleanup
Aug 25, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
test/auth-timeout-cleanup

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

Summary

Keep retired auth-profile lookup on the lightweight provider-policy path instead of loading provider runtimes.

Root Cause

#129052 added provider-owned retired profile metadata, but resolveProviderDeprecatedAuthProfileIds read it through resolveProviderRuntimePlugin.

That path cold-loaded provider runtimes during generic auth resolution even though the requested fact is static manifest-owned policy. The unnecessary runtime graph caused four auth and media suites to exceed their test timeout under normal runner pressure.

Changes

  • expose retired profile IDs through the existing provider-policy artifact
  • publish the retired Claude CLI profile ID from the Anthropic policy module
  • resolve bundled retired-profile metadata without loading provider runtime
  • preserve the loaded-plugin fallback for external providers
  • validate the new policy field before exposing it

Performance

  • before: four focused suites timed out
  • after: all four suites finish in under seven seconds

Verification

  • 119 focused tests on Testbox
  • formatting
  • core and extension lint
  • plugin boundary checks
  • git diff --check
  • autoreview

Refs #129052

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@shakkernerd
shakkernerd force-pushed the test/auth-timeout-cleanup branch from c8dad2c to 72e35f2 Compare August 25, 2026 15:04
@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 25, 2026, 11:53 AM ET / 15:53 UTC.

ClawSweeper review

What this changes

This PR publishes Anthropic’s retired Claude CLI profile ID through lightweight provider policy and stops generic auth resolution from loading bundled provider runtimes for that lookup.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep this PR open: the prior P1 remains on the unchanged head. The lookup reads only bundled policy, so a cold trusted external provider cannot retire its declared legacy profiles.

Priority: P2
Reviewed head: 72e35f2db97368e24a136582c6947fa72bd614e9

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The branch has a concrete P1 policy-coverage gap despite a sound bundled-provider direction.
Proof confidence 🌊 off-meta tidepool Not applicable: This repository-member PR is exempt from the external-contributor proof gate; its targeted test claims remain supplemental validation.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This repository-member PR is exempt from the external-contributor proof gate; its targeted test claims remain supplemental validation.
Evidence reviewed 6 items Changed lookup omits trusted external policy: The PR consults only the bundled policy resolver, then an already-loaded runtime. A cold trusted external provider has neither path, so its static retired IDs are absent.
Existing canonical external-policy resolver: Current main already provides a registry-aware resolver that loads bundled or trusted official external provider policy artifacts before runtime registration.
Cold external policy is an established contract: Current tests prove trusted external policy can be resolved before runtime registration, while rejecting untrusted external policy.
Findings 1 actionable finding [P1] Resolve retired IDs through the external policy surface
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/plugins/provider-runtime.test.ts -t "reads deprecated profile ids without loading provider runtime"

Result: PASS (completed)

node scripts/run-vitest.mjs src/plugins/provider-runtime.test.ts -t "reads deprecated profile ids without loading provider runtime"runner@runnervmgx7h7:/tmp/cla
wsweeper-live-proof-129387-xIa6my/target$ node scripts/run-vitest.mjs src/plugins/provider-runtime.test.ts -t "reads deprecated profile ids without loading prov
ider runtime"
node scripts/run-vitest.mjs src/plugins/provider-runtime.test.ts -t "reads deprecated profile ids without loading provider runtime"
[test] starting test/vitest/vitest.plugins.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129387-xIa6my/target

 ✓  plugins  src/plugins/provider-runtime.test.ts (67 tests | 66 skipped) 8550ms

 Test Files  1 passed (1)
      Tests  1 passed | 66 skipped (67)
   Start at  15:54:09
   Duration  10.08s (transform 7.84s, setup 958ms, import 220ms, tests 8.55s, environment 0ms)

[test] passed 1 Vitest shard in 15.93s
runner@runnervmgx7h7:/tmp/clawsweeper-live-proof-129387-xIa6my/target$ node scripts/run-vitest.mjs src/plugins/provider-runtime.test.ts -t "reads deprecated pro
file ids without loading provider runtime"

































Assertions:

  • PASS expect_output: passed

How this fits together

Generic authentication resolution checks provider-owned retired profile IDs before selecting stored credentials. Provider policy artifacts supply static metadata without loading a provider runtime, for both bundled and trusted external plugins.

flowchart LR
  A[Generic auth resolution] --> B[Retired profile lookup]
  B --> C{Provider policy source}
  C --> D[Bundled policy artifact]
  C --> E[Trusted external policy registry]
  D --> F[Retired profile IDs]
  E --> F
  F --> G[Credential selection]
Loading

Before merge

  • Resolve retired IDs through the external policy surface (P1) - This only consults bundled policy, while the fallback sees only an already-active runtime. A trusted external provider that declares deprecatedProfileIds while cold therefore returns no retired IDs. Use the existing registry-aware resolver and add its cold-runtime regression coverage.
  • Resolve merge risk (P1) - A trusted external provider that declares retired profile IDs while its runtime is cold will still permit those legacy profiles through generic auth resolution.
  • Resolve merge risk (P1) - Production code grows by 15 net lines; the static policy contract is justified, but the final repair should reuse the existing registry-aware resolver instead of adding a parallel bundled-only policy path.
  • Complete next step (P2) - This protected maintainer PR needs its existing P1 addressed on the branch before ordinary maintainer review can continue.

Findings

  • [P1] Resolve retired IDs through the external policy surface — src/plugins/provider-runtime.ts:903-904
Agent review details

Security

None.

PR surface

Source +15, Tests +20. Total +35 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 16 1 +15
Tests 3 20 0 +20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 36 1 +35

Review metrics

Metric Value Why it matters
Production versus test LOC production +16/-1; tests +20/-0 The positive production delta adds provider-policy contract surface, so the repair should reuse the established external-policy resolver rather than retain a narrower parallel path.

Merge-risk options

Maintainer options:

  1. Use the registry-aware policy resolver (recommended)
    Update the lookup to pass current manifest metadata to the existing bundled-or-trusted-external policy resolver and cover the cold external case.

Technical review

Best possible solution:

Resolve retired IDs through resolveProviderPolicySurface with the current metadata snapshot, and add a cold trusted-external-provider regression that proves no provider runtime is loaded.

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

Yes, from source: configure a trusted external provider with deprecatedProfileIds, keep its runtime cold, and invoke generic auth resolution; this branch returns no retired IDs because it only checks bundled policy and loaded runtimes.

Is this the best way to solve the issue?

No: the patch fixes bundled Anthropic but misses the existing trusted-external policy contract. Reusing the registry-aware resolver is the narrower canonical solution.

Full review comments:

  • [P1] Resolve retired IDs through the external policy surface — src/plugins/provider-runtime.ts:903-904
    This only consults bundled policy, while the fallback sees only an already-active runtime. A trusted external provider that declares deprecatedProfileIds while cold therefore returns no retired IDs. Use the existing registry-aware resolver and add its cold-runtime regression coverage.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9cfb4ff956c9.

Labels

Label justifications:

  • P2: This is a bounded provider-auth compatibility defect with a concrete repair path.
  • merge-risk: 🚨 compatibility: Recognizing retired profiles changes credential selection for existing provider configurations.
  • merge-risk: 🚨 auth-provider: The affected lookup controls retirement of provider-owned authentication profiles.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This repository-member PR is exempt from the external-contributor proof gate; its targeted test claims remain supplemental validation.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Commit 16a6470 introduced trusted external provider-policy loading, the existing abstraction this repair should reuse. (role: introduced trusted external policy behavior; confidence: high; commits: 16a647041c90; files: src/plugins/provider-public-artifacts.ts, src/plugins/provider-policy-surface.ts)
  • Peter Steinberger: Recent history shows repeated ownership of provider public-artifact and policy-surface maintenance. (role: recent provider-policy contributor; confidence: medium; commits: 1c28b422a67c, 8b448439b64b; files: src/plugins/provider-public-artifacts.ts, src/plugins/provider-policy-surface.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve trusted external provider policy before runtime activation.
  • Add a cold external-provider retired-profile regression that proves no runtime load.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-25T15:10:21.145Z sha 72e35f2 :: found issues before merge. :: [P1] Resolve retired IDs through the external policy surface

@shakkernerd shakkernerd self-assigned this Aug 25, 2026
@shakkernerd
shakkernerd force-pushed the test/auth-timeout-cleanup branch from 72e35f2 to 16197b5 Compare August 25, 2026 17:19
@shakkernerd
shakkernerd merged commit 494ea4b into main Aug 25, 2026
428 of 450 checks passed
@shakkernerd
shakkernerd deleted the test/auth-timeout-cleanup branch August 25, 2026 17:48
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: retired auth-profile lookup now stays on the lightweight provider-policy path without cold-loading provider runtimes.

steipete added a commit that referenced this pull request Aug 25, 2026
…th barrel

#129052 imported CLAUDE_CLI_PROFILE_ID from openclaw/plugin-sdk/provider-auth
into the anthropic plugin's config-defaults, and #129387 moved the same barrel
import into provider-policy-api itself. That barrel pulls the auth-profile
store, oauth, config, and http infra - the policy artifact's import graph grew
from 57 to ~2,216 modules. In dist-less checkouts (every checks-node CI job)
the first test touching anthropic policy jiti-compiles that graph
synchronously, and vitest's post-hoc elapsed check reports it as a 120s
timeout: checks-node-compact shards have failed one rotating
model/alias/auth-resolution test per worker on every PR since 11:48 UTC.

The whole import existed to read one constant. The plugin now owns the
retired profile id as a local literal in cli-constants.ts, and
cli-constants.test.ts pins parity with the plugin-sdk constant (tests may
import the barrel freely). Dist-less reproduction: model-resolution-consistency
145s timeout pre-fix, 46s all-pass post-fix.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
Keep retired auth-profile lookup on the lightweight provider-policy path so generic auth resolution no longer cold-loads provider runtimes.

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

Labels

extensions: anthropic maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant