Skip to content

fix(agents): strip plaintext model provider keys - #84581

Closed
pcdqc wants to merge 16 commits into
openclaw:mainfrom
pcdqc:fix-strip-models-json-api-keys
Closed

pcdqc wants to merge 16 commits into
openclaw:mainfrom
pcdqc:fix-strip-models-json-api-keys

Conversation

@pcdqc

@pcdqc pcdqc commented May 20, 2026 •

Copy link
Copy Markdown

Summary

  • strip plaintext provider apiKey values after merge-mode preservation, source-managed enforcement, and provider compatibility transforms so old models.json keys cannot be reintroduced into the final prompt-facing catalog
  • clean legacy catalog-only models.json plaintext provider keys before the empty-provider skip path can preserve them
  • migrate existing models.json-only plaintext provider keys into the target agent's local auth-profiles.json before writing the stripped catalog when there is no configured provider key and no target-local auth profile for that provider
  • keep inherited main-agent profiles and runtime/external overlays from suppressing local legacy models.json key migration for non-main agents
  • migrate known/env-present legacy env-name catalog credentials such as LITELLM_KEY to env-backed auth-profile keyRefs, while preserving ambiguous env-shaped plaintext strings as inline local auth-profile keys
  • preserve non-secret markers such as env SecretRef markers and custom-provider secretref-managed compatibility markers
  • preserve current-main plugin metadata discovery and manifest-aware model ID normalization while routing providers through the prompt-safe stripping path
  • add regression coverage for generated plaintext stripping, merge-mode stripping, catalog-only cleanup, existing-key migration, fail-closed behavior, inherited-profile migration boundaries, env-present keyRef migration, ambiguous env-shaped key preservation, pi model discovery compatibility, metadata discovery threading, and current-head write-path stabilization

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: Generated and legacy models.json files should not persist plaintext provider apiKey values. Cleanup should preserve upgrade auth outside the prompt-facing catalog, including non-main agent local migration boundaries and env-shaped legacy values that must only become keyRefs when an env marker or observed env value proves they are env-backed. The rebased branch should also preserve current-main plugin metadata discovery and manifest-aware model normalization.
  • Real environment tested: Local OpenClaw source tree matching PR head 4637af01e2f1bf0212758c7450eeb5ca328b8ba7 (treeMatchesRemoteHead: true; local commit 3a249e79e3cd0be76920458c507fed56374b6ffb has the same tree because the remote commit was created through the GitHub Git Database API), macOS, Node.js v24.1.0, /usr/bin/python3 for fs-safe pinned writes. Provider keys in proof output are redacted.
  • Exact steps or command run after this patch:
FS_SAFE_PYTHON_MODE=require FS_SAFE_PYTHON=/usr/bin/python3 REMOTE_HEAD=4637af01e2f1bf0212758c7450eeb5ca328b8ba7 REMOTE_TREE=d14a38d666241655a0efe6dc30ef6b88a89da3bc node --import tsx --input-type=module

