Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 12, 2026, 9:01 AM ET / 13:01 UTC (Revision 13). ClawSweeper reviewWhat this changesAligns model pickers and execution with allowed effective defaults, preserves delivered recovery notices in shared history, and requires interactive consent before Doctor broadens generated allow lists. Merge readiness⛔ Blocked before merge - 7 items remain Keep open: the recovery behavior remains absent from main, and the previous channel-default finding is addressed. No new blocking defect was established in the inspected paths, but the explicitly retained compatibility and integration acceptance gates remain unresolved. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw combines configured model preferences with provider catalogs to determine picker choices and execution defaults. Gateway, channel, and native clients consume those decisions, while session storage preserves model pins and delivered recovery explanations. flowchart TD
A[Model preferences and allow lists] --> C[Shared model selection policy]
B[Prepared provider catalog] --> C
C --> D[Gateway and client pickers]
C --> E[Reply and compaction execution]
E --> F[Delivered recovery explanation]
F --> G[Guarded transcript and receipt]
A --> H[Doctor consent and repair]
Decision needed
Why: The captured PR explicitly reserves acceptance to its named review and orchestration owners; retained earlier proof does not certify all final-candidate compatibility obligations. Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Mantis proof suggestionCurrent browser chat controls and shared recovery-history rendering remain explicitly unverified in the captured checkpoint. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one shared selection and publication owner, preserve stored preferences, and certify the final candidate against published upgrades and supported plugin/native consumers. Do we have a high-confidence way to reproduce the issue? Yes: configured missing primaries and excluded stored pins provide concrete reproduction paths supported by current source and retained before/after Gateway and Telegram observations; this read-only review did not execute them. Is this the best way to solve the issue? Yes at the owner level: sharing selection facts and guarded transcript publication addresses the inconsistencies without another policy implementation, subject to the retained compatibility acceptance gates. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4e283f6de8b1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
d6079d1 to
3657191
Compare
e141992 to
2f3df13
Compare
Run blocked session pins on the configured primary and publish one policy notice after delivery. Preserve pin state, exact transcript ownership, and primary-only compaction. Complete shared catalog, native localization, and migration contracts after the main rebase.
2f3df13 to
9f07a23
Compare
|
Closing this without merging. Verified on today's main through the real product: the web picker offers a fallback the allow list forbids and then rejects the click, and a removed primary is still offered as an enabled Default. The Doctor guidance problem did not reproduce (Doctor asks first and leaves the config unchanged). Two real defects do not need 254 files and +9.7k lines; a small fix at the shared permitted-catalog owner follows as its own PR. The branch stays. |
Problem and behavior
A configured fallback could appear in a picker even when the allow list rejected it. An absent authored primary could be labeled Default and sent to the provider. A recovery explanation delivered in Telegram could be absent from shared web history while its receipt suppressed another explanation. Manual compaction could also apply the missing primary's credential profile to a replacement from another provider and fail before making a request.
This change publishes one permitted catalog and effective default, stores a delivered recovery explanation in its existing assistant row, and requires a separate interactive choice before Doctor broadens an old generated allow list.
Ayaan reviews. Landing remains gated on the independent census verdict ACCEPT and the orchestrator grant.
allcovers allowed pages; explicit CLI/RPC inventory remains separate.No new database table, migration, schema version, authored config option, dependency, endpoint correction, or wire version is introduced.
Validation checkpoint
Candidate
1989d38e6fe0ed19231710f734fe19fd771c173bkeeps this as one PR. Its production code is byte-identical to built and tested parent998ff128b8c3d046a8757c2d4ea1b68d62b85afc; the final commit corrects two test assertions. The head is frozen for the independent census verdict.The latest correction fixes three production-entry failures:
a635eacb, a realchat.sendmodel-list command omitted the usable replacement's Default label. Channel projection now carries the effective default to labels, reset, selection, and native command choices while retaining the authored diagnostic.agentExecCommandconstruction regression failed on the prior integration and passed onb25510f1. The effective-default resolver replaced a valid registered process backend before admission. Canonical CLI-provider recognition now preserves that backend's model authority; the original regression passes without changing its assertions.Scoped formatter and lint checks passed. Targeted Telegram, Discord picker/options/autocomplete, Mattermost, and registered CLI-backend checks passed. The first new autocomplete fixture omitted the runtime-config publication used by registered handlers; the corrected setup preserves the exact expected choice and passes alone and in its file's original order. An independent read-only review found no actionable issue in the 19-file correction. The real Gateway/CLI missing-primary and reset matrix passes all three cases; the compaction/auth matrix passes both cases. Doctor passes six of seven cases. The retained deprecated-only negative fails for the independently proved base-owned reason below; Ayaan explicitly directed that it not block publication.
Retained live proof on
a635eacbdemonstrates authored-typo and withdrawn-model recovery through Telegram and web-facingchat.send, with recorded fake-provider requests using the effective default. First Telegram recovery notices appear in shared web history, survive reconnect/restart, and are not repeated by later web or Telegram replies for the same pin. The earlier original-defect base proof and failed attempts remain retained; these later controls do not replace them.The built integration
0e676708b602439b65430a7b0c66472f547f7ed4also includes the separate login-lifecycle repair. Real Telegram login on the accepted API endpoint publishes a previously unknown row, permits selection and a fake-provider reply, and logout removes availability. The subscription-endpoint declaration gap remains separate work. This does not claim that the unmodified subscription endpoint works.Additional integration contention proof holds Telegram's successful send acknowledgment for 20.904 seconds. During that hold, an unrelated session edit finishes in 14 ms, shared history in 42 ms, catalog read in 48 ms, and allow-list config edit in 1.13 seconds. After release, one shared notice remains through a web reply and restart, without a duplicate answer.
A separate later-release observation found no automatic provider request or new row during 190 seconds. An explicit refresh against a seven-second fake provider exceeded the existing discovery budget and retained the prior rows with a failure status. Thirteen catalog reads during that request took at most 8 ms; thirteen session reads took at most 2 ms. This proves responsive published reads during slow discovery, not successful later-model publication or a browser-open timing. The fast later-release and current browser controls remain due.
Earlier narrow SDK checks, 17-config startup corpus results (including the approved invalid legacy-api rejection), and registered receipt/compaction cases retain their exact source identities. They do not substitute for the outstanding final published-updater, complete older-plugin/native, typed-reference, and integration-tree gates. Prior full CI at
a635eacbfailed Android formatting and the now-repaired construction case; the dependency check passed on its one infrastructure retry. New-head CI remains required.Consumers
allowsByList, primary exceptionsrc/agents/model-selection-shared.ts; compositionsrc/agents/model-visibility-policy.ts; public facadesrc/agents/model-selection.ts; selection resolversrc/agents/model-selection-resolve.tsmodel-selection-shared.tsownsresolveSubagentConfiguredModelSelection;model-selection-shared.tsownsresolveConfiguredModelPrimaryValue;src/agents/model-selection-config.tsresolves defaultssrc/agents/model-selection.ts,src/agents/prepared-model-runtime.configured.ts,src/agents/subagents/spawn/subagent-spawn-plan.ts, andsrc/config/codex-plugin-diagnostics.ts. The facade retains its public export; there is no duplicate implementation.configured-model-entries.ts,session-model-ref.ts, directive defaults/model; shared projection insrc/gateway/session-utils-model.ts,session-utils-projection.ts,session-utils-row.ts,session-utils-contracts.tssrc/agents/model-catalog-visibility.tsproduces{ entries, allowList? }; preparation evaluates availability before selection filteringsrc/gateway/server-methods/models-list-result.ts,src/auto-reply/reply/commands-models-catalog.ts,src/flows/model-picker.ts, andsrc/commands/doctor/shared/model-policy-allowlist-repair.ts. Earlier source searches found no remaining production references to the retiredvisibleCatalogpolicy method orModelCatalogAuthCheckersurface; the current CI merge-tree census must verify that disposition.resolveEffectiveDefaultModelinsrc/agents/model-visibility-policy.ts; lower-level policy inmodel-selection-shared.ts; reply and command selectors;model-catalog-view.ts; Gateway default tags; default directiveseffectiveDefault: { ref, missingPrimary? }separates executable selection from authored configuration. The synthetic missing-primary row is removed. Replacement requires captured existence and allow-list membership. Native inventory uncertainty,authoritative: false, andrefreshFailedpreserve prior admission. Config inspection retains the authored ref.createModelCatalogIdentityKeyResolverinopenai-model-routes.ts; local resolvers in shared allowed-set, configured-catalog, and visibility-policy constructionModelCatalogSnapshot.resolvedConfiguredModelRefs; writersprepared-model-runtime.configured-catalog.tsandprepared-model-runtime.full-catalog.ts; refresh projectionprepared-model-runtime.catalog-access.tscreateFullModelCatalogAccessreplaces projected configured refs from the current prepared generation; the duplicate build-module implementation is removed. No second cache, database field, or client projection is added.packages/gateway-protocol/src/schema/agents-models-skills.tsdefineshiddenCount,settingsPath, optionalselectedModelBlocked, and optionalModelsListResult.allowListsrc/gateway/server-methods/models-list-result.tspublishes facts;chat-metadata-contract.ts,chat-metadata-session-projection.ts, andchat-metadata-runtime.tscarry them into chat and startup metadata.settingsPathis a config-key hint, never a storage path. No wire version or database schema version changes.src/gateway/server-model-catalog.tsand.types.ts;chat-metadata-session-projection.ts;chat-metadata-runtime.ts;chat-startup-projection-contract.ts;chat-history-handler.tsmanifestPluginsfrom the same owner. History reuses the startup pair or the existing passive prepared reader, before its current-session/sharing recheck. Display entries alone do not establish absence. Current selection still owns the blocked overlay; no raw snapshot or new field is spread onto the wire.src/gateway/session-utils-list.tspasses its per-agent prepared map tosession-utils-search.ts;server-methods/sessions-list-cache.tsowns the existing cache fenceui/src/pages/chat/chat-state-host.ts,chat-state-page.ts,chat-state-refresh.ts,chat-pane-session-controls.tscomponents/chat-model-controls.tsavoids adding the blocked pin as a selectable row.components/chat-model-picker.tsrenders hidden/empty/blocked guidance and the existing settings action.ui/src/lib/chat/model-select-state.tsprefers the published default tag, then existing agent/session defaults.ui/src/pages/new-session/model-control.tssrc/auto-reply/reply/commands-models.tsthroughextensions/telegram/src/bot-handlers.callback-router.tsandextensions/telegram/src/model-buttons.tscommands-models-catalog.tsuses the capturedowner.metadataSnapshotand existingdecisions.evaluateEntry; Telegram callback router/model keyboard and Mattermost provider/page renderer consume existing provider noticesextensions/discord/src/monitor/model-picker.view.ts;native-command-model-picker-ui.ts;native-command-model-picker-interaction.tsapps/android/app/src/main/java/ai/openclaw/app/GatewayModelCatalog.kt; catalog parsing;chat/ChatController.ktNodeRuntime.ktandMainViewModel.ktexpose the state.ui/chat/ChatScreen.ktrenders the notice and retains the reset action. No device-rendering result is inferred from source.apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift;OpenClawChatUI/ChatGatewayPayloadCodec.swift;ChatTransport.swift;ChatSessions.swiftChatViewModel+ModelControls.swiftpublishes facts, formats notices, and resolves catalog defaults;ChatViewModel.swiftclears session-owned state.ChatComposer+Controls.swift;ChatComposer+CleanControls.swift;apps/ios/Sources/Design/ChatModelControlsMenu.swiftui/src/i18n/locales/en.ts;scripts/lib/control-ui-i18n-catalog.ts;ui/AGENTS.mdinternationalization rulesapps/.i18n/native-source.json;scripts/native-app-i18n.ts;.github/workflows/native-app-locale-refresh.ymlNativeStringResources.kt, Androidvalues*/strings.xml, native locale artifacts, and AppleLocalizable.xcstrings.verifychecks source inventory/platform wiring;checkalso checks locale/generated state. Missing fresh translations are pending generated work, not a runtime failure:NativeStrings.ktformats unmapped English source. English projection and final generated-locale checks still need their own evidence.src/auto-reply/reply/model-selection.ts;get-reply-directives-apply.ts; forwarding throughget-reply-directives.ts,get-reply.ts,get-reply-native-slash-fast-path.ts,get-reply-run-execute.ts,queue/types.ts;directive-handling.impl.ts,.model.ts,.model-selection.ts/model default;effectiveDefaultRefdrives default tags.missingConfiguredPrimaryis turn-local. Authorized model changes clear pending recovery state./modeland/modelsremain recovery paths when no allowed default exists.agent-runner-run-params.ts;agent-runner-run.ts;agent-runner-execution.ts; embedded/CLI/fallback candidate adapters;agent-runner-memory.ts;embedded-agent-runner/run-entry.ts;model-fallback-runner.ts;model-fallback-candidates.tssrc/agents/agent-command.ts;command/model-selection.ts;command/model-selection-auth.ts;command/session-transcript.ts;command/run-embedded-attempt.ts;command/post-run.ts;command/delivery.ts; reply auth inget-reply-run-admission.tsmanifestMetadataSnapshotstill reachesresolveCommandSessionAuththrough the selector. Existing transcript persistence supplies the actual assistant ID; output/delivery acknowledgments use the shared publication owner.src/auto-reply/reply/get-reply.tsparses the configured heartbeat ref and profile suffix, then forwardsconfiguredProfileIdonly while provider/model still match the runget-reply.tsandget-reply-native-slash-fast-path.ts→handleInlineActionsinget-reply-inline-actions.ts→HandleCommandsParamsincommands-types.ts→commands-compact.ts; runtime ownerscompact.types.ts,compact.ts,compact.queued.ts,compaction-runtime-context.ts,compaction-runtime-preparation.tsmissingConfiguredPrimaryfact. During missing-primary recovery, compaction does not copy the absent authored primary's auth-profile suffix onto the effective default; an available authored primary retains its explicit profile.useSelectedModelstill excludes the configured compaction override and fallback ladder. Actual native bindings remain refused before cross-runtime compaction. A notice requiressessionCompaction.compacted === true. No new policy decision or persisted fact is introduced.src/auto-reply/reply/model-policy-notice.ts;src/config/sessions/types.ts;src/sessions/model-overrides.ts;session-snapshot-merge.ts;src/plugins/session-entry-slot-keys.ts{sessionId,pinnedModel}receipt operation. The receipt requires successful delivery, exact transcript persistence/publication, and current authority. Errors/silence do not consume it. Existing selection-change clearing and stale-snapshot protections remain.src/auto-reply/reply/model-notice-publication.ts; existing callback metadata inreply-payload.tsandsrc/infra/outbound/payloads.ts; consumersdispatch-from-config.finalize.ts,chat-send-reply-dispatch.ts,chat-send-reply-finalization.ts, command deliverybindModelNoticePublicationandpersistModelNoticeTranscriptown one composed notice and one pending publication. Defer/wait/settle functions move here from the formatter. Channel/direct acknowledgments and Gateway finalization use that owner; follow-up admission joins completion. Failed cleanup releases waiters without recording delivery or retrying the same persistence attempt.src/config/sessions/transcript-assistant-rewrite.ts;session-accessor.sqlite-transcript-write.ts;chat-send-reply-dispatch.ts;chat-send-source-finalization.ts; remaining Gateway adapters inchat-transcript-persistence.tssrc/commands/doctor/shared/model-policy-allowlist-repair.ts;doctor-config-flow.ts;doctor-prompter.ts;doctor-repair-mode.ts;doctor/finalize-config-flow.ts; normal config writerAuthProfileMigrationRequiredErrorbecomes a visible deferred-inspection warning with unchanged config; other failures propagate. Historical metadata identifies an offer, never consent. Exact before/after policy and separate interactive consent still precede admission to the existing write plan. Generic repair may perform other authorized repairs but cannot accept wildcard expansion.src/config/model-policy-allowlist-migration.ts;src/config/io.meta.ts; schema/type/label consumers inzod-schema.root-shape.ts,types.openclaw.ts,schema.labels.tscommands-models.tsretains published-owner lookup, parsing, rendering, and dispatch;commands-models-catalog.tsowns the private projection, runtime-choice and readiness-menu builders;commands-models.types.tsowns their shared typesagent-run-execution-phase.ts→agent-run-dispatch.ts→agent-command.ts;command/model-selection.tsandcommand/run-embedded-attempt.ts;prepared-model-catalog.tscommandRuntimeContext.configreaches exact catalog reads ascatalogOwnerConfig. Resolved commandcfgstill controls policy, secrets, native augmentation, execution, and delivery. Initial and fallback thinking reads use the same identity. Exact-config matching stays enforced; other callers omit the field and retain existing behavior.ReplyPayloadMetadata.hostFinalReply; sole writerembedded-agent-runner/run/settled-turn-finalization.ts; sole selectorgateway/server-methods/chat-send-source-finalization.tspublishAssistantTranscriptRewriteinconfig/sessions/transcript-assistant-rewrite.ts; notice publication plus existing keyed/media/source rewrite callerssession-utils-model.tsinlines its sole-caller thinking-level forwarding helper;directive-handling.impl.tsuses one complementary persistence branchmanifest-model-id-normalization.types.tsowns the normalization-source type;command/session-helpers.tsownssettleAgentPrimaryProbe;compact.queued-execution.tsownsbuildCompactionContextEngineRuntimeContext;doctor-config-analysis.tsowns the internal-hook warning helperPhysical transcript identity consumers
src/agents/sessions/agent-session-base.ts; event typesrc/agents/sessions/agent-session-types.tsagent_startclears it; each assistant append replaces it, including absence after suppression;agent_endemits it. This is existing producer behavior, now consumed by reply reconciliation.src/agents/session-tool-result-guard.tssrc/agents/embedded-agent-subscribe.handlers.types.ts;embedded-agent-subscribe.handlers.lifecycle.ts;embedded-agent-subscribe.types.ts;embedded-agent-subscribe.tssrc/agents/embedded-agent-runner/run/attempt-stream-prepare.tssrc/agents/embedded-agent-runner/run/attempt-result.ts; callerattempt-settle.ts; result typerun/types.tscompleteEmbeddedAttemptResultcaptures identity before output-hook reentry. Runtime ownership follows the completed assistant independently of physical persistence.src/agents/harness/types.ts;harness/settled-turn-finalization-result.ts;src/agents/embedded-agent-runner/run/settled-turn-finalization.tssrc/plugin-sdk/agent-harness-runtime.ts;src/agents/harness/builtin-openclaw.ts;extensions/copilot/harness.ts;docs/plugins/sdk-agent-harness/sessions-and-results.md9f07a237, and the public type/projection/export are unchanged inf3213191. This closes the optional-field compatibility concern while leaving complete bundled-plugin loading and broader previous-state behavior separate.src/agents/embedded-agent-runner/run/terminal-preparation.ts;run/payloads.ts;src/auto-reply/reply-payload.tsrun/paths in this row are undersrc/agents/embedded-agent-runner/.src/agents/embedded-agent-runner/run/incomplete-turn-classification.tscaptureAssistantTranscriptRewriteStartinsrc/config/sessions/transcript-assistant-rewrite.ts; callersagent-runner-execute.ts,command/run-embedded-attempt.ts; custody throughagent-runner-fallback-candidate.ts,agent-runner-fallback-cycle.types.ts,agent-runner-execution.types.ts,agent-runner-execution.ts,agent-runner-result-payloads.tssettledWriterremains internal and separate from compaction counting. Direct commands use their existing retained settlement fact.CliHistoryWriterinsrc/agents/cli-runner/history-boundary.ts;cli-runner.ts→bindCliRunSettledWriterin newcli-runner/settled-writer.ts; copy consumerscli-runner/run-diagnostics.ts,agent-runner-cli-dispatch.ts; readeragent-runner-cli-candidate.tssrc/gateway/server-methods/chat-send-reply-dispatch.ts;chat-send-reply-finalization.ts; existing writer-delivery metadata insrc/auto-reply/reply-payload.tssrc/config/sessions/transcript-assistant-rewrite.ts;src/config/sessions/session-accessor.sqlite-transcript-write.ts; Gateway keyed/mirror adapters inchat-transcript-persistence.tsHistorical source searches covered
src/,extensions/,ui/,apps/,docs/, andpackages/. Their terminal-identity, private CLI-custody, and retired-symbol findings remain in the retained evidence. The current lexical merge-tree dispositions are listed below; typed-reference execution and final gate reconciliation remain pending. Earlier searches exempt no current match or new caller. The consumer tables above remain the contract inventory to check.Lexical census dispositions on the current integration tree
Fresh source review covers all 35 reported locations on merge
0e676708b602439b65430a7b0c66472f547f7ed4, tree85b9d0476cbc332c405a81bc1ac609115c68f8a6. Counts include declarations, imports, and test labels, not only executable calls. No stale consumer was found in this inventory; typed-reference coverage is a separate pending gate.includeAgentPrimary:src/agents/model-selection-shared.ts:47,53owns the unchanged optional boolean;src/agents/model-selection.ts:281,288exposes and forwards it;src/agents/prepared-model-runtime.configured.ts:342deliberately excludes the already-prepared agent primary.ManifestModelIdNormalizationSource: type imports/uses moved to the declaration leaf atsrc/plugins/manifest-model-id-normalization.types.ts:7; consumers aresrc/agents/model-ref-shared.ts:16,29,src/gateway/server-methods/chat-startup-projection-contract.ts:2,19, andsrc/gateway/server-model-catalog.types.ts:3,11. The original normalizer's migrated import/use atsrc/plugins/manifest-model-id-normalization.ts:7,21was also inspected; the scanner excludes that removed-declaration file, so these two are additional to its seven locations. The record and owner-map shapes are unchanged.publishAssistantTranscriptRewrite: the sole declaration issrc/config/sessions/transcript-assistant-rewrite.ts:166.src/auto-reply/reply/model-notice-publication.ts:8,169imports it and checks the result with current authority before a receipt. Migrated callers aresrc/gateway/server-methods/chat-send-reply-dispatch.ts:25,425,476andsrc/gateway/server-methods/chat-send-source-finalization.ts:7,388; their existing media/source paths await publication without interpreting its boolean as delivery acknowledgment. The deleted Gateway declaration has no caller.resolveSubagentConfiguredModelSelection: sole owner/caller atsrc/agents/model-selection-shared.ts:44,66; preserved facade import/export/call atsrc/agents/model-selection.ts:38,50,285; runtime preparation atsrc/agents/prepared-model-runtime.configured.ts:43,339; spawn provenance atsrc/agents/subagents/spawn/subagent-spawn-plan.ts:12,96; diagnostics atsrc/config/codex-plugin-diagnostics.ts:22,103; test import/label/cases atsrc/agents/model-selection.test.ts:33,3185,3209,3225. Precedence and string/object normalization remain unchanged; one implementation serves every reader.census: generic includeAgentPrimary reviewed — 5 callers listed
census: generic ManifestModelIdNormalizationSource reviewed — 7 callers listed
census: generic publishAssistantTranscriptRewrite reviewed — 8 callers listed
census: generic resolveSubagentConfiguredModelSelection reviewed — 15 callers listed
The removed
mergePreparedConfiguredCatalog,ModelCatalogAuthChecker, andrewriteAssistantTranscriptMessageByTurnIndexAndMedianames have no remaining match on this integration tree.Effective-default and Doctor completeness correction
ModelsProviderData.effectiveDefaultis a captured policy fact: an object names the usable default, explicitnullmeans none, and absence identifies an older producer. The required authoredresolvedDefaultconstruction shape remains unchanged.commands-models-catalog.tswrites the fact and Default names;commands-models.tsconsumes it for list text. The SDK barrels continue exporting the same type without a new mandatory runtime import.applySessionModelSelection; it no longer recomputes the default from raw config. Existing session pins and compatible auth profiles keep their own state owners.model-picker.runtime.tsadapts old-field absence. Its view consumes the result for Default text, reset, and recents; its interaction owner consumes it for navigation/reset/recents; its UI owner consumes it for current selection and native argument/autocomplete context. The apply owner reports success only after observed selection matches. An absent selection gets visible text, never a sentinel model id. Default retains its reserved recent slot when absent.resolveEffectiveDefaultModelreuses canonicalisCliProviderto recognize registered process backends separately from harness policy. Agent command selection, auto-reply/reset, catalog projection, and compaction consumers retain the same policy owner. A nonempty native catalog still establishes model withdrawal; a host-only inventory cannot establish that a process backend removed a model.prepareDoctorModelPolicyAllowlistremains called bydoctor-config-flow.ts. It acquires the existing scoped read-only live catalog for relevant enabled providers and feeds that same snapshot to decisions, visibility/counts, and diagnostics. Failed/pending/incomplete catalog outcomes defer inspection. Replace-mode authored inventory retains its existing path. No catalog-owner API, storage schema, migration, config key, or protocol version changed.ModelsProviderData. The SDK compatibility guide documents old producer absence versus explicit null.Invalidation
src/gateway/server-chat-metadata-lifecycle.ts;chat-metadata-runtime.tscompares config, owner/catalog identity, plugin version, auth revision, and skills versionserver-chat-metadata-lifecycle.tswaits for coherent prepared-owner publication, then invalidates and refresheschat-metadata-runtime.tscarries current selection plus the captured snapshot/manifest pair; shared session projection handles unpinned defaultssessions-list-cache.tsfence; per-responseSessionListRowContext;session-utils-list.ts→session-utils-search.tsrefreshFailed, and resolved-configured-ref identity. The live status value must be read even if object/row identities are stable. Unchanged facts still reuse the cache. Search receives the same per-agent map, preserving recorded history but not attributing an absent or stale authored model to an unrun session.chat-state-refresh.ts; AndroidChatController.kt; AppleChatViewModel.swift; new-session metadata scopemodel-policy-notice.tsreceipt writer;model-notice-publication.tspublication; existing model-override clear and snapshot-merge ownerstranscript-assistant-rewrite.ts; runtime-issued embedded/CLI writer facts;model-notice-publication.tsmodel-fallback-candidates.tsincludes the canonical missing ref in its existing cache key; explicit model switches clear the turn factmissingConfiguredPrimaryfrom model selection, forwarded through ordinary and native-slash inline actions tocommands-compact.tsf3213191, including exact provider credentials and unchanged stored user pin.Contention
refreshTail, pending generation, replacement gate (chat-metadata-runtime.ts)commands-models-catalog.ts)compact.queued-execution.ts)SQLITE_SESSION_WRITER_QUEUES, keyed by store path (session-accessor.sqlite-scope.ts)patchSessionEntryCoreand holds the store write queue during preparation. Its updater is synchronous, then a short SQLite write transaction revalidates the lifecycle snapshot (sqlite-entry.ts). No provider request is part of the receipt callback. A competing session edit must still be measured while delivery settles.transcript-assistant-rewrite.ts;session-accessor.sqlite-transcript-write.ts)src/config/write-lock.ts;src/config/mutate.ts)config.patch, normal config writes and include-owned editsmodel-notice-publication.ts;dispatch-from-config.finalize.ts)f3213191. Final live/concurrent-session latency proof remains separate.Earlier measured concurrent proof: models.list client calls finished in 877 ms and 902 ms while a seven-second fake-provider turn was active; server method times were 5–6 ms. The config CLI finished in 2046 ms, including process startup, and reported a live reload without restart. Warm picker opening took 33 ms. These results retain their original captured identity; they do not certify contention introduced by the later shared-publication correction.
Tests
Retained base-owned Doctor failure
test/doctor-model-allow-list.e2e.test.tskeeps does not offer a change for deprecated-only exclusions, including its expected no-offer result. It is not skipped or inverted. Live catalog assembly loses the installed manifest's deprecation metadata, so Doctor counts those entries as hidden. The same catalog defect reproduces on baseb25510f18d403bc274ebad9a3bb03f6af6040fc9and tested candidate998ff128b8c3d046a8757c2d4ea1b68d62b85afc.Base reproduction uses the same recording endpoint and fake credentials at the declared provider host:
openclaw config set agents.defaults.modelPolicy.allow '["mistral/*"]' --strict-json, followed byopenclaw models list --refresh --json(default view, no--allor provider filter). Both CLI commands exit 0 but the list exposes the two deprecated entries; the diagnostic asserting their exclusion exits 1 on both base and candidate. The complete-roster Doctor control permits every active entry and excludes only those two entries, still producing the unwanted offer while leaving config bytes unchanged.Independent source and raw-evidence review confirms this is a pre-existing catalog-owner defect. Ayaan assigned it to a separate queue item and explicitly authorized publication with this failure retained. It is not part of this PR's repair scope or a claimed pass. The final verdict, exact-head review, and merge grant remain required.
test/doctor-model-allow-list.e2e.test.ts1703e9c6and exactf3213191; interactive accept/decline proof is retained separately.test/model-policy-compact-auth.e2e.test.tschat.send /compactwith recorded provider requests: missing cross-provider primary and available explicitly pinned primary. Requires successful compaction through the effective default's credentials and preservation of the stored user pin. The missing-primary case is red on9f07a237, its valid-primary control is green, and both passed at exactf3213191.test/model-default-missing-primary.e2e.test.tsf3213191. Realchat.send, config CLI,chat.history,models.list,sessions.list, andagent --local: typo, withdrawn primary, blocked pin, provider request identity, delivered notice/default tags, null no-replacement defaults, and used/unrun search behavior.test/model-policy-receipt.e2e.test.tsf3213191. Registered Gateway turns, config edits, history, restart, and media: exact ordered rows, one notice, and preserved pin.test/model-policy-telegram-history.e2e.test.tsf3213191. Real registered Telegram webhook and Bot API fixture: text/photo shared history plus two HTTP 403 cases. Failed notice delivery remains retryable; a separate later diagnostic failure preserves a delivered/persisted notice receipt. Fresh retries and restart retain exactly one notice. This is channel-boundary fixture proof, not a live account or partially delivered message-chunk claim.src/commands/agent.test.tsagentCommanduses the real run-attempt handoff for the receipt case. The model double persists through the supplied user recorder and assistant append owner, returns the physical ID, and retains exact pin/auth and two-assistant-row assertions.src/agents/openclaw-tools.session-status.test.tssession_status.execute: no authored primary plus an exact list must reject the excluded stored pin, make no write, then accept/persist an allowed replacement. Rejected intermediate source and three-state proof remain retained.src/gateway/server-methods/chat.abort-live-proof.test.tssrc/gateway/server-methods/chat.directive-tags.test.tschat.send: physical/key identity, missing identity, queued writer/lifecycle revocation, changed-pin refusal, post-receipt rotation, genuine host-finalized fallback, and stale-writer refusal. The changed-pin case requires unchanged canonical transcript/watermark and no stale visible final. Ten selected authority cases passed on the corrected working snapshot.src/agents/agent-command.live-model-switch.test.tsui/src/e2e/chat-model-controls.e2e.test.tssrc/agents/subagents/spawn/subagent-spawn.production-boundary.test.tssessions_spawnthrough Gateway agent admission and command execution: descendant lineage/authority and one actual model invocation. The test is unchanged by catalog identity handoff.Test deletion and revision ledger
delivery.test.tscase “shows the blocked-pin notice once after CLI output without changing the pin.” Its in-memory payload had no owned transcript, so output alone could not validly consume a receipt. Registered Gateway/Telegram receipt tests and the corrected realagentCommandreceipt case cover delivered, persisted explanations.sentBeforeErrortests remain. Channel proof does not certify direct CLI partial-send indexing or partial message chunks.agent-runner.misc.runreplyagent.test.tsretains primary execution, unchanged native pin/profile, no inherited native authority, and no fallback ladder. Its nonpersisting runtime must leave the receipt absent even after acknowledgment; the next notice remains eligible.needsModelCatalogfixture fields and obsolete comments are removed; existing degraded-catalog and no-second-discovery checks remain.prepared-model-catalog.ts, the module that owns the read. The unused full-catalog tripwire is removed. Assertions now require one exact read-only prepared lookup, while provider-scoped thinking reads retain capability behavior. The initial fixture failures and intermediate full-suite failure remain recorded; the corrected full suite passed 136 cases.f3213191after the missing-primary case failed at9f07a237.Removed coverage: exact dispositions
model-selection.test.ts: “keeps literal wildcard rows and exact entries with the first duplicate's metadata”; finalvisibleCatalogassertion in “exposes wildcard allow and visible catalog behavior through one policy”allowedCatalogretains literal identity/metadata and wildcard permission checks.model-catalog-visibility.test.tsand registeredmodels.listown publication. Synthesizing an undiscovered exact entry into a picker is retired.doctor-config-flow.test.ts: “preserves %s provenance across repeated config writes”io.meta.test.tsandio.write-config.test.ts; older-writer proof retains its actual identity.sessions-patch.test.ts: separate target-agent and global-subagent-primary allowance casesget-reply-native-slash-fast-path.test.ts: local typing stub and repeated defaultssessionCompaction.compacted; no behavior assertion is removed.model-policy-notice.test.ts: in-memory successful receipt and stale pin/session write testsagent-command.live-model-switch.test.ts: unused full-catalog tripwire and zero-prepared-read expectationsUpdate and previous-state behavior
Update and noninteractive Doctor must preserve the allow list. Only a separate interactive choice can accept the displayed wildcard proposal. Generic authorized Doctor repairs may still update unrelated metadata or skills.
Retained installed-driver evidence used the actual
2026.9.3updater against candidateb06415ce9ef6431cfb3b4fc00545324aca4e1f85:installed-upgrade.jsonrecords exit 0, completed canary/activation/verification, and a byte-identical allow list/config in that fixture. Its--no-restartrun does not establish running-session continuity, every operator shape, or compatibility of the latest candidate. The six SDK helper/type cells at9f07a237establish only the narrow ownership/identity contract described above. Final published-driver, previous-state, and complete plugin-loading evidence remain due.Remaining validation
The remaining proof limits above stay visible to the verdict lane. Under Ayaan’s updated sequence, this signed head is published now and remains frozen while the independent census verdict runs. Verdict corrections precede the final body and one exact-head local review. Current CI merge-tree census and structural receipts remain required for landing. Only the orchestrator supplies the merge grant; this publication does not merge the PR.