-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
config.patch persists a redaction-truncated array from config.get → silent data loss of bindings[] #90540
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
A
config.getwhose response is redaction-truncated for a large array can be round-tripped into a destructiveconfig.patch: the truncated array is persisted over the full one, silently destroying every element that the read omitted. We hit this onbindings[]and lost almost all routing bindings from a single innocuous edit.Version: OpenClaw 2026.3.13 (
61d171a)Component: gateway config tool (
gatewayactionsconfig.get/config.patch) + the config redaction layer.What happens
gatewaytool) callsconfig.getto add one entry tobindings[].bindings[]array in the returned config. Observed log line:config.patchwithchangedPaths=bindings.bindings[]collapsed from 82 entries to 2. 80 routing bindings were destroyed by an edit that intended to add one.Impact
For multi-agent routing this is severe: with most bindings gone, unbound peers fall through to a single catch-all agent, so messages are answered by the wrong agent (a cross-tenant data exposure in our deployment). A redaction feature meant to protect a read became a silent write-side data-loss bug. The auto-backup (
openclaw.json.bak) is what allowed recovery.Expected
A redacted/truncated value must never be writable back over the full value. Any of:
config.getshould not truncate arrays that callers may patch (or should return full data when the caller has write intent / for round-trip use); orconfig.patchshould reject (or require an explicit override for) a write of a key whose source read was truncated; orconfig.patchfor array keys should be merge/diff-based rather than wholesale-replace, so a short array can't clobber a long one.Repro sketch
bindings[](or any array) is long enough to trigger redaction truncation onconfig.get.gateway config.get, observe thebindings[] has been truncatedlog and the shortened array in the response.gateway config.patchwithchangedPaths=bindings, sending back the array from step 2 (plus one appended item).Happy to provide more detail or test a fix.