The inline Node proof script created temporary local agent dirs, called ensureOpenClawModelsJson, planOpenClawModelsJsonWithDeps, discoverModels, ensureAuthProfileStore, and createProviderAuthResolver, and exercised these real paths: inline custom provider stripping, legacy configured models.json key migration, catalog-only cleanup, env-present keyRef migration, ambiguous env-shaped plaintext preservation, non-main inherited-profile migration boundary, pi model discovery compatibility, and manifest-aware model normalization after stripping.

  • Evidence after fix (copied live output, redacted):
{
  "remoteHead": "4637af01e2f1bf0212758c7450eeb5ca328b8ba7",
  "localCommit": "3a249e79e3cd0be76920458c507fed56374b6ffb",
  "treeMatchesRemoteHead": true,
  "localTree": "d14a38d666241655a0efe6dc30ef6b88a89da3bc",
  "tempRoot": "<tmp>",
  "inlineCustomProvider": {
    "apiKeyMarker": "secretref-managed",
    "hasPlaintextInModelsJson": false,
    "discoverModelsFindsCustomModel": "custom-model"
  },
  "legacyModelsJsonOnlyUpgrade": {
    "apiKeyMarker": "secretref-managed",
    "hasPlaintextInModelsJson": false,
    "migratedProfile": {
      "type": "api_key",
      "provider": "custom",
      "copyToAgents": false,
      "displayName": "Migrated from models.json",
      "key": "<redacted>"
    },
    "discoverModelsFindsLegacyModel": "legacy-model"
  },
  "catalogOnlyLegacyCleanup": {
    "apiKeyMarker": "secretref-managed",
    "hasPlaintextInModelsJson": false,
    "migratedProfile": {
      "type": "api_key",
      "provider": "custom",
      "copyToAgents": false,
      "displayName": "Migrated from models.json",
      "key": "<redacted>"
    },
    "discoverModelsFindsCatalogOnlyModel": "catalog-only-model"
  },
  "envPresentCatalogMigration": {
    "modelsJsonPromptSafe": true,
    "migratedProfile": {
      "type": "api_key",
      "provider": "custom",
      "hasInlineKey": false,
      "keyRef": {
        "source": "env",
        "provider": "default",
        "id": "LITELLM_KEY"
      },
      "copyToAgents": false
    },
    "runtimeAuth": {
      "mode": "api_key",
      "source": "profile",
      "profileId": "custom:models-json",
      "apiKeyMarker": "LITELLM_KEY",
      "resolvedEnvValueSeen": true
    }
  },
  "ambiguousEnvShapedCredential": {
    "modelsJsonPromptSafe": true,
    "migratedProfile": {
      "type": "api_key",
      "provider": "custom",
      "hasInlineKey": true,
      "hasKeyRef": false,
      "copyToAgents": false
    },
    "runtimeAuth": {
      "mode": "api_key",
      "source": "profile",
      "profileId": "custom:models-json",
      "preservedLocalKeySeen": true
    }
  },
  "inheritedProfileBoundary": {
    "modelsJsonPromptSafe": true,
    "localMigratedProfile": {
      "type": "api_key",
      "provider": "custom",
      "copyToAgents": false,
      "displayName": "Migrated from models.json",
      "key": "<redacted>"
    },
    "runtimeAuth": {
      "mode": "api_key",
      "source": "profile",
      "profileId": "custom:models-json",
      "resolvedWorkerKey": true
    }
  },
  "manifestAwareModelNormalization": {
    "planAction": "write",
    "normalizedModelId": "plugin-prefix/bare-model",
    "apiKeyMarker": "secretref-managed"
  }
}
  • Observed result after fix: the final models.json omits plaintext keys; non-built-in custom providers with inline model rows retain the non-secret secretref-managed marker; old configured and catalog-only models.json credentials migrate into auth-profiles.json; env-present legacy catalog values migrate as env-backed keyRef credentials and resolve through provider auth; ambiguous env-shaped legacy values with no env signal are preserved as inline local auth-profile keys instead of unresolved env refs; a non-main agent with an inherited same-profile ID still migrates its local legacy catalog key and runtime auth resolves the worker-local key; pi discoverModels can still find custom model rows; and manifest-aware model normalization still threads plugin policies through the stripped catalog path.
  • What was not tested: I did not test a real paid third-party provider. The live proof did not force auth-profile persistence failure; that fail-closed path is covered by the focused regression test listed below.

Tests

  • node scripts/run-vitest.mjs src/agents/models-config.write-serialization.test.ts --maxWorkers=1 --reporter=dot
  • node scripts/run-vitest.mjs src/agents/models-config.plan.test.ts --maxWorkers=1 --reporter=dot
  • node scripts/run-vitest.mjs src/agents/models-config.runtime-source-snapshot.test.ts --maxWorkers=1 --reporter=dot
  • merge-ref simulation against local origin/main with the same three targeted tests after merging the current proof/fix tree
  • PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false PNPM_CONFIG_OFFLINE=true PNPM_CONFIG_PM_ON_FAIL=ignore pnpm exec tsc --noEmit --pretty false -p tsconfig.core.json
  • NODE_OPTIONS=--max-old-space-size=8192 PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false PNPM_CONFIG_OFFLINE=true PNPM_CONFIG_PM_ON_FAIL=ignore pnpm exec tsc --noEmit --pretty false -p test/tsconfig/tsconfig.core.test.json
  • PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false PNPM_CONFIG_OFFLINE=true PNPM_CONFIG_PM_ON_FAIL=ignore pnpm exec oxfmt --check --threads=1 src/agents/models-config.ts src/agents/models-config.plan.ts src/agents/models-config.write-serialization.test.ts src/agents/models-config.plan.test.ts src/agents/models-config.runtime-source-snapshot.test.ts src/agents/models-config.providers.normalize.ts src/plugins/installed-plugin-index-registry.ts src/plugins/installed-plugin-index.ts src/plugins/plugin-metadata-snapshot.ts src/plugins/plugin-registry-snapshot.ts src/plugins/plugin-metadata-snapshot.types.ts src/plugins/plugin-registry-snapshot.types.ts
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/agents/models-config.ts src/agents/models-config.plan.ts src/agents/models-config.write-serialization.test.ts src/agents/models-config.plan.test.ts src/agents/models-config.runtime-source-snapshot.test.ts src/agents/models-config.providers.normalize.ts src/plugins/installed-plugin-index-registry.ts src/plugins/installed-plugin-index.ts src/plugins/plugin-metadata-snapshot.ts src/plugins/plugin-registry-snapshot.ts src/plugins/plugin-metadata-snapshot.types.ts src/plugins/plugin-registry-snapshot.types.ts
  • pnpm docs:list
  • PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false PNPM_CONFIG_OFFLINE=true PNPM_CONFIG_PM_ON_FAIL=ignore pnpm exec oxfmt --check --threads=1 docs/concepts/models.md docs/reference/secretref-credential-surface.md src/config/schema.help.ts
  • node scripts/run-vitest.mjs src/config/schema.help.quality.test.ts --maxWorkers=1 --reporter=dot
  • git diff --check

Refs #11829

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 20, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 4:19 PM ET / 20:19 UTC.

Summary
The PR strips or migrates plaintext provider apiKey values from generated models.json, updates model-catalog/auth-profile planning, adds regression tests, and adjusts model docs/help text.

PR surface: Source +192, Tests +698, Docs +1. Total +891 across 16 files.

Reproducibility: yes. source inspection shows current main can still serialize provider apiKey strings into generated root and plugin catalog outputs; this read-only review did not run a mutating CLI reproduction.

Review metrics: 1 noteworthy metric.

  • Generated Credential Sinks: 2 current-main sinks. Current main writes both root models.json and plugin catalog.json sidecars, so merge proof must cover both places credentials can persist.

Stored data model
Persistent data-model change detected: database schema: src/config/schema.help.ts, migration/backfill/repair: docs/concepts/models.md, migration/backfill/repair: src/config/schema.help.ts, serialized state: src/plugins/plugin-registry-snapshot.ts, serialized state: src/plugins/plugin-registry-snapshot.types.ts, unknown-data-model-change: src/config/schema.help.ts, and 4 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #88562
Summary: This PR is a broad candidate fix for the generated provider credential persistence cluster now tracked by the open canonical issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🦪 silver shellfish
Patch quality: 🧂 unranked krab
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Rebase or replace the branch against current main and remove the undeclared Pi dependency path.
  • Cover both root models.json and generated plugin catalog.json sidecars in code and regression tests.
  • [P1] Add redacted terminal/log proof from the retargeted merge result showing SQLite auth-profile migration and no plaintext provider key in generated catalogs.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body includes useful redacted live output for the PR head, but not after-fix proof for the current-main merge result with SQLite auth profiles and plugin catalog sidecars. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The PR is currently conflicting, so maintainers cannot evaluate the real three-way merge result or trust PR-head proof as current-main proof.
  • [P1] Retargeting as-is could strip provider keys before a durable SQLite auth-profile migration is proven, breaking provider authentication for users whose only local credential was in generated catalog state.
  • [P1] Current main writes generated plugin catalog sidecars, and this branch only demonstrates/root-serializes models.json, so plaintext provider keys can remain in plugins/<id>/catalog.json.
  • [P1] The branch imports @earendil-works/pi-ai, which current main no longer declares, creating a build/availability risk if the import survives retargeting.

Maintainer options:

  1. Retarget Against Current Main (recommended)
    Update the branch on current main so it handles SQLite auth profiles, plugin catalog sidecars, and the removed Pi dependency, then refresh real behavior proof on the merge result.
  2. Choose A Narrower Canonical Fix
    Maintainers can instead sponsor a smaller replacement PR, but it should stay tied to the canonical issue and cover the same root and sidecar credential sinks before this branch is closed.
  3. Accept A Fail-Closed Upgrade Contract
    Maintainers may intentionally accept fail-closed behavior only after explicit upgrade proof shows existing users keep provider auth or receive a clear repair path.

Next step before merge

  • [P1] Maintainers need to choose the canonical security fix shape and require current-main upgrade proof; this is not a safe automated repair lane while the branch is conflicting and storage semantics changed.

Security
Needs attention: The patch is security-sensitive and needs current-main credential-store and generated-sidecar coverage before merge.

Review findings

  • [P1] Retarget legacy key migration to SQLite — src/agents/models-config.ts:273-293
  • [P1] Sanitize plugin catalog sidecars before writing — src/agents/models-config.plan.ts:261-264
  • [P2] Remove the undeclared Pi dependency import — src/agents/models-config.plan.ts:1
Review details

Best possible solution:

Land one maintainer/security-reviewed current-main fix for the generated credential cluster that sanitizes root models.json and plugin catalog sidecars, migrates legacy credentials into SQLite auth profiles, and proves provider auth still works after upgrade.

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

Yes, source inspection shows current main can still serialize provider apiKey strings into generated root and plugin catalog outputs; this read-only review did not run a mutating CLI reproduction.

Is this the best way to solve the issue?

No, not as submitted: the PR is a plausible old-base fix, but the best fix must be retargeted to current main's SQLite auth store and plugin catalog sidecars before it is safe.

Full review comments:

  • [P1] Retarget legacy key migration to SQLite — src/agents/models-config.ts:273-293
    Current main stores auth profiles in the per-agent SQLite database and treats legacy auth-profiles.json as doctor-import state. This PR migrates generated catalog keys through the old local auth-profile path, so a retarget can strip the only generated credential before proving it was durably written to the current store.
    Confidence: 0.91
  • [P1] Sanitize plugin catalog sidecars before writing — src/agents/models-config.plan.ts:261-264
    Current main writes plugin-owned providers into generated plugins/<id>/catalog.json sidecars, but this branch only serializes a sanitized root models.json payload. A current-main retarget must strip or omit provider credentials before both root and sidecar writes, or the key can remain on disk in catalog.json.
    Confidence: 0.9
  • [P2] Remove the undeclared Pi dependency import — src/agents/models-config.plan.ts:1
    The branch imports @earendil-works/pi-ai to identify built-in providers, but current main no longer declares that package. Keeping this import after retargeting would fail module resolution or reintroduce a removed dependency path.
    Confidence: 0.84

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 640258d7b31d.

Label changes

Label justifications:

  • P1: The PR targets provider credential exposure and can break real provider auth during upgrade if migration or sidecar redaction is wrong.
  • merge-risk: 🚨 compatibility: The PR changes generated catalog and legacy credential migration behavior for existing installations.
  • merge-risk: 🚨 auth-provider: The diff changes where provider apiKey material is persisted and how runtime auth must recover it.
  • merge-risk: 🚨 security-boundary: The affected behavior controls whether provider credentials are written into prompt-facing or agent-readable generated files.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body includes useful redacted live output for the PR head, but not after-fix proof for the current-main merge result with SQLite auth profiles and plugin catalog sidecars. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +192, Tests +698, Docs +1. Total +891 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 12 513 321 +192
Tests 3 698 0 +698
Docs 1 2 1 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 1213 322 +891

Security concerns:

  • [high] Credential migration targets stale storage — src/agents/models-config.ts:273
    The PR strips generated provider keys while migrating through the old auth-profile file-era path; on current main the durable auth store is SQLite, so a bad retarget can lose the only local credential or break provider auth.
    Confidence: 0.9
  • [high] Plugin catalog sidecars can keep provider keys — src/agents/models-config.plan.ts:261
    Current main persists plugin-owned provider catalogs separately, and the PR's root-only serialization path does not prove those sidecars are sanitized before write.
    Confidence: 0.89

What I checked:

  • Repository policy applied: Root policy treats provider routing, auth state, persisted preferences, generated config, migrations, and security-sensitive credential behavior as compatibility-sensitive merge surfaces. (AGENTS.md:20, 640258d7b31d)
  • Scoped policy applied: The touched src/agents, src/plugins, and docs guides were read; they reinforce agent test/runtime boundaries, plugin metadata stability, and docs accuracy. (src/plugins/AGENTS.md:11, 640258d7b31d)
  • Live PR state: GitHub reports the PR head 4637af01e2f1bf0212758c7450eeb5ca328b8ba7 as CONFLICTING/DIRTY against base 9c00268914b9c28261bb426fe4691150f99fa48c. (4637af01e2f1)
  • Current main auth persistence: Current main fingerprints and reads auth profile state from the per-agent SQLite database and its WAL, not from a steady-state auth-profiles.json runtime store. (src/agents/models-config.ts:88, 640258d7b31d)
  • Current main SQLite store contract: The auth-profile SQLite adapter stores auth secrets and runtime state in openclaw-agent.sqlite; docs say legacy auth-profiles.json is imported by doctor rather than used as the current store. (src/agents/auth-profiles/sqlite.ts:53, 640258d7b31d)
  • Current main plugin catalog sidecars: Current main splits plugin-owned providers into generated plugins/<id>/catalog.json sidecar writes, so sanitizing only the root models.json payload is not enough. (src/agents/models-config.plan.ts:83, 640258d7b31d)

Likely related people:

  • steipete: GitHub commit history shows major model catalog/plugin-state and SQLite auth-profile refactors that define the current-main storage and generated catalog boundaries this PR must preserve. (role: feature-history owner; confidence: high; commits: 51b5f75b92f7, e16ac0433092, bb46b79d3c14; files: src/agents/models-config.plan.ts, src/agents/auth-profiles/sqlite.ts, docs/concepts/model-failover.md)
  • vincentkoc: Recent GitHub commit history shows auth persistence/export cleanup and provider config helper cleanup around the same model/auth helper surfaces. (role: recent area contributor; confidence: high; commits: e93996378491, 7186f0d65462, e51c0c8cea52; files: src/agents/models-config.plan.ts, src/agents/models-config.providers.secret-helpers.ts, src/agents/auth-profiles/sqlite.ts)
  • eleqtrizit: Current local blame for the central generated catalog, sidecar write, and SQLite auth lines points to the latest main commit that carried these files into the reviewed checkout. (role: recent current-main carrier; confidence: medium; commits: 6ead09230284; files: src/agents/models-config.plan.ts, src/agents/models-config.ts, src/agents/auth-profiles/sqlite.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.

@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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels May 20, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🌱 uncommon Tiny Signal Puff

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🌱 uncommon.
Trait: hums during re-review.
Image traits: location CI tidepool; accessory review stamp; palette moonlit blue and soft silver; mood mischievous; pose guarding a tiny green check; shell matte ceramic shell; lighting calm overcast light; background subtle branch markers.
Share on X: post this hatch
Copy: My PR egg hatched a 🌱 uncommon Tiny Signal Puff in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label May 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 20, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: M and removed size: S proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 20, 2026
@pcdqc

pcdqc commented May 20, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: supplied External PR includes structured after-fix real behavior proof. labels May 20, 2026
@clawsweeper

clawsweeper Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 20, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 20, 2026
@pcdqc

pcdqc commented May 20, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Updated in f8b601bc:

  • upsertAuthProfileWithLock() returning null now aborts before writing the stripped models.json, so the old catalog remains unchanged instead of losing the only provider credential.
  • Added a focused regression test for the null-return path in models-config.write-serialization.test.ts.
  • Updated the PR body to use Refs #11829 instead of auto-closing the broader roadmap issue.

Validation:

  • node scripts/run-vitest.mjs src/agents/models-config.plan.test.ts --maxWorkers=1 --reporter=dot
  • FS_SAFE_PYTHON_MODE=require FS_SAFE_PYTHON=/usr/bin/python3 node scripts/run-vitest.mjs src/agents/models-config.write-serialization.test.ts --maxWorkers=1 --reporter=dot
  • pnpm exec tsc --noEmit --pretty false -p tsconfig.core.json

@clawsweeper

clawsweeper Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@pcdqc

pcdqc commented May 21, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Updated in b23d1d7c:

  • Legacy models.json key migration now creates env-backed keyRef credentials only for known env markers or env names with an observed runtime/config env value.
  • Ambiguous env-shaped plaintext values such as ALLCAPS_EXAMPLE are preserved as inline local auth-profile keys before the prompt-facing catalog is stripped.
  • Added regression coverage for the no-env-signal case and tightened the env-backed regression to provide an explicit env signal.
  • Refreshed the PR body real behavior proof for head b23d1d7c, including env-present keyRef migration and ambiguous env-shaped local-key preservation.

Validation:

  • node scripts/run-vitest.mjs src/agents/models-config.write-serialization.test.ts --maxWorkers=1 --reporter=dot
  • node scripts/run-vitest.mjs src/agents/models-config.plan.test.ts --maxWorkers=1 --reporter=dot
  • pnpm exec tsc --noEmit --pretty false -p tsconfig.core.json
  • NODE_OPTIONS=--max-old-space-size=8192 pnpm exec tsc --noEmit --pretty false -p test/tsconfig/tsconfig.core.test.json
  • pnpm exec oxfmt --check --threads=1 src/agents/models-config.ts src/agents/models-config.write-serialization.test.ts src/agents/models-config.plan.ts src/agents/models-config.plan.test.ts src/agents/auth-profiles.ts src/agents/auth-profiles/store.ts
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/agents/models-config.ts src/agents/models-config.write-serialization.test.ts src/agents/models-config.plan.ts src/agents/models-config.plan.test.ts src/agents/auth-profiles.ts src/agents/auth-profiles/store.ts
  • git diff --check

@clawsweeper

clawsweeper Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper

clawsweeper Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper

clawsweeper Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper

clawsweeper Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@pcdqc

pcdqc commented May 25, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Updated in 66f475aa:

  • Preserves manifest-aware model ID normalization through the prompt-safe stripping path.
  • Preserves plugin registry discovery on PluginMetadataSnapshot while keeping the rebased metadata snapshot compatibility work.
  • Refreshed the PR body real behavior proof for current head 66f475aa with redacted copied live output, including manifest-aware normalization proof.

Validation:

  • node scripts/run-vitest.mjs src/agents/models-config.plan.test.ts --maxWorkers=1 --reporter=dot
  • FS_SAFE_PYTHON_MODE=require FS_SAFE_PYTHON=/usr/bin/python3 node scripts/run-vitest.mjs src/agents/models-config.write-serialization.test.ts --maxWorkers=1 --reporter=dot
  • node scripts/run-vitest.mjs src/agents/model-ref-shared.test.ts src/plugins/discovery-threading.test.ts src/plugins/plugin-metadata-snapshot.memo.test.ts src/plugins/current-plugin-metadata-snapshot.test.ts --maxWorkers=1 --reporter=dot
  • node scripts/run-vitest.mjs src/plugins/plugin-registry-snapshot.test.ts --maxWorkers=1 --reporter=dot
  • pnpm exec tsc --noEmit --pretty false -p tsconfig.core.json
  • NODE_OPTIONS=--max-old-space-size=8192 pnpm exec tsc --noEmit --pretty false -p test/tsconfig/tsconfig.core.test.json
  • pnpm exec oxfmt --check --threads=1 src/agents/models-config.plan.ts src/agents/models-config.providers.normalize.ts src/plugins/installed-plugin-index-registry.ts src/plugins/installed-plugin-index.ts src/plugins/plugin-metadata-snapshot.ts src/plugins/plugin-registry-snapshot.ts
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/agents/models-config.plan.ts src/agents/models-config.providers.normalize.ts src/plugins/installed-plugin-index-registry.ts src/plugins/installed-plugin-index.ts src/plugins/plugin-metadata-snapshot.ts src/plugins/plugin-registry-snapshot.ts
  • git diff --check

@clawsweeper

clawsweeper Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@pcdqc

pcdqc commented May 25, 2026 •

Copy link
Copy Markdown
Author

@clawsweeper re-review

PR body now has current-head real behavior proof for d5f96f1 with copied redacted live output from equivalent tree 4497822feac55fee0e0442f93328e5da0e423cc5.

Current-head local validation passed: models-config.plan.test, models-config.write-serialization.test, models-config.runtime-source-snapshot.test, tsconfig.core typecheck, oxfmt on the touched files, oxlint on the touched files, and git diff --check.

@clawsweeper

clawsweeper Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper

clawsweeper Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@pcdqc

pcdqc commented May 25, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Head: d5f96f123c0968869790ecdb688f02a26b2a8702.

I refreshed the PR body real behavior proof for this exact head after the production write-path fix. Current latest check runs for this head show Real behavior proof, auto-response, and checks-node-agentic-agents passing, with no latest-by-name failures.

@clawsweeper

clawsweeper Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@clawsweeper

clawsweeper Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #clawtributors on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

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

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation 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. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL stale Marked as stale due to inactivity status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: blank-template Candidate: PR template appears mostly untouched.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants