Repository navigation
Conversation
Project candidate Doctor config contracts before strict admission, bind the authored preimage and changed paths into the activation journal, and publish only after managed stop. Restore original bytes on rollback and reconcile interrupted publication. Normal openclaw update already plans config repair before admission. Share its validated migration result without duplicating strict checks; preserve deferred and partial validation behavior.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Please review the final source head, including candidate config-only projection, strict rejection after migration, journaled stopped publication and exact-byte rollback. Local Codex review is clean; focused full controller and published-stable config upgrade proofs pass. The PR records the separately attributed baseline dead-export failures and an unresolved intermittent local schema-preflight observation. |
|
🦞👀 Re-review progress:
|
Codex Review Summary: ✅ CompletedThis 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: 0bee922f07
ℹ️ 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. What this changesThe controller projects known Doctor config repairs before admission, publishes them after shutdown, and restores the original bytes on rollback. Example: A same-schema deployment encounters loopDetectionPreToolUseRelay: false alongside requestTimeoutMs: 120000.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current managed-deployment failure and has no actionable introduced defects. The prior P3 finding is resolved; exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe managed deployment controller coordinates candidate validation, Gateway shutdown, config publication, release activation, and rollback; Doctor supplies the migration decisions. flowchart TD
A[Authored config] --> B[Candidate projection worker]
B --> C[Doctor migration planner]
C --> D[Controller activation journal]
D --> E[Managed Gateway stop]
E --> F[Config publication]
F --> G[Candidate startup]
G --> H[Original config on rollback]
Technical reviewBest possible solution: Use Doctor’s existing validated projection within the controller’s existing stopped-publication and exact-byte rollback transaction. Do we have a high-confidence way to reproduce the issue? Current main’s direct strict-validation call establishes the failure path, supported by the supplied original-controller failure and native candidate rejection; no target code was executed during this review. Is this the best way to solve the issue? The change repairs admission ordering at the controller boundary, retains Doctor as migration owner, and uses existing journal and rollback machinery without adding options or duplicating migration policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b8f3e22b5507. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +98, Tests +312, Docs +78, Other +531. Total +1019 across 16 files. Added test files: 2. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 16, 2026, 2:39 AM ET / 07:39 UTC (Revision 3). |
Published-stable config upgrade, actual native entry points. Installed published The retained result is: {
"stableVersion": "2026.11.4",
"stablePluginVersion": "2026.11.4",
"stableAccepted": true,
"unmigratedCandidateRefused": true,
"candidateProjected": true,
"candidateAccepted": true,
"replayChangedPaths": [],
"changedPaths": [
"meta",
"plugins.allow[1]",
"plugins.entries.codex.config.appServer.loopDetectionPreToolUseRelay"
],
"workerSha256": "1e8faf4d03d956862bf0c8ccc2fefab4406155de6c659bfbf68235d9c800bb46"
}This older fixture also needs the already-existing Skill Workshop allowlist migration, explaining Actual controller entry and exact-byte rollback. Separately exercised the real Linux The failed-start case asserts The production-shaped btrfs run connects the actual built worker to the actual controller preparation owner (no projected-config double): all 60 timed cases pass, with zero agent DB opens, zero canonical DB write opens and zero workspace traversal. Existing temporary custody DB handling remains counted. This change adds no SQLite schema migration; the persisted state being migrated here is the authored config, and journal publication remains owned by the controller. These are config-contract upgrade and controller rollback proofs, not a claim of a complete live Gateway/package upgrade. The separate UI CI failure is still being investigated and is not waived by this evidence. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Inline the single-use descriptor factory and remove its extra module and wrapper inventory entry. An expression-bodied local factory keeps the declaration within the existing line budget; generated runtime scripts drop only the unused initializer.
|
Final-head follow-up at
The PR body contains final proof and measurement results. Earlier-head UI CI failure remains recorded as unresolved, not inherited or fixed; final-head CI gates landing. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
The final-head UI failure is now attributed to an existing main regression introduced by #199080 ( CI run 43824343341, job 133155325671 tested merge A native bundled run of only The trace identifies the same prompt measured from 120px to 98.390625px. Reader-anchor flush first adjusts scrollTop while the prompt remains prepared, temporarily shifting the reply; after it enters normal flow, prepend-anchor restoration applies another correction from the shifted capture. The owner change comes from #199080:
The post-#199080 comparison excludes later #199746/#199747 changes and still fails. All proof-only substitutions were restored and the disposable container removed. Earlier focused passing replays remain recorded; they were not treated as a fix or attribution. Linux proof used the same managed Chromium version, on Debian ARM64 rather than CI's Ubuntu x64. The deploy regression proof, final build, 65 affected manifest tests and Codex review pass. ClawSweeper's final-head report has zero open items. Once the remaining CI jobs finish, landing will use the authorized pinned inherited-failure route if this is the sole failure; CI will remain recorded as failed. The separate UI positioning regression needs its owner follow-up. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…200004) * fix(update): migrate retired config keys before deploy admission Project candidate Doctor config contracts before strict admission, bind the authored preimage and changed paths into the activation journal, and publish only after managed stop. Restore original bytes on rollback and reconcile interrupted publication. Normal openclaw update already plans config repair before admission. Share its validated migration result without duplicating strict checks; preserve deferred and partial validation behavior. * docs(update): clarify config admission database trace scope * refactor(runtime): keep process descriptors in their manifest Inline the single-use descriptor factory and remove its extra module and wrapper inventory entry. An expression-bodied local factory keeps the declaration within the existing line budget; generated runtime scripts drop only the unused initializer.
What Problem This Solves
Fixes: managed deployments stop at config validation when a candidate retires a key that its Doctor already knows how to migrate.
User Impact
Managed same-schema deployments can migrate retired config keys automatically. Genuinely invalid settings still refuse before the serving Gateway stops. Installing this controller change requires complete-closure adoption; merging it does not update any deployment.
Why This Change Was Made
The candidate's existing Doctor config planner now supplies a strictly validated, read-only projection through a stable internal build entry. The controller preserves the authored preimage and changed paths, binds the plan into its existing activation journal, and publishes only after its managed stop. Recovery reconciles interrupted publication, and rollback restores the original bytes before restarting the predecessor. No state or database migration runs in this step.
Normal
openclaw updatealready performs config migration planning before admission and candidate Doctor before final validation, so its ordering is unchanged. Valid unchanged includes remain accepted; a repair requiring included-file publication still requires Doctor because this controller transaction owns a single config file.Evidence
The full controller retired-key regression fails against the original shell at strict validation. The fixed Linux entry flow admits the deploy, removes the key only after stop, and records its receipt. Failed-start rollback preserves the exact original config, and an unknown key refuses without stopping. Unchanged config and native database-crossing siblings pass (5 focused shell tests, zero skips). Three controller-owner tests cover publication/rollback, interrupted renames, idempotence and unrelated-edit refusal. Nine native projection cases use the real bundled Doctor contract, including authored environment references, invalid config, no-op/include behavior and strict secret-provider validation.
Measurement acceptance: use the same candidate build for original strict validation and fixed projection/preparation; measure two interleaved five-sample sets per arm on synthetic btrfs state (35 GiB SQLite, 6,000 sessions, 62,000 workspace files/1.1 GB). Retired config must refuse before and admit after; invalid config must refuse in both. Measure wall/CPU, separately sampled V8 allocation, and unchanged-config controls; inspect any common-path regression above 20%. This measures config admission, not a full deployment's downtime.
The final native build and config-contract replay pass. The replay hashes the exact authored bytes previously accepted by published OpenClaw/Codex 2026.11.4, preserves settings, validates after projection publication, and is unchanged on replay; the stable acceptance evidence is reused. Codex autoreview is scoped-clean with no accepted P0–P2 findings.
pnpm check:changedcompleted with only the three attributed dead exports below; typechecks, lint, formatting, ratchets and runtime-cycle checks pass.The final-head production-shaped btrfs run completed 60 timed samples, 12 separate allocation samples, six syscall traces and three CPU profiles. A/A controls were two interleaved five-sample groups per scenario/arm. Unchanged config wall medians were 1300.48/1386.92 → 1092.40/1107.54 ms; CPU 1589.81/1673.38 → 1316.88/1369.55 ms; sampled V8 allocation 328.03/319.93 → 284.24/282.16 MiB. Both unchanged controls improve.
Retired-key wall medians were 2426.06/3485.77 ms refusal → 3315.22/2973.05 ms admission; CPU 2902.88/3821.27 → 3481.41/2354.20 ms; allocation 577.75/583.23 → 476.69/477.58 MiB. The first repair set costs 36.7% more wall time, while the second reverses; the baseline itself shifts 43.7% between A/A sets. This run proves admission and bounded work, but cannot establish a precise retired-path latency effect. No samples were discarded. Invalid controls refuse in both arms. All fixed traces show zero agent-database opens, zero canonical database write opens and zero workspace traversal. Existing read-only custody handling can write temporary cache databases in both arms. The initial unconditional Doctor planner regressed healthy admission; the final version skips preparation for strictly valid config and reuses the migration owner's validation.
The changed-file check has identified three inherited dead exports:
logToolLoopAction,mockedIsCompactionFailureError, andmockedIsLikelyContextOverflowError. All reproduce on exact parent25c97908924aaea78adb9fb2c5292ec08cd07384and were introduced by3a3eed8695e68e182c4851285a3de90ca2cba0ff(#199591); #199851 owns their repair. These are main regressions, not ignored failures.One unchanged schema-preflight test intermittently omitted a service-home store in a local run. The preceding full run, targeted replay, and exact-parent 14-test run pass; the failure is unresolved and is not claimed inherited or fixed. Its schema/deletion owners are outside this change and the failed case does not call the modified planner.
Production code is +295/-32 lines (net +263), excluding fixtures, tests, generated outputs and benchmark. Growth supplies the missing read-only candidate boundary and journaled preimage/publication/recovery; it reuses native Doctor and existing atomic-write ownership. No new schema, config option or cache.
The final manifest cleanup removes an unnecessary single-use module and its wrapper inventory entry, preserving descriptor values in the original owner. All 65 affected runtime metadata/source-entry/static-asset tests pass and fresh Codex review is clean. The final native rebuild passes.
CI runs 43817781588 and 43824343341 fail the cached-reader scroll assertion in UI E2E 4/5. The final run uses exact main parent
961a9d1e469b03927565f5f2573be3256bdf0608, whose UI/probe sources are unchanged in the tested merge. A predecessor-plus-target bundled-browser run now reproduces the same 22.390625px drift on that exact parent; passive tracing also reproduces CI's exact one-round variant and shows reader-anchor and prepend-anchor duplicate compensation. A seven-owner-file comparison establishes #199080 /97dd78cc2cbd4f9dff1add734a2b316ac8d8bf31as the introducing change: post-change 11 pass/1 fail, prior versions 12 pass, original assertions and all other parent sources unchanged. Earlier passing focused replays remain recorded and are superseded by this attribution. This is a real main regression requiring follow-up, not repaired here. CI remains failed only for that attributed UI shard and its aggregate; every other job passed or was intentionally skipped. Merged through the repository-native pinned inherited-failure route as41b339be0591ae1fea7b49a736141b7bd6e343a3. The earlier diagnostics step also lacked itspythonshell.ClawSweeper completed final-head review at
ccdf2cae7d89d39c58dd3409290fb603d33d373cwith zero open items and no actionable findings. The three local dead exports were repaired on main by #199851.