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: needs maintainer review before merge. Reviewed September 11, 2026, 3:02 PM ET / 19:02 UTC. ClawSweeper reviewWhat this changesPass the selected agent into both image-description runtime paths and strengthen CLI regression coverage for explicit and inherited agent selection. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and the latest release still omit the selected agent at the media-runtime boundary. No blocking patch defects were found, and the supplied production CLI transcript demonstrates recovery. Priority: P2 Review scores
Verification
How this fits togetherThe image inference CLI accepts image files or URLs and selects an agent’s model and saved provider configuration. The media runtime prepares the image, invokes a provider, and returns a description. flowchart LR
A[Image and CLI options] --> B[Validate selected agent]
B --> C{Explicit model supplied}
C -->|Yes| D[Prepare image and model fallback]
C -->|No| E[Configured image pipeline]
D --> F[Provider using selected agent context]
E --> F
F --> G[Description output]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +2, Tests +24. Total +26 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Preserve the validated agent identity through both existing media-runtime calls while retaining current defaults, model fallbacks, and unknown-agent rejection. Do we have a high-confidence way to reproduce the issue? Yes for the agent-propagation defect: current source drops the validated ID at both calls, and the contributor supplies a pinned-base failure and exact-head recovery transcript. This read-only review did not execute target code or establish universal failure across configurations. Is this the best way to solve the issue? Yes. Forwarding the already-validated ID repairs the existing caller contract without adding another selection mechanism; the revised assertions catch the omission that directory-only checks missed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8a8d7a222f94. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…ces (#144931) Closes #144930. ## What Problem This Solves Local image, embedding, audio, and video inference fail before sending a provider request when the selected agent saves its credential as a SecretRef. Local model inference already prepares the same credential. ## Why This Change Was Made Extend the existing selected-agent account-secret preparation to every local media and embedding runner. Rename the model-only helper to match its shared scope. Keep the preparation behavior, account selection, auth precedence, and storage unchanged. This carries forward @masatohoshino’s repair from #144931 and retains @Bruce-Yii’s shared preparation from #141569. ## User Impact Local media and embedding commands can use the selected agent’s saved credential reference, as local model inference already does. Missing secrets still fail before provider traffic. ## Evidence Real CLI proof uses an isolated state, an account created with `onboard --secret-input-mode ref`, a distinct saved account on another agent, and local protocol-compatible HTTP fixtures. No Gateway or external provider account is used. | Command | Base `f96c900b1d424820c43a184d67694003583581bf` | Head `7ab685a8195d534e22ee52202a2752c178c424de` | | --- | --- | --- | | Embedding create | Exit 1; unmaterialized account reference; zero requests | Exit 0; expected embedding; selected credential at HTTP egress | | Image generate | Exit 1; same error; zero requests | Exit 0; PNG written; selected credential at HTTP egress | | Audio transcribe | Exit 1; same error; zero requests | Exit 0; expected transcript; selected credential at HTTP egress | | Video generate | Exit 1; same error; zero requests | Exit 0; authenticated create/download; fixture bytes written | | Image describe, sole agent | Exit 1; unmaterialized account reference; zero requests | Exit 0; selected credential at HTTP egress; returned image description | | Video describe, sole agent | Exit 1; unmaterialized account reference; zero requests | Exit 0; selected credential at HTTP egress; returned video description | | Local model run | Exit 0; selected credential | Exit 0; selected credential | | Missing selected secret | Exit 1; zero requests | Exit 1; zero requests despite a usable other-agent account | Image proof uses the existing local-image fixture opt-in on both base and head. Audio and video use the existing private-network request opt-in. The original small-audio and image network-policy setup failures are retained in private evidence. An independent source-blind pass confirms successful outputs and selected credentials for all four capability families, zero traffic for each missing-secret case, and the current credential after rotation in a new CLI process. The other-agent account succeeds when selected directly. Description proof retains the real media runtime and provider adapters. Both matched pairs use the same saved account database and command arguments; configs differ only by the local fixture port. Image returns “A synthetic blue square is visible.” Video sends a playable ten-frame input and returns “A synthetic blue square moves across the video.” Removing the selected secret makes each command fail before HTTP. A separate independent audit confirms the captured requests, exact selected credential classification, media payload bytes, outputs, and base/head state comparison. Image description uses a documented sole-agent configuration to isolate secret preparation. The explicit-agent multi-agent image command still fails on both base and head because the separate forwarding defect remains. Those failures are retained. Initial video fixture configuration and endpoint-policy failures are also retained; the qualified proof uses an existing provider adapter that supports a local compatible endpoint. No runtime or auth function is mocked in these description proofs. Limits: HTTP fixtures prove credential routing and output handling, not external provider generation quality. Generated-video output is a synthetic container; its playback is unconfirmed. The playable video above is the description input. The independent pass observed audio model-override behavior outside this credential repair; no forwarding change is included. ## Consumers - `model.ts`: existing local model caller migrates to the shared helper name; Gateway model flow remains unchanged. - `embedding.ts`: `infer embedding create` prepares selected-account secrets before creating its embedding provider. - `image.ts`: generation/edit share one runner; describe/describe-many share another; both prepare before provider auth. - `audio.ts`: transcription prepares before the media runtime. - `video.ts`: generation and description prepare before their respective runtimes. - `local-account-secrets.test.ts`: retains both existing preparation contract tests under the new name. - `capability-cli.test.ts`: mock follows the shared helper rename; command wiring coverage is retained. - `local-runners.account-secrets.test.ts`: six registered command routes reach real SQLite account and secrets owners before mocked provider execution. - Search across source, plugins, UI, native apps and docs finds no other consumer of the retired helper/module names. Provider inventories do not perform inference; TTS and web use separate auth contracts. - Pipeline: registered command → config-reference resolution → selected agent → existing account-secret preparation → provider auth → HTTP request and output. Fixture HTTP headers are the credential proof boundary. ## Invalidation No new cached or persisted state. The existing preparation activates a process-local snapshot only when none exists. Each standalone CLI process rereads the selected account and current secret value. An already active snapshot remains owned by the secrets runtime. Existing tests retain source-config preservation and active-snapshot behavior. Missing-secret and other-agent controls verify owner isolation. Independent rotation checks pass for embedding, image, audio and video in fresh CLI processes. ## Contention No new locks, queues or transactions held. Existing account loading and snapshot activation owners remain unchanged. ## Tests Base `f96c900b1d424820c43a184d67694003583581bf` reproduces unmaterialized account-reference failures for embedding, image generation, image description, audio transcription, video generation and video description: exit 1, zero HTTP requests. The same account succeeds for local model inference. The regression table fails all six cases on the base with `SECRET_SURFACE_UNAVAILABLE`. It invokes the registered image generate/describe, embedding create, audio transcribe and video generate/describe commands. No new production test seam is needed. Targeted validation passes: 316 tests across nine files, including capability commands, the existing model account-secret sibling, lazy registration, and command-secret coverage. Targeted formatting, diff whitespace, file-size and assertion safety checks pass. Full typechecking runs in CI. Test deletion ledger: no behavior deleted. The existing helper test file is renamed with its two cases preserved; the wiring suite mock follows that rename. No baseline or snapshot exceptions. Upgrade behavior: no schema, config, protocol, persistence, updater, Doctor or plugin contract changes; existing credentials and auth precedence are retained. Related open work: #145188 and #145171 repair agent-option forwarding in the same owner files. Their defect is separate; this patch does not duplicate their change. Recheck overlap on the landing merge tree. Co-authored-by: Ayaan Zaidi <[email protected]>
…ces (openclaw#144931) Closes openclaw#144930. ## What Problem This Solves Local image, embedding, audio, and video inference fail before sending a provider request when the selected agent saves its credential as a SecretRef. Local model inference already prepares the same credential. ## Why This Change Was Made Extend the existing selected-agent account-secret preparation to every local media and embedding runner. Rename the model-only helper to match its shared scope. Keep the preparation behavior, account selection, auth precedence, and storage unchanged. This carries forward @masatohoshino’s repair from openclaw#144931 and retains @Bruce-Yii’s shared preparation from openclaw#141569. ## User Impact Local media and embedding commands can use the selected agent’s saved credential reference, as local model inference already does. Missing secrets still fail before provider traffic. ## Evidence Real CLI proof uses an isolated state, an account created with `onboard --secret-input-mode ref`, a distinct saved account on another agent, and local protocol-compatible HTTP fixtures. No Gateway or external provider account is used. | Command | Base `ead0a74e21dfcd6de2007cc0695c732966a11dc0` | Head `7ab685a8195d534e22ee52202a2752c178c424de` | | --- | --- | --- | | Embedding create | Exit 1; unmaterialized account reference; zero requests | Exit 0; expected embedding; selected credential at HTTP egress | | Image generate | Exit 1; same error; zero requests | Exit 0; PNG written; selected credential at HTTP egress | | Audio transcribe | Exit 1; same error; zero requests | Exit 0; expected transcript; selected credential at HTTP egress | | Video generate | Exit 1; same error; zero requests | Exit 0; authenticated create/download; fixture bytes written | | Image describe, sole agent | Exit 1; unmaterialized account reference; zero requests | Exit 0; selected credential at HTTP egress; returned image description | | Video describe, sole agent | Exit 1; unmaterialized account reference; zero requests | Exit 0; selected credential at HTTP egress; returned video description | | Local model run | Exit 0; selected credential | Exit 0; selected credential | | Missing selected secret | Exit 1; zero requests | Exit 1; zero requests despite a usable other-agent account | Image proof uses the existing local-image fixture opt-in on both base and head. Audio and video use the existing private-network request opt-in. The original small-audio and image network-policy setup failures are retained in private evidence. An independent source-blind pass confirms successful outputs and selected credentials for all four capability families, zero traffic for each missing-secret case, and the current credential after rotation in a new CLI process. The other-agent account succeeds when selected directly. Description proof retains the real media runtime and provider adapters. Both matched pairs use the same saved account database and command arguments; configs differ only by the local fixture port. Image returns “A synthetic blue square is visible.” Video sends a playable ten-frame input and returns “A synthetic blue square moves across the video.” Removing the selected secret makes each command fail before HTTP. A separate independent audit confirms the captured requests, exact selected credential classification, media payload bytes, outputs, and base/head state comparison. Image description uses a documented sole-agent configuration to isolate secret preparation. The explicit-agent multi-agent image command still fails on both base and head because the separate forwarding defect remains. Those failures are retained. Initial video fixture configuration and endpoint-policy failures are also retained; the qualified proof uses an existing provider adapter that supports a local compatible endpoint. No runtime or auth function is mocked in these description proofs. Limits: HTTP fixtures prove credential routing and output handling, not external provider generation quality. Generated-video output is a synthetic container; its playback is unconfirmed. The playable video above is the description input. The independent pass observed audio model-override behavior outside this credential repair; no forwarding change is included. ## Consumers - `model.ts`: existing local model caller migrates to the shared helper name; Gateway model flow remains unchanged. - `embedding.ts`: `infer embedding create` prepares selected-account secrets before creating its embedding provider. - `image.ts`: generation/edit share one runner; describe/describe-many share another; both prepare before provider auth. - `audio.ts`: transcription prepares before the media runtime. - `video.ts`: generation and description prepare before their respective runtimes. - `local-account-secrets.test.ts`: retains both existing preparation contract tests under the new name. - `capability-cli.test.ts`: mock follows the shared helper rename; command wiring coverage is retained. - `local-runners.account-secrets.test.ts`: six registered command routes reach real SQLite account and secrets owners before mocked provider execution. - Search across source, plugins, UI, native apps and docs finds no other consumer of the retired helper/module names. Provider inventories do not perform inference; TTS and web use separate auth contracts. - Pipeline: registered command → config-reference resolution → selected agent → existing account-secret preparation → provider auth → HTTP request and output. Fixture HTTP headers are the credential proof boundary. ## Invalidation No new cached or persisted state. The existing preparation activates a process-local snapshot only when none exists. Each standalone CLI process rereads the selected account and current secret value. An already active snapshot remains owned by the secrets runtime. Existing tests retain source-config preservation and active-snapshot behavior. Missing-secret and other-agent controls verify owner isolation. Independent rotation checks pass for embedding, image, audio and video in fresh CLI processes. ## Contention No new locks, queues or transactions held. Existing account loading and snapshot activation owners remain unchanged. ## Tests Base `ead0a74e21dfcd6de2007cc0695c732966a11dc0` reproduces unmaterialized account-reference failures for embedding, image generation, image description, audio transcription, video generation and video description: exit 1, zero HTTP requests. The same account succeeds for local model inference. The regression table fails all six cases on the base with `SECRET_SURFACE_UNAVAILABLE`. It invokes the registered image generate/describe, embedding create, audio transcribe and video generate/describe commands. No new production test seam is needed. Targeted validation passes: 316 tests across nine files, including capability commands, the existing model account-secret sibling, lazy registration, and command-secret coverage. Targeted formatting, diff whitespace, file-size and assertion safety checks pass. Full typechecking runs in CI. Test deletion ledger: no behavior deleted. The existing helper test file is renamed with its two cases preserved; the wiring suite mock follows that rename. No baseline or snapshot exceptions. Upgrade behavior: no schema, config, protocol, persistence, updater, Doctor or plugin contract changes; existing credentials and auth precedence are retained. Related open work: openclaw#145188 and openclaw#145171 repair agent-option forwarding in the same owner files. Their defect is separate; this patch does not duplicate their change. Recheck overlap on the landing merge tree. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #144931 ## What Problem This Solves Restoring an agent backup and registering that directory under a new agent name lets local capability inference use the original agent's saved credential. This follows supported `backup create`, `backup restore --target`, and `agents add --agent-dir` commands. Local model inference already refuses the durable owner mismatch. Follow-up to our #144931; found by the adversarial round, with no external reporter. ## Why This Change Was Made The shared local account preparation now passes the selected identity to the auth database owner before resolving credentials, including when a secrets snapshot is active. The auth reader delegates to the existing durable schema-owner assertion without requiring a newer session schema. No schema, migration, configuration, or protocol change. The decision 'may this agent use this saved credential' is made by exactly one mechanism at `src/state/openclaw-agent-db-schema-helpers.ts:311`. ## User Impact A restored directory registered under another name now produces the same owner-mismatch refusal across local inference commands before any provider request. Legitimate saved credentials continue to work. ## Evidence Pinned base: `d5e652099074b5801cc7e4e3a108c035d2888e99`. - Supported restore reproduction: base embedding exits 0 and sends one recorded provider request with the original agent's synthetic credential. The model control exits 1 with `belongs to agent ops; requested agent restored` and sends no request. - Candidate `2e81eb5998b460c47463907b0b8fdac88b19ead0`: restored embedding and model both exit 1 with the owner mismatch and zero provider requests. All six repaired commands—embedding, image generation, image description, audio transcription, video generation, and video description—reject the foreign owner before dispatch. Model inference remains a separate unchanged control. A supplemental video-generation capture uses the configured recorder endpoint: the legitimate owner creates and downloads a video; the restored owner exits 1 with the owner mismatch and sends zero create/content requests. - Final pre-landing rebase: head `f1a33f00c1c7cdcc332b3e5464430f46a49e044c` preserves the exact repair patch and all four changed files. The six restored-owner refusal commands and legitimate-owner video/model controls were refreshed on this head; prior pinned-base, rotation, older-state, and targeted-test evidence remains retained. - Legitimate saved-reference accounts succeed for all six command families. The known multi-agent image-description forwarding failure remains unchanged; the sole-agent description control succeeds, as in the original proof. #145188/#145171 track that separate path. - Rotated credentials succeed through model, embedding, image edit, describe-many, audio, video generation/download, and video description. An unavailable unrelated credential does not block the healthy account. - Previous state: v2026.9.4 application source created a schema-19 saved account; candidate embedding succeeds with its credential through the existing schema-20 upgrade path. The older source needed only upstream build-tool repair #144831 to complete its build; application sources were unchanged from the tag. - All six registered capability regression cases fail on the original code. Candidate capability tests: 255 passed; auth SQLite sibling: 16 passed. The helper provenance test passes after an isolation-only correction. - A source-blind validator independently ran the supported restore and legitimate-account CLI flows on pre-rebase head `2e81eb5998b460c47463907b0b8fdac88b19ead0`: PASS. The focused post-rebase CLI refresh was run by the repair worker. - Proof uses synthetic credentials and a loopback provider to measure actual credential routing and request absence. ## Consumers Seven calls to `prepareLocalCapabilityAccountSecrets` cover local `model run`, `embedding create`, image `generate`/`edit`, image `describe`/`describe-many`, audio `transcribe`, video `generate`/download, and video `describe`. Their shared preparation retains the selected identity and validates before credential use. No command-specific predicates were added. `capability` is an alias for the same registered command tree at `src/cli/capability-cli.ts:106-124`, as documented by `docs/cli/infer.md:9`; it reaches the same preparation owner. Test consumers: `src/cli/capability-cli/local-account-secrets.test.ts:35,49` imports and calls the preparation helper for source-config provenance, and lines 18-20 mock the new auth-owner adapter for isolation. `src/cli/capability-cli.test.ts:336-338` mocks shared preparation for command-wiring coverage. `assertAuthProfileStoreAgentOwner` has one production caller: shared local capability account preparation. The existing canonical assertion remains used by agent database schema, read-only access, writable open, admission, and maintenance. Model preparation also reaches that same assertion through persisted model-catalog reads. Memory CLI uses its separate config-reference preparation in `extensions/memory-core/src/cli-runtime-common.ts`; adversarial finding F4 remains separate. Provider listings, web, and speech synthesis do not consume this helper. Related open PRs #145188 and #145171 forward agent identity through media-understanding calls. They are separate from this saved-credential admission. Preserve the shared preparation call when reconciling landing order. Their branches and metadata were not changed. ## Invalidation No owner verdict is cached. Every shared preparation call reads durable metadata, before the active-snapshot shortcut. Existing auth read-pool lifecycle and credential revision invalidation remain the owners. Credential mutation advances the revision; snapshot activation validates it; clearing the runtime clears linked snapshots. Database/root closure and process exit close pooled readers. No additional cache or lifecycle was introduced. ## Contention No explicit transaction, lock, or queue is held across an await. The short metadata read uses the existing auth read connection and busy policy. Credential preparation retains its existing asynchronous lifecycle. ## Tests The registered entry points `infer image generate`, `infer image describe`, `infer embedding create`, `infer audio transcribe`, `infer video generate`, and `infer video describe` each first succeed for their durable owner, then reject another selected identity without further credential egress, with both active and cleared secrets snapshots. Deletion ledger: removed the helper-only “does not replace an already active secrets runtime snapshot” case because its no-directory-resolution assertion preserved the unsafe bypass. The registered-command cases now cover admission with an active snapshot. The helper source-config provenance case remains, with its new database dependency mocked to keep fixed paths isolated. Moved side effects: none. Production grows by 25 net lines to connect explicit selected identity to the existing durable decision through the version-tolerant auth reader. Co-authored-by: Ayaan Zaidi <[email protected]>
…145692) Related: openclaw#144931 ## What Problem This Solves Restoring an agent backup and registering that directory under a new agent name lets local capability inference use the original agent's saved credential. This follows supported `backup create`, `backup restore --target`, and `agents add --agent-dir` commands. Local model inference already refuses the durable owner mismatch. Follow-up to our openclaw#144931; found by the adversarial round, with no external reporter. ## Why This Change Was Made The shared local account preparation now passes the selected identity to the auth database owner before resolving credentials, including when a secrets snapshot is active. The auth reader delegates to the existing durable schema-owner assertion without requiring a newer session schema. No schema, migration, configuration, or protocol change. The decision 'may this agent use this saved credential' is made by exactly one mechanism at `src/state/openclaw-agent-db-schema-helpers.ts:311`. ## User Impact A restored directory registered under another name now produces the same owner-mismatch refusal across local inference commands before any provider request. Legitimate saved credentials continue to work. ## Evidence Pinned base: `79a02b57732d6f4b24c7325d41a452d9d494e319`. - Supported restore reproduction: base embedding exits 0 and sends one recorded provider request with the original agent's synthetic credential. The model control exits 1 with `belongs to agent ops; requested agent restored` and sends no request. - Candidate `2e81eb5998b460c47463907b0b8fdac88b19ead0`: restored embedding and model both exit 1 with the owner mismatch and zero provider requests. All six repaired commands—embedding, image generation, image description, audio transcription, video generation, and video description—reject the foreign owner before dispatch. Model inference remains a separate unchanged control. A supplemental video-generation capture uses the configured recorder endpoint: the legitimate owner creates and downloads a video; the restored owner exits 1 with the owner mismatch and sends zero create/content requests. - Final pre-landing rebase: head `f1a33f00c1c7cdcc332b3e5464430f46a49e044c` preserves the exact repair patch and all four changed files. The six restored-owner refusal commands and legitimate-owner video/model controls were refreshed on this head; prior pinned-base, rotation, older-state, and targeted-test evidence remains retained. - Legitimate saved-reference accounts succeed for all six command families. The known multi-agent image-description forwarding failure remains unchanged; the sole-agent description control succeeds, as in the original proof. openclaw#145188/openclaw#145171 track that separate path. - Rotated credentials succeed through model, embedding, image edit, describe-many, audio, video generation/download, and video description. An unavailable unrelated credential does not block the healthy account. - Previous state: v2026.9.4 application source created a schema-19 saved account; candidate embedding succeeds with its credential through the existing schema-20 upgrade path. The older source needed only upstream build-tool repair openclaw#144831 to complete its build; application sources were unchanged from the tag. - All six registered capability regression cases fail on the original code. Candidate capability tests: 255 passed; auth SQLite sibling: 16 passed. The helper provenance test passes after an isolation-only correction. - A source-blind validator independently ran the supported restore and legitimate-account CLI flows on pre-rebase head `2e81eb5998b460c47463907b0b8fdac88b19ead0`: PASS. The focused post-rebase CLI refresh was run by the repair worker. - Proof uses synthetic credentials and a loopback provider to measure actual credential routing and request absence. ## Consumers Seven calls to `prepareLocalCapabilityAccountSecrets` cover local `model run`, `embedding create`, image `generate`/`edit`, image `describe`/`describe-many`, audio `transcribe`, video `generate`/download, and video `describe`. Their shared preparation retains the selected identity and validates before credential use. No command-specific predicates were added. `capability` is an alias for the same registered command tree at `src/cli/capability-cli.ts:106-124`, as documented by `docs/cli/infer.md:9`; it reaches the same preparation owner. Test consumers: `src/cli/capability-cli/local-account-secrets.test.ts:35,49` imports and calls the preparation helper for source-config provenance, and lines 18-20 mock the new auth-owner adapter for isolation. `src/cli/capability-cli.test.ts:336-338` mocks shared preparation for command-wiring coverage. `assertAuthProfileStoreAgentOwner` has one production caller: shared local capability account preparation. The existing canonical assertion remains used by agent database schema, read-only access, writable open, admission, and maintenance. Model preparation also reaches that same assertion through persisted model-catalog reads. Memory CLI uses its separate config-reference preparation in `extensions/memory-core/src/cli-runtime-common.ts`; adversarial finding F4 remains separate. Provider listings, web, and speech synthesis do not consume this helper. Related open PRs openclaw#145188 and openclaw#145171 forward agent identity through media-understanding calls. They are separate from this saved-credential admission. Preserve the shared preparation call when reconciling landing order. Their branches and metadata were not changed. ## Invalidation No owner verdict is cached. Every shared preparation call reads durable metadata, before the active-snapshot shortcut. Existing auth read-pool lifecycle and credential revision invalidation remain the owners. Credential mutation advances the revision; snapshot activation validates it; clearing the runtime clears linked snapshots. Database/root closure and process exit close pooled readers. No additional cache or lifecycle was introduced. ## Contention No explicit transaction, lock, or queue is held across an await. The short metadata read uses the existing auth read connection and busy policy. Credential preparation retains its existing asynchronous lifecycle. ## Tests The registered entry points `infer image generate`, `infer image describe`, `infer embedding create`, `infer audio transcribe`, `infer video generate`, and `infer video describe` each first succeed for their durable owner, then reject another selected identity without further credential egress, with both active and cleared secrets snapshots. Deletion ledger: removed the helper-only “does not replace an already active secrets runtime snapshot” case because its no-directory-resolution assertion preserved the unsafe bypass. The registered-command cases now cover admission with an active snapshot. The helper source-config provenance case remains, with its new database dependency mocked to keep fixed paths isolated. Moved side effects: none. Production grows by 25 net lines to connect explicit selected identity to the existing durable decision through the version-tolerant auth reader. Co-authored-by: Ayaan Zaidi <[email protected]>
8e2c249 to
9438ac0
Compare
|
Closing this PR because the underlying source fix is already present on main; the rebased branch only contains duplicate tests. |
What Problem This Solves
Fixes an issue where users running
openclaw infer image describeorimage describe-manywith multiple configured agents would still receiveAgentSelectionRequiredErroreven when they passed a valid--agent.Closes #145119
Why This Change Was Made
Forward the resolved agent identity into both the configured-provider and explicit-model image description paths. The media runtime already uses that identity for ownership resolution, so the change preserves the existing agent-selection contract without changing provider routing.
User Impact
Explicit-agent image descriptions now reach the selected agent's saved provider configuration in multi-agent fleets.
Evidence
pnpm vitest run src/cli/capability-cli.test.ts— 249 tests passed.Proof fixture (Testing): loopback provider boundary
AI-assisted: built with Codex