fix(secrets): inactive web refs no longer block agent turns#108485
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 15, 2026, 7:37 PM ET / 23:37 UTC. Summary PR surface: Source +5, Tests +50. Total +55 across 2 files. Reproducibility: yes. at source and regression-test level: a successful empty Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep one reconciliation rule that preserves authoritative Gateway assignments, accepts the existing local resolver's terminal Do we have a high-confidence way to reproduce the issue? Yes at source and regression-test level: a successful empty Is this the best way to solve the issue? Yes, this is the narrowest maintainable repair: it preserves the established targeted fallback owner boundary and recognizes the local resolver's existing terminal state without weakening failure behavior for active unresolved refs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8e6f966482b0. Label changesLabel justifications:
Evidence reviewedPR surface: Source +5, Tests +50. Total +55 across 2 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 (1 earlier review cycle)
|
631222d to
4d80ae3
Compare
4a28f2b to
4c58e2c
Compare
861a518 to
cd9e1ee
Compare
cd9e1ee to
b81cdc7
Compare
|
Maintainer proof complete on exact head
Best-fix judgment: ready. This keeps authoritative Gateway assignments, accepts the existing terminal inactive state, and preserves strict failure for active or unproven ownership without adding a fallback stack. @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Merged via squash.
|
…#108485) * fix(secrets): accept inactive refs from partial fallback * fix(secrets): fail closed on unknown web provider owners * test(gateway): isolate web secret startup fixtures --------- Co-authored-by: VACInc <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Related: #105536
Summary
Accept locally classified inactive SecretRefs as terminal when a successful Gateway
secrets.resolveresponse contains only a partial command snapshot.What Problem This Solves
Fixes an issue where ordinary agent turns could fail before model execution when a disabled or non-selected web provider retained a SecretRef and the active Gateway returned a valid but incomplete secrets snapshot.
Root Cause
PR #105160 changed the Gateway command resolver to preserve authoritative assignments from partial runtime snapshots. That made the caller's targeted local-fallback merge reachable for paths omitted by a successful Gateway response.
Before this change, that merge accepted only
resolved_local. The existing local resolver correctly classified omitted disabled-provider paths asinactive_surface, but the merge ignored that terminal state and relabeled the path unresolved. In strict agent preparation, it then threwis unresolved in the active runtime snapshotbefore the agent run began.The related #105536 addresses how new runtime snapshots collect inactive web-provider credentials. This change is complementary: it repairs the established partial-result fallback contract even when a Gateway snapshot omits an inactive path.
Why This Change Was Made
The partial-result merge now handles both locally materialized values and locally proven inactive paths. Genuine unresolved paths keep the existing strict failure behavior, and the local-resolution summary still counts only paths that materialized a value.
User Impact
Agent turns no longer fail merely because an inactive web provider credential is absent from an otherwise valid partial Gateway snapshot. Missing credentials on active surfaces still fail as before.
Evidence
On current
main, the added regression failed with 1 failed / 35 passed andagent: plugins.entries.google.config.webSearch.apiKey is unresolved in the active runtime snapshot. With this patch, the focused CLI and runtime-secret command passes both Vitest shards with 40 tests passed; strict preparation records the omitted path asinactive_surfacewith no unresolved targets.Real behavior proof
mainwith 1 failed / 35 passed andagent: plugins.entries.google.config.webSearch.apiKey is unresolved in the active runtime snapshot.node scripts/run-vitest.mjs src/cli/command-secret-gateway.test.ts src/secrets/runtime-command-secrets.test.tshadUnresolvedTargets: false, preserves the configured SecretRef, recordsinactive_surface, and retains the existing inactive-surface diagnostic.Verification
node scripts/run-vitest.mjs src/cli/command-secret-gateway.test.ts src/secrets/runtime-command-secrets.test.ts— 40 tests passed../node_modules/.bin/oxlint src/cli/command-secret-gateway.ts src/cli/command-secret-gateway.test.ts— passed../node_modules/.bin/oxfmt --check src/cli/command-secret-gateway.ts src/cli/command-secret-gateway.test.ts— passed.git diff --check— passed..agents/skills/autoreview/scripts/autoreview --mode uncommitted --stream-engine-output— clean, no findings; patch correct at 0.94 confidence.What was not tested
A live Telegram turn against a restarted patched Gateway was not run because that would mutate the operator's live service. The full remote changed gate was attempted but did not execute: Blacksmith Testbox authentication and the owned AWS Crabbox broker login are unavailable on this host. Exact-head non-draft PR CI is the authoritative broad gate.