Skip to content

refactor: retire legacy provider and secret paths - #115655

Merged
steipete merged 3 commits into
mainfrom
refactor/loc-retired-policy-hygiene
Jul 29, 2026
Merged

steipete merged 3 commits into
mainfrom
refactor/loc-retired-policy-hygiene

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Steady-state runtime paths still accepted retired openai-codex / codex-cli provider identities and legacy secretref-env: / __env__: secret markers after those values had become doctor-only migration input. Cache retention also read the same environment policy independently in three @openclaw/ai paths.

Why This Change Was Made

Runtime, auth setup, status, fast-mode, failure guidance, and the Codex app-server bridge now consume canonical openai state only; manual entry points explicitly reject retired IDs. SecretRef coercion remains canonical, web credential detection rejects retired markers before literal fallback, and doctor migrates both legacy marker prefixes. The three in-package cache-retention readers now share the provider owner module; Amazon Bedrock remains local because the external plugin has no allowed private packages/ai seam.

User Impact

Canonical openai/* routes, canonical openai credentials, structured SecretRefs, $NAME / ${NAME} env shorthands, and supported cache-retention values behave unchanged. Operators with retired provider IDs or marker strings receive rejection instead of silent steady-state compatibility and can repair persisted state with openclaw doctor --fix.

Evidence

  • LOC: production +58/-181 (net -123); tests +30/-234 (net -204); total +88/-415 (net -327).
  • node scripts/run-vitest.mjs fast-mode status-text secretref cache-retention — 8 files, 79 tests passed.
  • Focused auth bridge / login / failure guidance / web provider batch — 5 files, 111 tests passed.
  • Secret migration batch — 2 files, 80 tests passed; affected regression batch — 4 shards, 134 tests passed; cache-retention rerun — 2 files, 31 tests passed.
  • CI exposed one obsolete model-auth test for runtime __env__: fallback; after deleting that removed-path assertion, the exact file passed 79 tests and the delta reviewed clean at 0.99 confidence.
  • Moving-main red gates were diagnosed and repaired during CI; current main subsequently absorbed the same fixes in 8ad4e858fda and 302f262e6b1, so the final rebased branch contains no duplicate unrelated repair.
  • node scripts/check-changed.mjs -- <21 touched files> on Blacksmith Testbox — passed formatting, SDK contracts, dead-code scans, core/core-test/extension/extension-test typechecks, core/extension lint, import cycles, and final architecture guards (run 30426599054).
  • Autoreview converged clean with no accepted/actionable findings (patch is correct, confidence 0.90); the one-line follow-up import cleanup also reviewed clean at 0.99.
  • Canonical runtime reads: src/shared/fast-mode.ts:43, src/status/status-text.ts:167, src/commands/models/auth.ts:152, extensions/codex/src/app-server/auth-bridge.ts:999.
  • Secret ownership and migration: src/config/types.secrets.ts:105, src/secrets/legacy-secretref-env-marker.ts:22, src/web/provider-runtime-shared.ts:88.
  • Cache owner: packages/ai/src/providers/cache-retention.ts:7; Anthropic transport consumer: packages/ai/src/transports/anthropic-payload-policy.ts:63.
  • Upstream Codex hard gate inspected at openai/codex@4c43465133428898aa84f0bfc02c306ed65fb66a: codex-rs/app-server-protocol/src/protocol/v2/account.rs:61-109 defines provider-agnostic apiKey / chatgptAuthTokens login payloads, codex-rs/app-server-protocol/src/protocol/common.rs:1034-1038 owns account/login/start, and codex-rs/app-server/src/request_processors/account_processor.rs:268-320,691-753 dispatches and installs external tokens without OpenClaw provider IDs.

@steipete
steipete marked this pull request as ready for review July 29, 2026 06:07
@steipete
steipete requested a review from a team as a code owner July 29, 2026 06:07
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations agents Agent runtime and tooling extensions: codex size: M maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete steipete closed this Jul 29, 2026
@steipete steipete reopened this Jul 29, 2026
@steipete
steipete force-pushed the refactor/loc-retired-policy-hygiene branch from 7a7b2e0 to 976ecea Compare July 29, 2026 06:53
@steipete steipete closed this Jul 29, 2026
@steipete steipete reopened this Jul 29, 2026
@steipete
steipete force-pushed the refactor/loc-retired-policy-hygiene branch from 976ecea to 18b9ae2 Compare July 29, 2026 07:02
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Jul 29, 2026
@steipete
steipete force-pushed the refactor/loc-retired-policy-hygiene branch 2 times, most recently from cab6212 to f1efe5e Compare July 29, 2026 08:09
@steipete
steipete force-pushed the refactor/loc-retired-policy-hygiene branch from f1efe5e to c273eb4 Compare July 29, 2026 08:18
@steipete
steipete merged commit c5d0b7d into main Jul 29, 2026
122 of 124 checks passed
@steipete
steipete deleted the refactor/loc-retired-policy-hygiene branch July 29, 2026 08:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main:
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
  fix(msteams): finalize sent replies after dispatch (#82354)
  fix(cron): deliver explicitly configured failure alerts (#115762)
  fix(hooks): resolve inbound claim conversation once (#115491)
  refactor: retire legacy provider and secret paths (#115655)
  fix(memory): reject malformed QMD result entries (#115705)
  fix(diagnostics): keep internal thinking out of telemetry [AI] (#115261)
  fix(ui): localize remaining control surfaces (#115730)
  fix(gateway): prevent model owner mismatch after plugin activation (#115747)
  fix(agents): run reply hooks for restart recovery (#115711)
  fix(cron): initialize detached hook run sessions (#115765)
  fix(ios): keep stop available for staged voice notes (#115744)
  fix(doctor): preserve config includes during cleanup (#115723)
  fix(memory): keep dreaming consolidation within project scope (#115721)
  fix(discord): keep tool rows under verbose progress (#111947)

# Conflicts:
#	ui/src/pages/custodian/custodian-surface.ts
#	ui/src/styles/custodian.css
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
* refactor: retire legacy provider and secret paths

* fix: remove stale cache retention import

* test: remove retired secret marker fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations extensions: codex maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant