Skip to content

fix(config): preserve plugin secret references in Settings saves - #139536

Merged
obviyus merged 1 commit into
openclaw:mainfrom
robojarvis:fix/webhooks-secretref-settings
Sep 6, 2026
Merged

obviyus merged 1 commit into
openclaw:mainfrom
robojarvis:fix/webhooks-secretref-settings

Conversation

@robojarvis

@robojarvis robojarvis commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where an unrelated Control UI Settings edit fails to save when a plugin configuration contains a structured SecretRef at a declared wildcard secret path.

Related: #106460. This addresses the current Settings form path.

Why This Change Was Made

The runtime schema omitted plugin-declared SecretInput paths. Redaction then concealed the reference's source and provider, so the write-side identity check rejected an unchanged reference. The metadata collector now carries the manifest paths into sensitivity hints and schema cache identity, including paths behind local schema references.

The existing reference-identity check remains unchanged. This adds no configuration option, schema migration, or plugin-specific exception.

User Impact

Unrelated Settings saves preserve existing plugin secret references. The source and provider remain visible; the identifier and plaintext values remain concealed. Changing the reference identity still requires an explicit identifier.

Evidence

Tested matching Gateway and Control UI builds with two structured-reference webhook routes and a plaintext sibling, using synthetic configuration only.

Observation Current main dbba8d30da1 Repair f914c62a79e
Unrelated Console Log Level form edit “Save failed”; Gateway rejects the apparent identity change Save acknowledged; disk reread and browser refresh retain the edit
Reference redaction Source, provider, and identifier concealed; safe raw snapshot unavailable Source/provider preserved; identifier concealed; safe raw snapshot available
Stored route data Unchanged after rejection Both references and plaintext sibling unchanged after save
  • Independent source-blind browser acceptance confirmed the complete save, persisted reread, refresh, wildcard/local-schema-reference behavior, and absence of secret material in inspected UI, responses, and browser logs.
  • Separate authenticated Gateway probes changed source and provider while keeping the identifier concealed. Both were rejected with INVALID_REQUEST; persisted route data stayed unchanged.
  • 131 focused tests pass across schema, runtime schema, channel metadata, and Gateway configuration responses. The added regressions fail on the original code.
  • Schema cache identity is covered by a source-level regression; the independent browser pass does not claim to exercise internal cache invalidation.
  • Type-aware lint: no warnings or errors. Pinned formatting, generated configuration documentation check, and git diff --check pass. The CI provenance below records the known inherited boundary failure.

CI provenance: run 34006723288, boundary job checks the candidate merged into main 80a898592283. Its services group has 721 test files against the existing 720 limit. PR #139592, commit 41fba39c40aa, added src/logging/diagnostic-gc.test.ts and crossed that limit. Its parent has 720 roots; the commit has 721. This repair changes neither that file set nor the guard. Isolated baseline and candidate checks pass; adding that exact new file to baseline reproduces the CI error.

The repair preserves the original contributor's credit.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: S labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 5, 2026, 10:46 PM ET / September 6, 2026, 02:46 UTC.

ClawSweeper review

What this changes

Carries plugin-declared secret paths into Settings redaction hints and schema caching so unrelated saves preserve concealed secret references.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful repair: current main still omits the plugin secret-path metadata. No blocking patch findings remain, and the supplied before/after evidence demonstrates the affected Settings save.

Priority: P2
Reviewed head: f914c62a79ea9b87c6363a3e19a97068a933d03a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage and concrete reported runtime results; no blocking findings remain.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body reports matching Gateway/Control UI before-and-after runs exercising the changed metadata-to-redaction path: saves persist and survive refresh, existing secrets remain unchanged and concealed, and source/provider edits with concealed identifiers are rejected before persistence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body reports matching Gateway/Control UI before-and-after runs exercising the changed metadata-to-redaction path: saves persist and survive refresh, existing secrets remain unchanged and concealed, and source/provider edits with concealed identifiers are rejected before persistence.
Evidence reviewed 8 items Introduced change verified: The pinned merge-base-to-head diff adds manifest-path projection, sensitivity hints, cache identity, regression coverage, and documentation. It does not modify secret restoration, provider selection, persisted formats, or defaults. The supplied verified test merge contains the same six changed paths.
Current main still needs the repair: The fetched main collector carries configUiHints and configSchema but omits declared SecretInput paths. Its schema builder only merges existing relative hints. No verified merged fixing PR establishes that this Settings repair is already implemented.
Existing redaction and restoration contract: A directly sensitive SecretRef preserves structural fields while concealing its identifier. Restoration rejects concealed identifiers when source/provider differs from the original. Gateway configuration parsing invokes this restoration before validation and writing; the PR leaves these checks intact.
Findings None None.
Security None None.

How this fits together

The Gateway builds Settings metadata from plugin manifests and uses it to conceal credentials before returning configuration to the browser. Settings saves use the same metadata to restore unchanged concealed values before validation and persistence.

flowchart LR
  A[Plugin manifest] --> B[Settings schema and sensitivity hints]
  C[Existing configuration] --> D[Redacted Settings response]
  B --> D
  D --> E[Unrelated Settings edit]
  E --> F[Restore values and check reference identity]
  B --> F
  C --> F
  F --> G[Save configuration or reject identity change]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

Source +10, Tests +141, Docs +2, Generated 0. Total +153 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 10 0 +10
Tests 2 141 0 +141
Docs 1 2 0 +2
Config 0 0 0 0
Generated 1 2 2 0
Other 0 0 0 0
Total 6 155 2 +153

Review metrics

None.

Technical review

Best possible solution:

Use existing manifest secret declarations consistently for Settings redaction while preserving the established reference-identity checks.

Do we have a high-confidence way to reproduce the issue?

Yes: source traces the missing wildcard sensitivity hint to over-redaction and subsequent identity rejection, and the supplied browser observations demonstrate that failure before the repair. This review did not execute a current-main reproduction.

Is this the best way to solve the issue?

Yes: projecting existing declarations at the metadata producer repairs the shared path without weakening restoration or introducing a competing API. The earlier generic upgrade concern does not identify a changed persisted contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ef5972108dc6.

Labels

Label justifications:

  • P2: Repairs Settings saves for configurations containing plugin SecretRefs, with a bounded configuration-metadata change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports matching Gateway/Control UI before-and-after runs exercising the changed metadata-to-redaction path: saves persist and survive refresh, existing secrets remain unchanged and concealed, and source/provider edits with concealed identifiers are rejected before persistence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports matching Gateway/Control UI before-and-after runs exercising the changed metadata-to-redaction path: saves persist and survive refresh, existing secrets remain unchanged and concealed, and source/provider edits with concealed identifiers are rejected before persistence.

Evidence

What I checked:

  • Introduced change verified: The pinned merge-base-to-head diff adds manifest-path projection, sensitivity hints, cache identity, regression coverage, and documentation. It does not modify secret restoration, provider selection, persisted formats, or defaults. The supplied verified test merge contains the same six changed paths. (src/config/schema.ts:254, f914c62a79ea)
  • Current main still needs the repair: The fetched main collector carries configUiHints and configSchema but omits declared SecretInput paths. Its schema builder only merges existing relative hints. No verified merged fixing PR establishes that this Settings repair is already implemented. (src/config/channel-config-metadata.ts:149, ef5972108dc6)
  • Existing redaction and restoration contract: A directly sensitive SecretRef preserves structural fields while concealing its identifier. Restoration rejects concealed identifiers when source/provider differs from the original. Gateway configuration parsing invokes this restoration before validation and writing; the PR leaves these checks intact. (src/config/redact-snapshot.ts:482, f914c62a79ea)
  • Real Settings and Gateway observations: The complete captured PR body, sourceRevision 0a4c9a8d8b9e83ef0bc40f88d76363a6b3d22d2bf758a336e9d4a89e750fbedf, reports matching Gateway/Control UI builds before and after the repair. An unrelated Console Log Level edit changes from rejection to acknowledged save, persisted reread, and successful refresh; two references and a plaintext sibling remain unchanged. Inspected responses/browser logs conceal secret material. Separate authenticated probes changing source or provider return INVALID_REQUEST without changing persisted route data. These are supplied runtime observations, not executions performed during this review. (f914c62a79ea)
  • Regression coverage and review continuity: The complete added tests cover wildcard paths behind local schema references, all response projections, unchanged-reference restoration, changed-identity rejection, and cache refresh when only declared paths change. The fixture retains its concrete type with satisfies. The earlier completed review has no remaining findings; its generic upgrade warning is not supported by a stored-format or default change in this patch. (src/gateway/config-get-response.test.ts:83, f914c62a79ea)
  • Related report is narrower historical context: [Bug]: Control UI Context Profile save fails when config contains redacted SecretRef #106460 is closed and describes the same rejection message during the older Context Profile workflow. Its supplied context does not establish that current general Settings saves are fixed, so it does not supersede this PR.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • juyaohuidt: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-06T00:08:53.233Z sha 0c371814bab712cf6a5209a48067fabba1b8fbb9 :: needs real behavior proof before merge. :: [P2] Preserve the fixture's concrete type in the round-trip assertion
  • reviewed 2026-09-06T02:38:16.780Z sha f914c62 :: blocked before merge. :: none

@obviyus obviyus self-assigned this Sep 6, 2026
Project declared SecretInput paths into runtime sensitivity hints and schema cache identity. Preserve concealed identifiers through unrelated form edits without weakening identity checks.

Co-authored-by: robojarvis <[email protected]>
@obviyus
obviyus force-pushed the fix/webhooks-secretref-settings branch from 0c37181 to f914c62 Compare September 6, 2026 02:31
@obviyus obviyus changed the title fix(config): allow plugin SecretRefs to survive form saves fix(config): preserve plugin secret references in Settings saves Sep 6, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@obviyus

obviyus commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

landpr-approve-unrelated-red
pr: 139536
head: f914c62
run: 34006723288 attempt: 1
failed: check-additional-boundaries job=101415264078 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit d6eba6c into openclaw:main Sep 6, 2026
219 of 221 checks passed
@obviyus

obviyus commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks @robojarvis!

Proof: Real Control UI Settings save on the matching Gateway/UI build, successful acknowledgement, persisted reread, and browser refresh. Both wildcard SecretRefs and the plaintext sibling remained unchanged. Identifiers and plaintext stayed concealed; changed source/provider probes were rejected.

  • Bug: Unrelated Settings saves failed because plugin SecretInput declarations were missing from runtime sensitivity hints.
  • Fix: The existing manifest contract now supplies those hints and schema cache identity. Write-side identity checks remain unchanged.
  • Compatibility: This is internal metadata derived from an existing manifest contract. It adds no user setting, stored format, migration, or default. This also resolves the generic compatibility checklist item.
Before (dbba8d30da1) After (f914c62a79e)
“Save failed”; unchanged reference appears to change identity Save acknowledged; unrelated edit and original references survive reread and refresh
Safe raw snapshot unavailable Safe raw snapshot available with identifiers concealed

131 focused tests, type-aware lint, formatting, generated documentation checks, and exact-head review passed. Independent browser acceptance covered the user-visible flow; the internal schema-cache requirement has separate regression coverage.

CI exception: Used the approved guarded exception for the sole failing child in completed run 34006723288, attempt 1: check-additional-boundaries. The aggregate gate reflects that failure; all other jobs succeeded or were skipped.

PR #139592, commit 41fba39c40aa, added src/logging/diagnostic-gc.test.ts, increasing the services test group from 720 files in its raw parent to 721 against the unchanged 720 limit. The executed merge 58ddb0adbcae includes that main change. This repair changes no service-root files or guard configuration. Isolated baseline and candidate boundary checks pass; adding only that exact new file to baseline reproduces the same failure. The introducing PR is outside this repair's owned work. Exact failure approval.

vincentkoc added a commit to ylcn91/openclaw that referenced this pull request Sep 6, 2026
* origin/main:
  fix(ci): rebalance services test roots below the memory bound (openclaw#139645)
  fix(backup): exclude shared workspace files from state-only archives (openclaw#139598)
  fix(config): preserve plugin secret references in Settings saves (openclaw#139536)
  fix(ui): retain real-Gateway browser proof across reruns (openclaw#134274)
  fix(browser): preserve node filenames in proxy media (openclaw#139559)
  fix(qa): give hot-reload maintenance proofs their own budgets (openclaw#139580)
  fix(streaming): preserve assistant items and settled output (openclaw#139507)
  fix(android): reconnect secondary gateways after rapid lifecycle changes (openclaw#139319)
  fix(gateway): restart inside a marker-less LaunchAgent no longer kills its caller (openclaw#139628)
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit '5b099995413589f41904cef1413c62239542aa7c':
  fix(ci): rebalance services test roots below the memory bound (#139645)
  fix(backup): exclude shared workspace files from state-only archives (#139598)
  fix(config): preserve plugin secret references in Settings saves (#139536)
  fix(ui): retain real-Gateway browser proof across reruns (#134274)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…nclaw#139536)

Preserve plugin-declared SecretInput references during unrelated Control UI Settings saves. Carry manifest paths into runtime sensitivity hints and schema cache identity without changing reference-identity validation.

Verified real Settings save, persisted reread, browser refresh, wildcard and local-reference behavior, plaintext redaction, and rejection of changed reference identities. Focused tests, type-aware lint, formatting, and generated configuration documentation checks pass.

Co-authored-by: Ayaan Zaidi <[email protected]>
necromman pushed a commit to necromman/openclaw that referenced this pull request Sep 16, 2026
…nclaw#139536)

Preserve plugin-declared SecretInput references during unrelated Control UI Settings saves. Carry manifest paths into runtime sensitivity hints and schema cache identity without changing reference-identity validation.

Verified real Settings save, persisted reread, browser refresh, wildcard and local-reference behavior, plaintext redaction, and rejection of changed reference identities. Focused tests, type-aware lint, formatting, and generated configuration documentation checks pass.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit d6eba6c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants