fix: agent turns ignore inactive web search SecretRefs#105536
fix: agent turns ignore inactive web search SecretRefs#105536abnershang wants to merge 2 commits into
Conversation
7efa9c9 to
deb0a74
Compare
|
Branch update / CI verification:
No unrelated PR code change was needed beyond updating the branch. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: deb0a747fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs maintainer review before merge. Reviewed July 13, 2026, 3:03 PM ET / 19:03 UTC. Summary PR surface: Source +52, Tests +153. Total +205 across 6 files. Reproducibility: yes. —the failure path is high-confidence from source: configure an unresolved Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the shared exact-path ownership handoff after refreshing onto current Do we have a high-confidence way to reproduce the issue? Yes—the failure path is high-confidence from source: configure an unresolved Is this the best way to solve the issue? Yes—the exact-path handoff is narrower and more maintainable than plugin-id checks or subtree exemptions because it reuses manifest capability ownership while keeping all sibling SecretInputs on the generic strict path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72b42f0ed751. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +52, Tests +153. Total +205 across 6 files. View PR surface stats
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
Review history (4 earlier review cycles)
|
|
ClawSweeper follow-up evidence for exact head
The durable Evidence section in the PR body is updated, and the addressed review conversation is resolved. |
deb0a74 to
6459b7b
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing as superseded by #108485, landed in 92075dd. The deeper current-main trace shows the remaining collector change is not needed:
Unknown provider ownership remains fail-closed in the landed command resolver. Thanks @abnershang for tracing this family and for the exact-path narrowing work; the canonical fix now covers the observed user behavior without adding another metadata/collector ownership path. |
What Problem This Solves
Fixes an issue where ordinary agent turns could fail during secrets runtime preparation when a disabled or non-selected web-search provider had an unresolved
SecretRefconfigured.Why This Change Was Made
Plugin capability contracts now travel with config-contract metadata. A lightweight shared mapping identifies the exact provider-owned credential path (
webSearch.apiKey), so the generic plugin collector still resolves every other declared SecretInput while provider selection resolves only the enabled, selected provider API key. This preserves strict failures for the provider that is actually selected while inactive provider credentials remain unresolved until needed.This change is AI-assisted. The implementation and focused proof were reviewed with the repository's structured autoreview workflow.
User Impact
Users can keep credentials configured for alternate or disabled web-search providers without those inactive references blocking unrelated agent turns. A missing credential for the enabled, selected provider still fails explicitly.
Evidence
pnpm test src/plugins/config-contracts.test.ts src/secrets/runtime-config-collectors-plugins.test.ts src/secrets/runtime-core-snapshots.test.ts src/secrets/runtime-command-secrets.test.ts src/secrets/target-registry.test.tspnpm check:test-typesnode scripts/run-oxlint.mjs <six touched files>node_modules/.bin/oxfmt --check <six touched files>git diff --checkorigin/main.agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-outputReal behavior proof
webSearch.*remains owned by the generic strict resolver.abs-crabbox, zoneus-central1-a,e2-standard-8, providergcp, leasecbx_874b1d4cba22(swift-crayfish). The run used a fresh checkout of exact PR head6459b7b360eeae440851a5f1efc515ea24627610, public networking, no Tailscale, no Actions hydration, an isolated temporary OpenClaw state directory, and a deterministic local mock OpenAI server.pnpm check:test-typesand the six-file lint/format checks above.pnpm openclaw agent --local --agent main --session-id <isolated-session> --message <redacted-prompt> --thinking off --timeout 60 --jsonfor disabled, non-selected, and selected-provider configurations.AGENT_TURN_DISABLED=PASS,AGENT_TURN_NONSELECTED=PASS,ACTIVE_SELECTED_PROVIDER_FAILURE=PRESERVED,MOCK_MODEL_REQUESTS=2, andGCP_REVIEW_FIX_EVIDENCE=PASS.The exact-head GCP run exited 0 in 11m55.830s. Cleanup completed automatically (
leaseStopped=true), and the provider-native inventory reports zero Crabbox-labeled instances with no instance forcbx_874b1d4cba22.Agent Transcript
Redacted codex session transcript