Repository navigation
Conversation
|
Codex review: found issues before merge. Reviewed June 30, 2026, 10:29 PM ET / 02:29 UTC. Summary PR surface: Source -8, Tests +67. Total +59 across 6 files. Reproducibility: yes. Source inspection shows current main serializes provider maps into root and plugin catalog outputs and still treats provider Review metrics: 2 noteworthy metrics.
Stored data model 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 findings
Review detailsBest possible solution: Land one current-main canonical Layer 1 fix that redacts root and plugin-owned generated catalogs while preserving custom-provider and auth-profile upgrade behavior through a safe marker, runtime contract, or tested migration. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main serializes provider maps into root and plugin catalog outputs and still treats provider Is this the best way to solve the issue? No, not as submitted. Stripping plaintext keys is the right security direction, but this branch needs a current-main rebase and an auth-preserving marker or migration path instead of deleting the only loadable credential signal for existing custom-provider/profile cases. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 816038e97a5d. Label changesLabel justifications:
Evidence reviewedPR surface: Source -8, Tests +67. Total +59 across 6 files. View PR surface stats
Security concerns:
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
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Mossy Merge Sprite Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Thanks for the focused redaction work and behavior proof. We’re consolidating this security boundary in maintainer-owned #87166. This branch now conflicts with main, removes compatibility paths that current custom-provider catalog loading still depends on, and predates plugin-owned generated catalog sidecars, leaving the fix one-sided against today’s writer. Closing as a superseded competing implementation; #11829 and #87166 remain open for the canonical solution. |
Summary
apiKeyvalues from existingmodels.jsonduring merge-mode regeneration.models.jsonserialization boundary while preserving env, SecretRef, OAuth, AWS, and local non-secret markers.Fixes #11829.
Verification
pnpm install --frozen-lockfilenode scripts/run-vitest.mjs src/agents/models-config.merge.test.tsnode scripts/run-vitest.mjs src/agents/models-config.providers.normalize-keys.test.tsnode scripts/run-vitest.mjs src/agents/models-config.runtime-source-snapshot.test.tsnode scripts/run-vitest.mjs src/agents/models-config.applies-config-env-vars.test.tsnode scripts/run-vitest.mjs src/agents/models-config.skips-writing-models-json-no-env-token.test.tspnpm exec oxfmt --check src/agents/models-config.merge.ts src/agents/models-config.providers.secret-helpers.ts src/agents/models-config.plan.ts src/agents/models-config.merge.test.ts src/agents/models-config.providers.normalize-keys.test.ts src/agents/models-config.runtime-source-snapshot.test.tsgit diff --checkpnpm lint:coreReal behavior proof
Behavior addressed: generated
models.jsonno longer writes raw provider API key strings where prompt-facing model config can expose them to agents.Real environment tested: local macOS checkout with the repository lockfile installed via
pnpm install --frozen-lockfile.Exact steps or command run after this patch: I ran a live
ensureOpenClawModelsJsoninvocation against a temporary agent directory that already contained a merge-modemodels.jsonrow with a stale plaintext value, then regenerated it with a runtime plaintext value and a SecretRef-managed provider.Evidence after fix:
{ "wrote": true, "openaiApiKeyPresent": false, "moonshotApiKey": "secretref-managed", "stalePlaintextPresent": false, "runtimePlaintextPresent": false, "openaiBaseUrl": "https://stale.example/v1", "providers": [ "moonshot", "openai" ] }Observed result after fix: the generated file omitted the plaintext OpenAI provider key, removed the stale plaintext key from the previous
models.json, preserved the non-secret SecretRef marker for Moonshot, and kept the merge-mode baseUrl behavior intact. All listed tests passed, formatting passed,git diff --checkpassed, andpnpm lint:corereported 0 warnings and 0 errors.What was not tested: full end-to-end provider calls with real API credentials were not run; this patch only changes the generated
models.jsonpersistence boundary and keeps runtime credential resolution on existing env/profile/config paths.