Skip to content

fix(secrets): preserve partial gateway assignments#105160

Merged
steipete merged 1 commit into
mainfrom
codex/pr-96661-replacement
Jul 12, 2026
Merged

fix(secrets): preserve partial gateway assignments#105160
steipete merged 1 commit into
mainfrom
codex/pr-96661-replacement

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

An active Gateway secrets snapshot can resolve some command SecretRefs while leaving an exec-backed target unresolved. The previous all-or-nothing result converted that partial snapshot into secrets.resolve failure noise, after which the CLI repeated resolution locally. PR #96661 identified the user-visible failure, but its client-side bypass could discard authoritative Gateway-only values.

Fixes #96653. Supersedes #96661 while preserving @SunnyShu0925's contribution and co-author credit.

Why This Change Was Made

Keep resolution at the existing owner boundary: the Gateway returns every assignment its active snapshot resolved, even when another target remains unresolved. The existing caller then retains those authoritative values and performs local fallback only for missing paths.

This avoids a second resolution policy, preserves remote/service-only env and file values, and removes the noisy failing RPC without hiding genuine Gateway failures.

User Impact

  • Reply-time command SecretRefs no longer emit an expected secrets.resolve unavailable error merely because one exec-backed target needs local fallback.
  • Values already materialized by the Gateway remain authoritative.
  • Mixed target sets resolve locally only where the Gateway returned no assignment.

Evidence

  • Blacksmith Testbox tbx_01kxapky9sr42z94nrxr4hnnjs: 60 focused Gateway, runtime-secret, CLI, and auto-reply tests passed on the current-main replacement.
  • The same Testbox passed tsgo:core and tsgo:test:src.
  • Regression coverage includes a real exec provider prepared into the runtime snapshot, an incomplete snapshot with an authoritative assignment, and a mixed Gateway/local target set.
  • Two fresh structured reviews of the original final patch reported no actionable findings; the current-main replacement preserves that patch and deletes the unsafe client-side bypass.

Known broad-gate context: the stale fork's delegated full-suite workspace mixed current-main tooling tests with the old fork tree, producing unrelated missing extensions/crabbox and shard-inventory failures. Recreating the patch on current main removes that workspace mismatch; hosted exact-head CI remains the landing gate.

@steipete
steipete requested a review from a team as a code owner July 12, 2026 08:24
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web channel: zalouser Channel integration: zalouser app: android App: android app: web-ui App: web-ui extensions: diagnostics-otel Extension: diagnostics-otel extensions: memory-core Extension: memory-core extensions: memory-lancedb Extension: memory-lancedb scripts Repository scripts channel: feishu Channel integration: feishu extensions: device-pair extensions: acpx extensions: anthropic labels Jul 12, 2026
@steipete

steipete commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready maintainer proof:

  • Replaced fix(gateway): skip secrets.resolve when target SecretRefs use exec providers #96661's all-or-nothing active-snapshot bypass with one partial-analysis contract: authoritative Gateway assignments are always retained, and local fallback fills only unresolved targets.
  • Added regression coverage for incomplete snapshots, real exec-provider materialization, and mixed Gateway/local targets.
  • Blacksmith Testbox tbx_01kxapky9sr42z94nrxr4hnnjs: 60 focused secret-runtime tests passed; pnpm tsgo:core and pnpm tsgo:test:src passed.
  • Fresh structured review: no actionable findings.
  • Repo-native review artifacts: READY FOR /prepare-pr, zero findings.
  • Rebuilt replacement head 2ee46baff3de658dafd052f617781817159e1d41 as exactly one reviewed commit atop current main after rejecting stale-branch ancestry; the final diff is four files only.
  • Full hosted CI passed for the patch and the repo-native hosted prepare gate accepted the clean exact head.

This preserves contributor credit for @SunnyShu0925 while avoiding the original patch's mixed-value regression.

@steipete
steipete force-pushed the codex/pr-96661-replacement branch from 2714570 to 2ee46ba Compare July 12, 2026 08:54
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix labels Jul 12, 2026
@clawsweeper

clawsweeper Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 27145705243655cd28651f8ce19560d16ddc87ad, but the PR head is now 2ee46baff3de658dafd052f617781817159e1d41. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: reply-path secrets.resolve floods gateway log with UNAVAILABLE for model-provider exec SecretRefs (degrades correctly, ~1 line/turn)

1 participant