Skip to content

fix(control-ui): config form save corrupts 64-bit id strings in string|number fields - #126402

Merged
steipete merged 27 commits into
openclaw:mainfrom
solavrc:fix/control-ui-string-number-coercion
Aug 20, 2026
Merged

steipete merged 27 commits into
openclaw:mainfrom
solavrc:fix/control-ui-string-number-coercion

Conversation

@solavrc

@solavrc solavrc commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #126401

What Problem This Solves

The schema-driven Control UI settings form could silently change stored 64-bit identifier strings into rounded JavaScript numbers when any unrelated form field auto-saved. The observed value "1048113311314608148" became 1048113311314608100, which broke the elevated-exec approver match without a visible error.

The historical write path is now reconciled with source: at 2026-08-19 13:01:13 JST the Gateway recorded a successful config.set whose changed paths included tools.elevated.allowFrom.discord; nearby config.patch writes changed only UI preferences or tools.swarm and were not the destructive write.

Why This Change Was Made

Form submission serialized the whole draft and offered numeric-looking strings to a number branch before retaining the authored string branch. Collection drafts had a second loss path: an unquoted string-or-number array item was passed through JSON.parse, which rounds large integers before submit-time code can recover the original text.

This change keeps the repair at form serialization and the input producer boundaries:

  • Loaded strings in mixed primitive unions remain strings; text editors preserve the current/default branch type and use the numeric branch for newly authored exactly representable numbers.
  • Numeric coercion compares integer-valued input with the actual integer represented by the IEEE-754 double via BigInt(number) instead of trusting Number.toString(). Exact values (including 2^53 and zero with large exponents) remain numbers; genuinely lossy values fail validation or use an allowed string branch, while ordinary decimal spellings retain their established form semantics.
  • String-or-number collection drafts honor explicit JSON branch syntax: quoted input is a string, safe unquoted JSON numbers remain numbers, and unsafe integer spellings fall back to the exact string instead of a rounded number.
  • Text editors use the current or inherited-default JS type as the branch hint, so editing an existing provider option number keeps it numeric while existing numeric strings remain strings. Schema-valid explicit boolean branches still commit as booleans.
  • Focused text editors retain the branch hint from the start of the edit across model-driven rerenders. An unset mixed field can therefore accept exact numeric prefixes while typing, then commit the completed unsafe identifier as an exact string instead of leaving a partial numeric prefix persisted.
  • Existing numeric branches switch to a string only when the completed input is a schema-valid unsafe integer spelling; lossy decimals, exponents, and safe numbers that violate numeric constraints remain invalid. Loaded exact large numbers render from their actual integer value, so the UI never displays a spelling that its own parser rejects.
  • The full TypeBox JSON Schema validator is not imported into the startup-loaded config runtime; the prior version of this PR exceeded the Control UI startup bundle gate by about 41 KiB gzip.

Non-goal: this PR does not change form dirty-state tracking.

User Impact

Existing and newly added Discord/Telegram/channel/approval identifiers in string-or-number config fields survive Control UI saves byte-identical and retain string type. Exactly representable number and boolean fields continue to coerce from text as before.

Evidence

  • Focused serializer regression: an untouched constrained oneOf: string | number identifier survives an unrelated save; non-representable numeric-only text remains a string for Gateway rejection.
  • Collection browser regression: quoted and unquoted 64-bit identifiers are committed as the exact string, while safe unquoted JSON numeric text such as 1e5 remains numeric.
  • Scalar browser regression: current and default string/number/boolean branch types survive edits, a valid false literal commits as boolean, and a newly authored unsafe 64-bit identifier remains a string. A focused 19-digit edit is typed one character at a time with a rerender after every accepted patch; the final persisted value is the exact string.
  • Numeric boundary table covers Number.MAX_SAFE_INTEGER, 2^53, negative values, exponent notation, and .0 notation.
  • Exact-number regression rejects spellings that Number() would silently round to a different integer, decimal, or zero (including 1.0000000000000001, 9007199254740991.1, 1e-324, and the shortest-decimal masking case 1000000000000000100 whose actual double integer is 1000000000000000128).
  • Pure number inputs use the same lossless parser, keep invalid source text visible, and refuse to commit lossy integer, decimal, or underflowed values.
  • Chromium Control UI regression drives a real Settings form autosave, inspects the emitted config.set payload, resolves the mocked Gateway write, reloads the page, and reads the exact quoted identifier back from Raw mode.
  • The real isolated Gateway proof builds dist/control-ui, serves that directory from the Gateway, matches the Gateway-served fingerprinted JS bytes to the built file by SHA-256, confirms Chromium loaded that asset path, then changes an unrelated response prefix through the Settings form. It observes one successful config.set, reads the temp config file, reconnects, and confirms quoted Raw-mode read-back.
  • Sanitized exact-head visual proof artifact from manual run 32376001892 at 578605eca79df982d8b581af3e16c4bf4d029f79: before/after screenshots visibly show the same quoted synthetic ID "9223372036854775807" while only proof-before changes to proof-after. The redacted trace records {"configSetRequests":1,"identifierMatches":true,"identifierType":"string","method":"config.set","persistedPrefix":"proof-after","rawReadbackQuoted":true,"servedAssetLoaded":true,"servedAssetPath":"assets/index-BLuV7lQc.js","servedAssetSha256":"0b309e2d2c8aca1dae709c6eec48c0b3a752161dc056fd7fb5a4bf3e75969f3c","uiSource":"gateway-dist-control-ui"}. The proof job and artifact succeeded; remaining fork jobs were intentionally cancelled afterward.
  • Exact-head CI is green at 578605eca79df982d8b581af3e16c4bf4d029f79: all 149 jobs completed with no failures in run 32375940965, including the final openclaw/ci-gate.
  • Control UI unit/browser job: all 713 files / 10,141 tests passed, including array-integrity 15 tests, scalar-integrity 20 tests, numeric constraints 18 tests, and config-draft-model 32 tests.
  • Control UI Chromium E2E shard: config-safe-write.e2e.test.ts passed 4/4, including the unrelated-save identifier round-trip.
  • Compact runtime/UI shard: 222 files / 3,099 tests passed, including config-form rejection/rerender coverage with no detached-input DOM error.
  • Real-Gateway Control UI lane: the built-bundle proof recorded uiSource: gateway-dist-control-ui, a loaded asset path and matching SHA-256, one config.set, exact string type/value, quoted Raw-mode read-back, and clean shutdown; all 3 auth/transport tests passed.
  • The same real-Gateway lane enforces the production bundle budget: startup JS is 339.7 KiB gzip against a 339.9 KiB limit; 347819 B is 796 B over the 347023 B baseline and within the 1056 B tolerance.
  • Review follow-up: quoted/type-less collection strings, explicit boolean literals, existing numeric provider-option branches, lossy decimal/pure-number spellings, exact zero/2^53 boundaries, type-less string const/enum branches, edit-session branch stability, and hidden IEEE-754 integer rounding were independently reproduced and fixed without retyping loaded identifier strings.
  • Delta against the rebased base: source +404/-59, tests +769/-10, workflow +20/-0.

🤖 Generated with Codex

@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 10:51 AM ET / 14:51 UTC.

ClawSweeper review

What this changes

The PR changes Control UI schema-form parsing and serialization so mixed string-or-number settings preserve exact large identifier strings during autosave.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open: current main still has the number-first mixed-union serializer, while this branch repairs that owner boundary and supplies focused browser and real-Gateway proof. No blocking patch defect found; refresh the clean merge result against current main before landing.

Priority: P1
Reviewed head: 578605eca79df982d8b581af3e16c4bf4d029f79

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong real behavior proof and focused regressions support a correct repair, with the remaining concern being integration of a comparatively large config-write change.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR supplies exact-head real-Gateway evidence for the Gateway-served built bundle, one config.set, persisted string type/value, and quoted Raw-mode readback.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR supplies exact-head real-Gateway evidence for the Gateway-served built bundle, one config.set, persisted string type/value, and quoted Raw-mode readback.
Evidence reviewed 7 items Current-main defect: Current main iterates mixed-union variants and returns a numeric coercion for string input before considering a string branch; the numeric helper then directly returns Number(text).
Write-path caller: Autosave captures serializeFormForSubmit before issuing config.set, placing the repair at the producer of persisted configuration bytes.
Branch repair: The branch preserves strings accepted by a mixed union and uses exact rational/BigInt comparison before accepting numeric input.
Findings None None.
Security None None.

Live Verification

Command: pnpm ui:build

Result: PASS (completed)

../dist/control-ui/assets/tool-call-diff-DQwrL9hy.js                                  3.30 kB │ gzip:   1.39 kB │ map:    15.05 kB
../dist/control-ui/assets/cypher-7B-pzmVj.js                                          3.31 kB │ gzip:   1.59 kB │ map:     8.52 kB
../dist/control-ui/assets/tiki-CFRPp0lZ.js                                            3.33 kB │ gzip:   1.35 kB │ map:    12.42 kB
../dist/control-ui/assets/session-row-badges-E7E7elKn.js                              3.39 kB │ gzip:   1.38 kB │ map:    10.82 kB
../dist/control-ui/assets/src-D1dFnB82.js                                             3.42 kB │ gzip:   1.40 kB │ map:   409.50 kB
../dist/control-ui/assets/vhdl-BZddcJrO.js                                            3.42 kB │ gzip:   1.59 kB │ map:     9.62 kB
../dist/control-ui/assets/sparql-DyxwoOhd.js                                          3.44 kB │ gzip:   1.68 kB │ map:     9.50 kB
../dist/control-ui/assets/catalog-target-D6HaM3XP.js                                  3.49 kB │ gzip:   1.43 kB │ map:    11.35 kB
../dist/control-ui/assets/update-confirmation.runtime-wkAS3Y60.js                     3.50 kB │ gzip:   1.40 kB │ map:    11.06 kB
../dist/control-ui/assets/grouping-DF3u0Qpl.js                                        3.50 kB │ gzip:   1.48 kB │ map:    16.90 kB
../dist/control-ui/assets/dist-nzjtGiB0.js                                            3.51 kB │ gzip:   1.82 kB │ map:     6.97 kB
../dist/control-ui/assets/mscgen-B32__qDo.js                                          3.61 kB │ gzip:   1.07 kB │ map:     9.69 kB
../dist/control-ui/assets/exec-approval-CE_S3Eaf.js                                   3.63 kB │ gzip:   1.56 kB │ map:    10.40 kB
../dist/control-ui/assets/data-DYng2a2k.js                                            3.71 kB │ gzip:   1.46 kB │ map:    13.90 kB
../dist/control-ui/assets/app-sidebar-workboard.runtime-BqiAwBf4.js                   3.73 kB │ gzip:   1.49 kB │ map:    10.48 kB
../dist/control-ui/assets/dashboards-page-Dt5JjVx7.js                                 3.77 kB │ gzip:   1.55 kB │ map:     8.90 kB
../dist/control-ui/assets/d-CHTIqqSE.js                                               3.79 kB │ gzip:   1.78 kB │ map:    10.87 kB
../dist/control-ui/assets/vb-r_8gcpmz.js                                              3.79 kB │ gzip:   1.93 kB │ map:    11.63 kB
../dist/control-ui/assets/q-DgUvnPlH.js                                               3.79 kB │ gzip:   1.77 kB │ map:     9.81 kB
../dist/control-ui/assets/swift-Bj43ctJA.js                                           3.89 kB │ gzip:   1.93 kB │ map:    10.80 kB
../dist/control-ui/assets/session-progress-cards-BETIKhbG.js                          3.92 kB │ gzip:   1.72 kB │ map:    16.23 kB
../dist/control-ui/assets/heartbeat-display-DrOTiPmd.js                               3.93 kB │ gzip:   1.85 kB │ map:    16.66 kB
../dist/control-ui/assets/session-placement-recovery-B3keS6pz.js                      3.94 kB │ gzip:   1.54 kB │ map:    19.85 kB
../dist/control-ui/assets/fortran-DZ1KI-Ge.js                                         3.97 kB │ gzip:   2.02 kB │ map:     9.72 kB
../dist/control-ui/assets/coffeescript-B7AjrdCL.js                                    3.98 kB │ gzip:   1.78 kB │ map:    13.74 kB
../dist/control-ui/assets/place-browser-Dfk_dH9L.js                                   4.05 kB │ gzip:   1.43 kB │ map:     9.84 kB
../dist/control-ui/assets/asn1-B1dG7mN_.js                                            4.06 kB │ gzip:   2.04 kB │ map:    10.99 kB
../dist/control-ui/assets/dylan-Dgw7ONEs.js                                           4.15 kB │ gzip:   1.72 kB │ map:    13.98 kB
../dist/control-ui/assets/asterisk-Diryl_rN.js                                        4.19 kB │ gzip:   1.83 kB │ map:     9.30 kB
../dist/control-ui/assets/livescript-B5wMXth4.js                                      4.19 kB │ gzip:   1.72 kB │ map:     9.99 kB
../dist/control-ui/assets/ttcn-cfg-CX9fFXmr.js
… output truncated …

Assertions:

  • PASS expect_output: built in

How this fits together

Control UI turns Gateway configuration snapshots into schema-driven editors, then submits changed form state through Gateway config writes. The changed code chooses and preserves primitive branches before that persistent write boundary.

flowchart LR
A[Gateway config snapshot] --> B[Control UI schema form]
B --> C[Scalar and collection editors]
C --> D[Lossless branch selection]
D --> E[Gateway config write]
E --> F[Persisted configuration]
Loading

Before merge

  • Resolve merge risk (P1) - Mixed-union form persistence is compatibility-sensitive: submit-time coercion now defers ambiguous string input to editor branch selection and Gateway validation, so uncommon schemas still need the existing focused regression suite on the integrated result.
  • Resolve merge risk (P2) - The bug fix adds net +345 production lines across scalar editing, numeric parsing, and collection parsing; the separate loss paths justify the growth, but this config-write logic should remain centralized rather than gain further fallback paths.
  • Resolve merge risk (P1) - The branch is behind current main although GitHub reports it cleanly mergeable; refresh the targeted real-Gateway proof after integration rather than treating stale-base drift as a code finding.
  • Complete next step (P2) - No repair lane is needed because no actionable patch defect was found; the remaining action is normal integrated-result review.
Agent review details

Security

None.

PR surface

Source +345, Tests +759, Config +20. Total +1124 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 7 404 59 +345
Tests 6 769 10 +759
Docs 0 0 0 0
Config 1 20 0 +20
Generated 0 0 0 0
Other 0 0 0 0
Total 14 1193 69 +1124

Review metrics

Metric Value Why it matters
Production versus test delta production +404/-59 (net +345); tests +769/-10 (net +759); workflow +20/-0 The production growth is concentrated in lossless primitive parsing and focused edit-session state, with boundary and real-Gateway regressions added alongside it.
Config write boundary 1 serialization boundary changed; 0 config keys, migrations, or defaults added The PR changes how existing mixed-union values are typed at persistence time without introducing a new operator setting or migration.

Stored data model

Persistent data-model change detected: serialized state: ui/src/components/config-form-array-integrity.browser.test.ts, serialized state: ui/src/components/config-form-collection-draft.ts, serialized state: ui/src/e2e/config-safe-write.e2e.test.ts, serialized state: ui/src/e2e/control-ui-auth-transports.e2e.test.ts, vector/embedding metadata: ui/src/components/config-form-array-integrity.browser.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #126401
Summary: This PR is the explicit candidate fix for the linked Control UI identifier-corruption report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Refresh the integrated config proof (recommended)
    Update against current main or validate the clean merge result, then rerun the built-bundle real-Gateway identifier round trip before merge.
  2. Accept the reviewed head
    Merge the branch only if maintainers explicitly accept its exact-head evidence without a current-main integration refresh.

Technical review

Best possible solution:

Integrate the lossless form-boundary repair with current main, retain one shared exact-number parser, and rerun the real-Gateway configuration round trip on the merge result.

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

Yes—current main's number-first mixed-union serializer provides a high-confidence source path, and the supplied real-Gateway regression uses an unrelated Control UI save to exercise it.

Is this the best way to solve the issue?

Yes—the repair acts at the form producer and serialization boundary, rather than attempting to recover rounded identifiers downstream after the Gateway write.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 855599d7e940.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies exact-head real-Gateway evidence for the Gateway-served built bundle, one config.set, persisted string type/value, and quoted Raw-mode readback.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR supplies exact-head real-Gateway evidence for the Gateway-served built bundle, one config.set, persisted string type/value, and quoted Raw-mode readback.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: This fixes a silent Control UI configuration corruption path that can invalidate operator identifier allowlists.
  • merge-risk: 🚨 compatibility: The PR changes type selection for existing mixed string-or-number configuration fields during form persistence.
  • merge-risk: 🚨 automation: The PR changes the CI real-Gateway lane to build the Control UI and optionally capture and upload proof artifacts.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR supplies exact-head real-Gateway evidence for the Gateway-served built bundle, one config.set, persisted string type/value, and quoted Raw-mode readback.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies exact-head real-Gateway evidence for the Gateway-served built bundle, one config.set, persisted string type/value, and quoted Raw-mode readback.

Evidence

What I checked:

Likely related people:

  • Koduri Mahesh Bhushan Chowdary: Current-main blame attributes the number-first mixed-union coercion branch to this commit. (role: current-line author; confidence: medium; commits: bb134fef1246; files: ui/src/lib/config/config-draft-model.ts)
  • Vincent Koc: Local symbol history associates this contributor with an earlier shared config-validation refactor in the affected form infrastructure. (role: adjacent config-form refactor contributor; confidence: low; commits: b3ce00b480d4; files: ui/src/components/config-form.numeric.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the real-Gateway config round trip after integrating the branch with current main.

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 (21 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-20T09:27:11.048Z sha 7da040c :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T09:50:38.244Z sha 8394036 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T10:19:05.773Z sha 0e64f31 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-20T10:35:29.061Z sha 0e64f31 :: needs real behavior proof before merge. :: [P2] Prove the Gateway-served Control UI bundle
  • reviewed 2026-08-20T10:54:09.543Z sha 71099a7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T11:53:16.954Z sha 71099a7 :: needs changes before merge. :: [P1] Keep the initial branch while typing identifiers | [P2] Compare large integers against the actual double
  • reviewed 2026-08-20T12:49:21.258Z sha cdbfb2b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T14:09:35.867Z sha 578605e :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 19, 2026
solavrc and others added 2 commits August 20, 2026 12:31
Saving the schema-driven config form coerced every numeric-looking string
to a JS number before submission. For union-typed fields such as
tools.elevated.allowFrom.* (anyOf: string | number), string entries
holding 64-bit ids (Discord/Telegram snowflakes) were rewritten through
Number(), which rounds past 2^53:
"1048113311314608148" -> 1048113311314608100. The corruption also hit
untouched fields, because serialization coerces the whole form, so merely
saving an unrelated setting silently broke elevated-approval allowlists
(fail-closed: the real user id no longer matched).

Two guards fix this:
- coerceFormValues keeps a string that already satisfies a string variant
  of an anyOf/oneOf union instead of parsing it into another variant's
  number.
- coerceConfigFormNumberString refuses lossy integer parses: plain
  integer text beyond Number.MAX_SAFE_INTEGER that does not round-trip
  through BigInt stays a string, so pure number/integer fields fail
  validation loudly instead of storing a corrupted id.

Co-Authored-By: Claude Fable 5 <[email protected]>
@solavrc
solavrc force-pushed the fix/control-ui-string-number-coercion branch from 73033af to b4a92c5 Compare August 20, 2026 03:35
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 20, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 20, 2026
@solavrc

solavrc commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@solavrc

solavrc commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@clawsweeper clawsweeper Bot added 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. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 20, 2026
@solavrc

solavrc commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cdbfb2b339

ℹ️ 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".

@solavrc

solavrc commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@solavrc

solavrc commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 578605eca7

ℹ️ 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".

@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 Aug 20, 2026
@steipete
steipete merged commit 55f1738 into openclaw:main Aug 20, 2026
204 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 21, 2026
…g|number fields (openclaw#126402)

* fix(control-ui): stop config form save from corrupting 64-bit id strings

Saving the schema-driven config form coerced every numeric-looking string
to a JS number before submission. For union-typed fields such as
tools.elevated.allowFrom.* (anyOf: string | number), string entries
holding 64-bit ids (Discord/Telegram snowflakes) were rewritten through
Number(), which rounds past 2^53:
"1048113311314608148" -> 1048113311314608100. The corruption also hit
untouched fields, because serialization coerces the whole form, so merely
saving an unrelated setting silently broke elevated-approval allowlists
(fail-closed: the real user id no longer matched).

Two guards fix this:
- coerceFormValues keeps a string that already satisfies a string variant
  of an anyOf/oneOf union instead of parsing it into another variant's
  number.
- coerceConfigFormNumberString refuses lossy integer parses: plain
  integer text beyond Number.MAX_SAFE_INTEGER that does not round-trip
  through BigInt stays a string, so pure number/integer fields fail
  validation loudly instead of storing a corrupted id.

Co-Authored-By: Claude Fable 5 <[email protected]>

* fix(control-ui): harden 64-bit config id preservation

* fix(control-ui): validate mixed-union scalar branches

* test(control-ui): prove real gateway id preservation

* test(control-ui): use communications route for config proof

* test(control-ui): grant config proof admin scope

* test(control-ui): reopen raw config for proof

* fix(control-ui): preserve explicit union input types

* test(control-ui): exercise union collection draft

* ci: retry flaky control ui e2e

* fix(control-ui): preserve mixed scalar branch types

* ci: retry service worker e2e

* fix(control-ui): preserve typeless string union branches

* fix(control-ui): reject lossy decimal coercion

* fix(control-ui): reject lossy pure numeric input

* fix(control-ui): preserve exact numeric branch semantics

* ci: retry checkout rate limit

* ci(control-ui): capture real gateway proof

* test(control-ui): frame config proof values

* ci: retry checkout download

* test(control-ui): prove Gateway-served production bundle

* fix(control-ui): preserve exact incremental union edits

* refactor(control-ui): isolate scalar edit session state

* fix(control-ui): keep scalar edit branch type internal

* fix(control-ui): avoid detached focus selector

* fix(control-ui): round-trip exact numeric branches

* refactor(control-ui): share exact scalar formatting

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

[Bug]: Control UI config form save corrupts 64-bit id strings (string→number coercion past 2^53)

2 participants