Repository navigation
Conversation
|
Thanks for the inline shape; it is the right place for this check. One finding blocks it as written: The guard treats "no suppression rule for the successor" as "successor not in the installed catalog", which turns valid migrations into destructive clears. At The check needs to ask the catalog/resolution owner whether the successor resolves (catalog membership plus, if you want the auth dimension, an authoritative For context, #156317 addresses the same issue with the correct semantics but currently has a type-export error and an import cycle; whichever PR lands first with the correct check and a test will close #156155, with credit to both of you. |
|
Codex review: blocked before merge. Reviewed September 24, 2026, 2:11 PM ET / 18:11 UTC (Revision 5). ClawSweeper reviewWhat this changesThe branch makes Doctor check a retired model's proposed replacement against the selected route, authentication, runtime, and retirement rules before rewriting saved model references. Merge readiness⛔ Blocked before merge - 3 items remain This remains useful work: current main still rewrites declared retired-model successors without the proposed route-aware guard. The latest commit removes the catalog assumption identified in the previous review. The separate native account-catalog case remains tracked by #156155, and the current-head security approval gate still fails. Priority: P2 Review scores
Verification
How this fits togetherDoctor reads saved model selections during repair and updates. It uses retirement and account-route information to decide whether to preserve or rewrite those selections before the agent uses them. flowchart LR
A[Saved model selection] --> B[Doctor retirement rule]
B --> C[Proposed successor]
C --> D[Selected route and account checks]
D --> E[Retirement check]
E --> F[Keep and warn or migrate]
F --> G[Saved model settings]
Decision needed
Why: The repository's exact-head security gate is failing, and an earlier approval command cannot authorize a later revision. Before merge
Agent review detailsSecurityNone. PR surfaceSource +322, Tests +369, Docs 0. Total +691 across 11 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the route-aware Doctor guard and its existing-state upgrade proof, obtain authorized security approval for this head, and resolve native account-catalog exclusion through the linked issue's authoritative runtime boundary. Do we have a high-confidence way to reproduce the issue? Yes, from source and the linked report: current main rewrites a declared successor without checking its route or retirement state. This read-only review did not execute Doctor. Is this the best way to solve the issue? Yes for the branch's stated route and retirement scope: it checks the context Doctor will preserve and leaves unknown availability nonblocking. Native account-catalog exclusion needs the separate runtime-owned result tracked by the linked issue. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1f0e757498d3. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
…ively unavailable When doctor --fix processes a retired model reference, it resolves the replacement from the manifest suppression rule. A successor that is present in the plugin catalog but unavailable on this install (wrong account tier, region, or plugin version) was previously written silently, producing an unusable model reference that only fails at inference time. Previous attempt (cleared-on-no-suppression-rule) was incorrect: an undefined suppression result means no suppression applies, not that the successor is absent. Valid catalog-only successors like xai/grok-4.7 have no suppression rule but are perfectly valid migrations. Fix: evaluate the successor against the same auth-resolution context that proved the source model's retirement. Only an authoritative negative (availabilityAuthoritative=true, availability=false) blocks migration. Unknown or transient availability (undefined) continues to migrate so the operator can resolve auth after the reference is written. When a successor is authoritatively unavailable, the repair now: - Retains the original reference (rather than clearing to an inherited default, which could silently downgrade to a worse model) - Emits an actionable warning naming the successor, the reason, and how to fix it Fixes openclaw#156155
1fc390f to
343a01b
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep the saved model reference when its proposed successor is retired on the selected route or incompatible with the selected account and runtime settings. Evaluate the settings that repair will preserve without changing the input, while allowing valid migrations during transient cooldowns or unknown readiness. Consolidates openclaw#156317 into openclaw#156435 and repairs its route regression assertion and unused type export. Related: openclaw#156155; native account-catalog exclusion is not established by this change. Co-authored-by: Bruce-Yii <[email protected]> Co-authored-by: Jonathan Sieling <[email protected]>
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
|
/allow-security-sensitive-change |
…essor Add an authoritative installed-catalog membership check to the successor guard so Doctor retains the saved model reference when the proposed successor is proven absent from the installed plugin model catalog. When the provider has catalog entries but the successor model is not among them, Doctor now preserves the original reference and emits a warning naming the absent successor and the required manual step. When catalog membership cannot be determined (no catalog entries for the provider or resolution failure), migration proceeds as before. Addresses the remaining ClawSweeper finding at retired-model-successor-guard.ts:106-110 and the installed-catalog exclusion case in openclaw#156155. Co-authored-by: Jonathan Sieling <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Retain route, account, runtime and retirement checks without treating a missing manifest/config catalog row as native account exclusion. Preserve the contributor follow-up in ancestry and the supported migration behavior. Strengthen the existing config-repair regression; primary/fallback migration, route-scoped allow-list retention and cooldown controls now pass. Native account-catalog exclusion remains open under Refs openclaw#156155. Co-authored-by: Bruce-Yii <[email protected]> Co-authored-by: Jonathan Sieling <[email protected]>
|
/allow-security-sensitive-change |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…penclaw#156435) * fix(doctor): retain with warning when catalog successor is authoritatively unavailable When doctor --fix processes a retired model reference, it resolves the replacement from the manifest suppression rule. A successor that is present in the plugin catalog but unavailable on this install (wrong account tier, region, or plugin version) was previously written silently, producing an unusable model reference that only fails at inference time. Previous attempt (cleared-on-no-suppression-rule) was incorrect: an undefined suppression result means no suppression applies, not that the successor is absent. Valid catalog-only successors like xai/grok-4.7 have no suppression rule but are perfectly valid migrations. Fix: evaluate the successor against the same auth-resolution context that proved the source model's retirement. Only an authoritative negative (availabilityAuthoritative=true, availability=false) blocks migration. Unknown or transient availability (undefined) continues to migrate so the operator can resolve auth after the reference is written. When a successor is authoritatively unavailable, the repair now: - Retains the original reference (rather than clearing to an inherited default, which could silently downgrade to a worse model) - Emits an actionable warning naming the successor, the reason, and how to fix it Fixes openclaw#156155 * fix(doctor): validate retired model successors before migration Keep the saved model reference when its proposed successor is retired on the selected route or incompatible with the selected account and runtime settings. Evaluate the settings that repair will preserve without changing the input, while allowing valid migrations during transient cooldowns or unknown readiness. Consolidates openclaw#156317 into openclaw#156435 and repairs its route regression assertion and unused type export. Related: openclaw#156155; native account-catalog exclusion is not established by this change. Co-authored-by: Bruce-Yii <[email protected]> Co-authored-by: Jonathan Sieling <[email protected]> * fix(doctor): check installed-catalog membership before migrating successor Add an authoritative installed-catalog membership check to the successor guard so Doctor retains the saved model reference when the proposed successor is proven absent from the installed plugin model catalog. When the provider has catalog entries but the successor model is not among them, Doctor now preserves the original reference and emits a warning naming the absent successor and the required manual step. When catalog membership cannot be determined (no catalog entries for the provider or resolution failure), migration proceeds as before. Addresses the remaining ClawSweeper finding at retired-model-successor-guard.ts:106-110 and the installed-catalog exclusion case in openclaw#156155. Co-authored-by: Jonathan Sieling <[email protected]> * fix(doctor): keep catalog hints non-authoritative Retain route, account, runtime and retirement checks without treating a missing manifest/config catalog row as native account exclusion. Preserve the contributor follow-up in ancestry and the supported migration behavior. Strengthen the existing config-repair regression; primary/fallback migration, route-scoped allow-list retention and cooldown controls now pass. Native account-catalog exclusion remains open under Refs openclaw#156155. Co-authored-by: Bruce-Yii <[email protected]> Co-authored-by: Jonathan Sieling <[email protected]> --------- Co-authored-by: Jonathan Sieling <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Bruce-Yii <[email protected]>
Refs #156155
Consolidates #156317
What Problem This Solves
Fixes:
openclaw doctor --fixcan replace a retired model with another retired model or with a model that the selected account, route, or runtime cannot use.User Impact
Doctor now keeps the original saved model reference and reports an actionable warning when the proposed successor is retired on the selected route or is proven incompatible. Supported successors still migrate, and temporary cooldowns or incomplete credential readiness do not block repair.
Why This Change Was Made
Successor validation now uses the same route, account, and agent settings that Doctor will preserve when it rewrites the reference. The check reuses the existing suppression, auth, runtime, and model-policy owners; it does not mutate the input while deciding. Pinned and preferred account selection retain their existing behavior.
The later manifest-membership check is removed: an absent manifest or configured-catalog row does not prove that the selected runtime/account excludes the successor. This keeps catalog hints from blocking valid repairs. Authoritative native account-catalog exclusion remains outside this bounded change; #156155 stays open.
Thanks @Orionation, @Bruce-Yii, and @SundayDriver for the original fixes and investigation.
Related: #156155. A cold Doctor run still lacks an authoritative negative account-catalog fact, so this change does not claim every catalog-exclusion case.
Evidence
Signed corrective checkpoint
54ef3ec36a4d843aa3eb9a5ececedf2398ba35fd(parent7a12d040ce00d12354f3ae52f4d514d707ccfb2c, tree9b2472448647e9fc7d80319a940c02a99e119828) preserves contributor commit7a12d040in its ancestry and returns both affected production files to the exact bytes qualified at646e421b. One existing test is strengthened to exercise primary, fallback, and allow-list repair while the successor is absent from the available manifest and configured catalogs; no test case or production test seam is added.7a12d040, the strengthened config-repair case and both existing cooldown cases fail, while 10 controls pass. The false catalog check retains the retired primary and fallback instead of migrating them.Single-worker Node 24.21.0 cost for the final existing test file: 24.88 s maintained Vitest-shard wall, 22.29 s Vitest duration, and 6.609 s summed case time; the strengthened case takes 0.518 s. The controller observed 25.881 s from command release to joined readback, including its polling, and 1.811 GB sampled peak RSS. The 4.289 s cached worker preparation is included, not added. This is test-process cost, not product startup or turn latency; exact successor-head CI job cost is not available before publication.
Earlier qualification below remains bound to
646e421b; production-byte parity permits reuse of its package/update evidence. No new package build or installed-updater replay is claimed for the corrective commit.646e421bb0407211b2c1b8b74f4d052de696f56dhas parent343a01bde6c58e49bbb7f0fab75045d973ab4f8dand tree8bd1be57a501dc24c063c42b6cfb6d45c95f5ee7. The exact package artifact SHA-256 isfae38a8770b327277ed247ce13b3ddeee69ed66cef7aecbec82740056646bdc3.5ba069a96a78cb220f3e03a321517764c56f856eb29e5bc8a982fa3ab454236b. Outer lifecycle receipt SHA-256:253cf95041bed846a6589b410ef918d8a16a4427516b9c422bd2dbad8b3dd2d0.Earlier proof attempts are retained as evidence. An unconditional-suppression fixture correctly failed validation; a route-conditioned fixture then completed the real update but exposed an overstrict immediate-migration assertion until the route was explicitly configured. Two later readback harness assertions failed only on warning-stream placement and authored-versus-effective defaults after all behavioral commands had passed. The final readback corrected those assertions without repeating the package update.
The failed-fixture path also exposed a separate published-2026.9.4 recovery limitation: the old recovery code cannot parse a newer candidate-only migration marker in private rehearsal state. This PR does not fix or claim proof for that recovery path.
No configuration schema, dependency, permission, or release change is included.