Repository navigation
fix(wizard): preserve typed plugin enum values (#127577) - #138090
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87528e7879
ℹ️ 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".
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 1:09 PM ET / 17:09 UTC (Revision 15). ClawSweeper reviewWhat this changesThe plugin configuration wizard restores selected enum values to their JSON types, and the shared config writer preserves selected nulls and numeric object keys during saves. Merge readiness✅ Ready for maintainer review Current main still stores plugin enum selections as strings. This PR addresses that bug and the null-persistence failure it exposes; the overlapping open PR does not make this branch obsolete. Priority: P2 Review scores
Verification
How this fits togetherThe terminal setup wizard reads plugin schema choices and passes selected configuration to the shared writer. The writer merges those choices with existing configuration before validation and disk persistence. flowchart LR
A[Plugin schema] --> B[Terminal wizard]
B --> C[Typed selection]
D[Existing configuration] --> E[Shared config writer]
C --> E
E --> F[Merge and validation]
F --> G[Saved configuration]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +55, Tests +241. Total +296 across 6 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one canonical wizard and writer path that preserves schema types, selected nulls, and existing configuration; reconcile the overlapping wizard PR when one fix lands. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source still writes the selected enum token as a string, and the linked report and captured before-fix CLI trace show the resulting validation failure; I did not execute the checkout. Is this the best way to solve the issue? Yes. Restoring the schema member at selection and preserving literal null at the existing shared write boundary addresses the observed failure without adding a competing persistence path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 26b464fcdfea. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
87528e7 to
4970965
Compare
|
@clawsweeper re-review Addressed the nullable persistence finding on exact head
The PR body now contains the complete before/after proof and updated production/test delta. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
8875949 to
d7857a3
Compare
|
@clawsweeper re-review Exact-head proof and the remaining persistence-source review finding are now addressed at
The PR body contains the complete redacted before/after trace, compatibility statement, and updated production/test delta. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Added exact-head production-writer compatibility evidence to the PR description: literal null, intentional deletion, preserved numeric type, and a concurrent edit all round-trip correctly. No source changes. @clawsweeper re-review |
|
Resolved the current-main conflicts in 838c0c678bfefc522797a15777655c9468f584a9, preserving the new writer return contract and canonical array-index parser. GitHub now reports MERGEABLE. On the merged source, 174 focused tests, changed checks, full build, actual numeric-key writer proof, and independent main-relative review pass. Updated the body with this integration evidence. @clawsweeper re-review |
|
CI attribution added to the body: run 34253402962 fails on the catalog UI refreshIfDue request type, missing invalidateModelCatalogCache export, and 11 catalog UI tests. The entire UI, Gateway protocol, and Gateway source trees are unchanged from merged main 04869ae. The wizard/config proof and scoped gates pass; I am leaving the unrelated main-base UI repair out of this PR. |
|
Refreshed the base in 878aefa79cd9e81787ec24034fc3c4846bcc153b with canonical CI repair #142346. The contributor patch ID is unchanged. The previously failing UI typecheck and all 11 catalog tests now pass; 185 focused tests, changed checks, build, and real writer proof pass. Fresh exact-head CI is running. The body distinguishes the historical red run from this recovery. @clawsweeper re-review |
|
The exact-head CI gate is now green on 878aefa79cd9e81787ec24034fc3c4846bcc153b. The canonical #142346 base repair resolved the prior catalog UI type/test failures without changing the contributor patch. Updated the body with the completed CI recovery. |
|
Resolved the current-main conflict in f74e5bb519d115dd51210884a79964e58c6683b5. Main recovery hooks and typed/null writes are retained; the prepared-commit callback observes restored nulls before persistence. A real isolated writer probe passes, 197 focused tests and both relocated numeric-key tests pass, staged changed checks pass, and independent P2 review found no actionable defect. The two numeric-key regressions moved unchanged to a small sibling file to satisfy the current line-growth gate. The body records exact proof and remaining CI status. @clawsweeper re-review |
|
The conflict is resolved and the focused writer proof, 197 tests, relocated tests, changed checks, and independent review pass. Hosted run35838749679 failed in the unchanged Gateway abort-authorization test while waiting for sessions.changed after receiving chat. I recorded the exact failure and source comparison in the body; I am not claiming a pristine-main reproduction or a flake diagnosis. GitHub denied my failed-job-only rerun with Must have admin rights to Repository. Could a maintainer run gh run rerun 35838749679 --repo openclaw/openclaw --failed? |
0ea0e7d to
7dbc956
Compare
Use opaque enum indices in plugin config prompts and map selections back to structured-cloned schema values. Current main rejects a numeric wizard selection as a string; the built CLI now stores a number and passes canonical validation.
Render JSON-schema enum values with JSON-aware labels so structured and mixed-type choices remain distinguishable while opaque tokens preserve their original types. Verified through the built config wizard and canonical config validation.
Compose wizard-selected nulls into a clone of the caller's explicit-set source instead of replacing it. The persistence regression fails before the fix when both sources participate in one write.
Keep existing record containers while retaining array inference for non-record parents. Real wizard persistence no longer turns numeric-key accounts into arrays or drops backup entries. 117 focused tests, changed checks, build, and independent review pass.
7dbc956 to
631efa1
Compare
|
Merged via squash.
|
* commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (2027 commits) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) fix(telegram): stop leaking raw file:// markdown links in messages (#137810) refactor(claws): share resource capability changes (#154680) improve(channels): reduce redundant preparation for button messages (#157050) fix(build): package preparation fails on unrelated test types (#157318) refactor(claws): share bounded document reading (#157436) ...
* refactor(config): share config doc wildcard traversal * refactor(config): refresh wildcard traversal on frozen main Integrate the frozen main baseline while preserving the documentation wildcard extraction and its public renderer coverage. * chore: merge main for config doc validation * commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (2027 commits) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) fix(telegram): stop leaking raw file:// markdown links in messages (#137810) refactor(claws): share resource capability changes (#154680) improve(channels): reduce redundant preparation for button messages (#157050) fix(build): package preparation fails on unrelated test types (#157318) refactor(claws): share bounded document reading (#157436) ... Co-authored-by: Vincent Koc <[email protected]>
* commit 'a0905dfe5c17053a3f0ef2aa0cf8f421bce9381c': (75 commits) fix: preserve conversation titles across split-pane agent switches (#157482) test(gateway): settle resumed work before checking announcement fix(update): avoid socket-arrival assumptions in deadline tests (#157504) fix(ci): include Android Access in release coordination refactor: share LINE message context test fixtures (#157488) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) ...
* commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (1903 commits) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) fix(telegram): stop leaking raw file:// markdown links in messages (#137810) refactor(claws): share resource capability changes (#154680) improve(channels): reduce redundant preparation for button messages (#157050) fix(build): package preparation fails on unrelated test types (#157318) refactor(claws): share bounded document reading (#157436) ...
* refactor(acp): consolidate scalar runtime option validation * chore: merge main for ACP validation * commit 'a0905dfe5c17053a3f0ef2aa0cf8f421bce9381c': (75 commits) fix: preserve conversation titles across split-pane agent switches (#157482) test(gateway): settle resumed work before checking announcement fix(update): avoid socket-arrival assumptions in deadline tests (#157504) fix(ci): include Android Access in release coordination refactor: share LINE message context test fixtures (#157488) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) ... Co-authored-by: Vincent Koc <[email protected]>
* refactor(agents): centralize tool description exclusions * Merge main into refactor/tool-description-exclusions-20260915 * commit '84114b5a2711764e2ca333e327e808fd88316063': (40 commits) improve(sessions): reuse compiled transcript metadata queries (#148773) fix(ci): repair Copilot contracts and config failure diagnostics (#149001) test: align model auth and setup fixtures with current behavior (#149023) refactor: reuse web search request context (#148949) fix(ci): remove duplicate Copilot auth metadata (#149016) test(agents): align auth fixtures with runtime store reads (#149004) improve: reduce data fetched during reminder maintenance (#148996) fix(cron): skip availability checks when session pruning is idle (#148920) fix(auth): guard GitHub Copilot device flow authority (#148999) fix(agents): prevent early recovery aborts of foreground exec (#148959) fix(github-copilot): remove retired Raptor mini (#116505) improve(feishu): reduce preparation work for documents with tables (#148997) improve: reduce database work when recording participants (#148841) test: accept Bun error labels in plugin assertions (#148955) fix(models): clarify saved account health and catalog status (#148987) test(plugins): align Copilot auth-choice registry expectations (#148981) fix(channels): reject blank integer channel add options (#145534) fix(ui): preserve archive undo after chat navigation (#148831) feat: show cited source previews in macOS and iOS chat (#148906) fix: avoid redundant tab updates while chats stream (#148865) ... * refactor(agents): consolidate tool description exclusions * chore: merge main for tool summary validation * commit '926bb1e1d75c6b102bcbf93114c690312c23cf18': (1903 commits) refactor(matrix): reuse startup verification account key (#157310) perf(config): avoid repeated environment scans during publication (#156457) chore(i18n): refresh native locales (#157495) fix(update): show quiet step progress and date recorded outcomes (#153407) feat(gateway): preserve browser sign-in requirements before connecting (#157454) test(scripts): await CLI admission fixture lifetimes (#157424) fix(ci): preserve consumer selection across core type stripes (#157373) fix(wizard): preserve typed plugin enum values (#127577) (#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (#157458) test: prebuild run-node signal fixture (#157478) refactor(exec): reuse approval policy rule keys (#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (#157365) fix(config): apply Gateway writes without waiting for file events (#157372) fix: count recorded nested tool operations once (#157438) fix(telegram): stop leaking raw file:// markdown links in messages (#137810) refactor(claws): share resource capability changes (#154680) improve(channels): reduce redundant preparation for button messages (#157050) fix(build): package preparation fails on unrelated test types (#157318) refactor(claws): share bounded document reading (#157436) ... Co-authored-by: Vincent Koc <[email protected]>
…nclaw#138090) * fix(wizard): preserve typed plugin enum values (openclaw#127577) Use opaque enum indices in plugin config prompts and map selections back to structured-cloned schema values. Current main rejects a numeric wizard selection as a string; the built CLI now stores a number and passes canonical validation. * fix(config): preserve wizard-selected null values * fix(wizard): distinguish typed enum labels (openclaw#127577) Render JSON-schema enum values with JSON-aware labels so structured and mixed-type choices remain distinguishable while opaque tokens preserve their original types. Verified through the built config wizard and canonical config validation. * fix(wizard): preserve caller explicit value sources (openclaw#127577) Compose wizard-selected nulls into a clone of the caller's explicit-set source instead of replacing it. The persistence regression fails before the fix when both sources participate in one write. * fix(config): preserve numeric object keys in explicit writes Keep existing record containers while retaining array inference for non-record parents. Real wizard persistence no longer turns numeric-key accounts into arrays or drops backup entries. 117 focused tests, changed checks, build, and independent review pass.
* refactor(config): share config doc wildcard traversal * refactor(config): refresh wildcard traversal on frozen main Integrate the frozen main baseline while preserving the documentation wildcard extraction and its public renderer coverage. * chore: merge main for config doc validation * commit 'e0f58a77476acbe382bff5e55cd520e9d228d478': (2027 commits) refactor(matrix): reuse startup verification account key (openclaw#157310) perf(config): avoid repeated environment scans during publication (openclaw#156457) chore(i18n): refresh native locales (openclaw#157495) fix(update): show quiet step progress and date recorded outcomes (openclaw#153407) feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454) test(scripts): await CLI admission fixture lifetimes (openclaw#157424) fix(ci): preserve consumer selection across core type stripes (openclaw#157373) fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458) test: prebuild run-node signal fixture (openclaw#157478) refactor(exec): reuse approval policy rule keys (openclaw#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365) fix(config): apply Gateway writes without waiting for file events (openclaw#157372) fix: count recorded nested tool operations once (openclaw#157438) fix(telegram): stop leaking raw file:// markdown links in messages (openclaw#137810) refactor(claws): share resource capability changes (openclaw#154680) improve(channels): reduce redundant preparation for button messages (openclaw#157050) fix(build): package preparation fails on unrelated test types (openclaw#157318) refactor(claws): share bounded document reading (openclaw#157436) ... Co-authored-by: Vincent Koc <[email protected]>
…#157446) * refactor(acp): consolidate scalar runtime option validation * chore: merge main for ACP validation * commit 'a2532ef8d2eb80fd2fd391ef7ea645c051f8be9c': (75 commits) fix: preserve conversation titles across split-pane agent switches (openclaw#157482) test(gateway): settle resumed work before checking announcement fix(update): avoid socket-arrival assumptions in deadline tests (openclaw#157504) fix(ci): include Android Access in release coordination refactor: share LINE message context test fixtures (openclaw#157488) refactor(matrix): reuse startup verification account key (openclaw#157310) perf(config): avoid repeated environment scans during publication (openclaw#156457) chore(i18n): refresh native locales (openclaw#157495) fix(update): show quiet step progress and date recorded outcomes (openclaw#153407) feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454) test(scripts): await CLI admission fixture lifetimes (openclaw#157424) fix(ci): preserve consumer selection across core type stripes (openclaw#157373) fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458) test: prebuild run-node signal fixture (openclaw#157478) refactor(exec): reuse approval policy rule keys (openclaw#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365) fix(config): apply Gateway writes without waiting for file events (openclaw#157372) fix: count recorded nested tool operations once (openclaw#157438) ... Co-authored-by: Vincent Koc <[email protected]>
…8966) * refactor(agents): centralize tool description exclusions * Merge main into refactor/tool-description-exclusions-20260915 * commit '4a994031abb1b54d51b76755a55ac8f6e918162d': (40 commits) improve(sessions): reuse compiled transcript metadata queries (openclaw#148773) fix(ci): repair Copilot contracts and config failure diagnostics (openclaw#149001) test: align model auth and setup fixtures with current behavior (openclaw#149023) refactor: reuse web search request context (openclaw#148949) fix(ci): remove duplicate Copilot auth metadata (openclaw#149016) test(agents): align auth fixtures with runtime store reads (openclaw#149004) improve: reduce data fetched during reminder maintenance (openclaw#148996) fix(cron): skip availability checks when session pruning is idle (openclaw#148920) fix(auth): guard GitHub Copilot device flow authority (openclaw#148999) fix(agents): prevent early recovery aborts of foreground exec (openclaw#148959) fix(github-copilot): remove retired Raptor mini (openclaw#116505) improve(feishu): reduce preparation work for documents with tables (openclaw#148997) improve: reduce database work when recording participants (openclaw#148841) test: accept Bun error labels in plugin assertions (openclaw#148955) fix(models): clarify saved account health and catalog status (openclaw#148987) test(plugins): align Copilot auth-choice registry expectations (openclaw#148981) fix(channels): reject blank integer channel add options (openclaw#145534) fix(ui): preserve archive undo after chat navigation (openclaw#148831) feat: show cited source previews in macOS and iOS chat (openclaw#148906) fix: avoid redundant tab updates while chats stream (openclaw#148865) ... * refactor(agents): consolidate tool description exclusions * chore: merge main for tool summary validation * commit 'e0f58a77476acbe382bff5e55cd520e9d228d478': (1903 commits) refactor(matrix): reuse startup verification account key (openclaw#157310) perf(config): avoid repeated environment scans during publication (openclaw#156457) chore(i18n): refresh native locales (openclaw#157495) fix(update): show quiet step progress and date recorded outcomes (openclaw#153407) feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454) test(scripts): await CLI admission fixture lifetimes (openclaw#157424) fix(ci): preserve consumer selection across core type stripes (openclaw#157373) fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090) fix(qa): title mock Code Mode fixture calls refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458) test: prebuild run-node signal fixture (openclaw#157478) refactor(exec): reuse approval policy rule keys (openclaw#157198) fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365) fix(config): apply Gateway writes without waiting for file events (openclaw#157372) fix: count recorded nested tool operations once (openclaw#157438) fix(telegram): stop leaking raw file:// markdown links in messages (openclaw#137810) refactor(claws): share resource capability changes (openclaw#154680) improve(channels): reduce redundant preparation for button messages (openclaw#157050) fix(build): package preparation fails on unrelated test types (openclaw#157318) refactor(claws): share bounded document reading (openclaw#157436) ... Co-authored-by: Vincent Koc <[email protected]>
Closes #127577
What Problem This Solves
The plugin configuration wizard displays numeric, boolean, null, and structured JSON-Schema enum values, but current main stores the selected display text as a string. A valid numeric selection therefore fails canonical validation, while a correctly typed null can be silently removed by the shared wizard merge.
Why This Change Was Made
promptPluginFieldsnow uses enum indices as opaque prompt tokens and resolves the chosen token back to a structured clone of the original schema value.The shared wizard writer records null-valued paths changed by the wizard as explicit writes. It composes those paths and values with any explicit-write source supplied by the caller, preserving literal nulls without discarding caller-owned persistence intent.
User Impact
Plugin authors can expose typed enum fields through
uiHints; operators can select those values without the wizard changing their JSON type, deleting a selected null, or producing invalid config.Root Cause
src/wizard/setup.plugin-config.ts: enum options usedString(value)as both their display label and stored selection value.src/wizard/setup.shared.ts: after typed values were restored, RFC merge-patch treated literal null as deletion at both the concurrent-merge and persistence boundaries.explicitSetValueSource; mixed caller/wizard explicit writes could therefore lose the caller's source values.openclaw configure --section plugins->configurePluginConfig->writeWizardConfigFile-> canonical config validation and save.Changes
src/wizard/setup.plugin-config.ts: use collision-safe enum indices and restore the original structured value after selection.src/wizard/setup.shared.ts: preserve wizard-changed literal-null paths as explicit writes and overlay them onto a clone of the caller's explicit-write source.src/wizard/setup.plugin-config.test.ts: cover numeric, boolean, object, and mixed-type enum labels and values.src/wizard/setup.shared.test.ts: cover root and nested null persistence, concurrent edits, and composition with an existing caller-owned explicit path.Real Behavior Proof
Built CLI at exact head
d7857a33df0b8d0bd4b7db778e677a502330f8c6, isolatedOPENCLAW_STATE_DIR, and a synthetic locally linked plugin.Before, current main at reproduction time (
b3b7bcc8aee7f0813b2a1484e6a1c5899ede585b) with integer enum[1, 2]:After, exact head with schema type
["integer", "null"]and enum[1, null, false, "false", {"mode":"safe"}]:The same exact-head CLI also passed
configure --help. A malformed--strict-jsonvalue exited 1 and returned an actionable valid-JSON/config-patch hint.Evidence
2became"2", booleanfalsebecame"false", and an object became"[object Object]".node scripts/run-vitest.mjs src/wizard/setup.plugin-config.test.ts src/wizard/setup.shared.test.ts src/config/merge-patch.test.ts src/config/merge-patch.proto-pollution.test.ts- 58 passed across two shards.node scripts/check-changed.mjs -- src/wizard/setup.plugin-config.ts src/wizard/setup.plugin-config.test.ts src/wizard/setup.shared.ts src/wizard/setup.shared.test.ts- passed.pnpm build- passed on exact head.git diff --check- passed.Risk
Changelog
n/a - repository policy derives release notes from the PR user-impact and evidence sections.
Notes
Existing-config compatibility proof (2026-09-08)
Re-ran the actual built
writeWizardConfigFileat headd7857a33df0b8d0bd4b7db778e677a502330f8c6against a fresh synthetic plugin and existing configuration. One writer invocation changed a string enum and selected a literal null, omitted a property intentionally, and merged an independently changed disk value.The starting config contained
choice: 1,keepNumber: 1,stringChoice: "legacy", anddeleteMe: "remove-me". The wizard selectedchoice: nullandstringChoice: "updated", keptkeepNumber, and removeddeleteMe. A concurrent writer changedconcurrentfrom"base"to"external". The resulting disk config preserved all four intents. This exercises the production merge and persistence boundary rather than a mock or test double. No schema migration is needed for this unchanged config shape. The temporary fixture was removed; no operator config or Gateway was used.Numeric object-key restoration repair (2026-09-08)
Commit
d5ae4c1578efae7a21a1c9a4e848a044fff1f2bffixes the newly reported numeric-key loss at the canonical persistence owner,setPathValueCreatingParentsinsrc/config/io.write-prepare.ts. Existing object containers remain objects even when a path segment is numeric. Existing arrays and array inference for non-record parents retain their previous behavior.The real built
writeWizardConfigFilesave boundary reproduced the pre-fix failure:accountsbecame an array and thebackupsibling disappeared. After rebuilding the repaired source, the same synthetic existing-config scenario passes:The wizard changed only
accounts.0.choicefrom1tonull. This was a production disk-write/readback probe, not a mocked writer. The temporary fixture was removed after validation.io.write-prepare.test.ts: 106 passed; numeric-object restoration and missing array parents covered.setup.shared.test.ts: 11 passed.pnpm build: passed.node scripts/check-changed.mjs -- src/config/io.write-prepare.ts src/config/io.write-prepare.test.ts: passed, including the previously interrupted later guards.git diff --check, and independent P2 review: passed/no accepted findings.Current-main integration (2026-09-08)
Merged main
04869ae4899ad0524c3287759798362b0d62fef8in838c0c678bfefc522797a15777655c9468f584a9to resolve the confirmed conflicts. Preserved main's canonical array-index parser and shared writer commit-result return contract while retaining typed enums, literal nulls, and numeric object keys.On the merged source: 174 focused tests passed, changed-file checks and full build passed, and independent review against main found no accepted P0-P2 findings. The real built writer again persisted
{"accounts":{"0":{"choice":null},"backup":{"choice":2}}}withaccountsIsArray=falseandbackupPreserved=true. The proof imported the named export from the new.mjsbuild output; no product change was needed for that artifact extension change.Hosted CI attribution (historical head 838c0c678bf)
Run https://github.com/openclaw/openclaw/actions/runs/34253402962 is red outside this PR's changes. The four failed type lanes report
ui/src/pages/model-providers/catalog-discovery.ts:94:refreshIfDueis absent from the request type. One lane also reports the missinginvalidateModelCatalogCacheexport used by the catalog UI test. The failed test shard reports 11 failures inmodel-providers-page.catalog.test.ts; its other 310 files pass.The complete
ui,packages/gateway-protocol, andsrc/gatewaytrees are byte-identical between head838c0c678bfefc522797a15777655c9468f584a9and its merged main04869ae4899ad0524c3287759798362b0d62fef8(git diff --exit-codeis clean). This wizard/config persistence patch does not change those types, requests, cache APIs, or tests. These are main-base catalog UI failures, not a green CI claim or a reason to weaken tests. They remain outside this repair; the 174 focused tests, changed checks, build, and real writer proof above passed.CI recovery on current main
Head
878aefa79cd9e81787ec24034fc3c4846bcc153bmerges maind593d2814eca3e382466ffa2cb2748023f67fdc8, including canonical UI repair #142346 (f74837eec91453eb26ec18de94f907a0698721e7). That repair replaces the unsupportedrefreshIfDuerequest withrefreshand reconciles the catalog tests with the session-owned store, directly addressing the previous CI diagnostics.The contribution patch is unchanged: stable patch ID
65a7ffd5549f04f8e06cd3011e6447eae3f1a879matches before and after the main refresh.pnpm tsgo:uinow passes, all 11 formerly failing catalog UI tests pass, and the full focused group totals 185 passing tests. Changed checks,pnpm build, and the real numeric-key writer proof also pass. The exact-head CI gate is now successful on878aefa79cd9e81787ec24034fc3c4846bcc153b; the historical failed run above is retained only for comparison.Current-main integration (2026-09-23)
Merged main
01457af6876f1c4be61f492d86b0ac7fc596853einto headf74e5bb519d115dd51210884a79964e58c6683b5without rewriting prior commits. The shared writer keeps the new inference-recovery imports,WizardConfigWriteOptions, andonPreparedCommitcallback. Explicit wizard nulls are restored before that callback captures the prepared configuration.A fresh production-source writer probe used a synthetic plugin and isolated config. The callback ran once and observed the concurrent value and restored literal null; disk readback matched:
The two numeric-key regressions were moved unchanged to
src/config/io.write-prepare.numeric-keys.test.ts; the main test file remains byte-identical to current main, satisfying the current line-growth ratchet without reducing coverage.Validation: 197 focused tests passed across five original files (38.66s wrapper wall time); both relocated tests also passed (31.23s wrapper wall time). Staged
check-changedagainst the exact main parent passed, including core/test typechecks and lint. Independent P2 review passed with no actionable findings. The initial unstaged check used the old merge base and was corrected to the official staged comparison; the real numeric-test growth violation was then repaired by the relocation. New exact-head CI is pending. This source-writer probe supplements the retained built-CLI proof; no new full build or interactive CLI run is claimed.Current-head hosted CI recovery
Run 35838749679 failed in
checks-node-compact-large-17:src/gateway/server.sessions.abort-authorization.test.ts, the foreign write-only device case, timed out waiting forsessions.changedafter receivingchat. The aggregate CI gate remains failed. The entiresrc/gatewaytree is byte-identical to the merged main parent01457af6876f1c4be61f492d86b0ac7fc596853e; no pristine-main reproduction or flake diagnosis is claimed.A failed-job-only rerun was attempted and denied with
Must have admin rights to Repository.A maintainer can retry the failed jobs withgh run rerun 35838749679 --repo openclaw/openclaw --failed. No retry started and no timeout or assertion was weakened.