Repository navigation
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: needs maintainer review before merge. Reviewed September 5, 2026, 6:01 PM ET / 22:01 UTC. ClawSweeper reviewWhat this changesThe source-server updater uses the existing runtime-only build default, preserves explicit declaration generation, and updates documentation and shell-boundary tests. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix absent from current main and the latest release. The new real-build evidence satisfies the earlier proof request, and no actionable correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe source-server updater advances a Git checkout, installs dependencies, builds OpenClaw, and then optionally restarts the Gateway. Its build context selects whether the shared build system generates developer-facing TypeScript declarations alongside runtime artifacts. flowchart TD
A[Source checkout] --> B[Fetch and update checkout]
B --> C[Install dependencies]
C --> D[Build with update context]
E[Explicit declaration override] --> D
D --> F[Runtime and Control UI artifacts]
D --> G[Declarations when requested]
F --> H[Optional Gateway restart]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +8, Docs +5, Other +1. Total +14 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep update-build policy in the shared orchestrator, with the shell updater supplying update intent and plugin developers retaining the documented declaration override. Do we have a high-confidence way to reproduce the issue? Yes, from source: the current shell updater omits the marker that selects runtime-only builds, so an unset declaration override selects declaration generation. No target code was executed during this read-only review. Is this the best way to solve the issue? Yes. Supplying the existing marker at the build call is the narrowest owner-boundary repair; duplicating profile selection in the shell would create a second policy implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0c622f370f33. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* origin/main: fix(cli): keep note text with Windows and Unicode line endings (#139512) fix(agents): keep isolated completion context on its admitted generation (#139607) fix: avoid declaration builds during source-server updates (#139392) fix(models): keep discovered models after catalog refresh failures (#139357) fix(gateway): record a transcript notice when a run fails before replying (#139439) refactor(ios): reuse shared integer conversion (#139581) fix(sessions): prevent database lock failures during reclamation (#139469) perf(test): reuse transforms within owned scheduler slots (#139553) test(agents): share sparse transcript input fixtures (#139589) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479)
Preserve the declaration-build guidance from #139392 alongside the transactional dev-only fallback rule. Co-authored-by: Jason O’Neal <[email protected]>
* commit '6c55a99226ed0611ca088004c81b00fb296f1f71': (182 commits) test(ui): scope dashboard settings setup to the top frame (openclaw#139618) refactor(skills): share pending proposal creation (openclaw#139617) fix(release): accept frozen targets before worker bundles (openclaw#136699) fix(gateway): preserve percent sequences in media filenames (openclaw#139508) fix: preserve current update availability alongside update history (openclaw#139501) feat(diagnostics): expose garbage collection duration metrics (openclaw#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (openclaw#139539) fix(ui): keep Swarm outcomes visible after completion (openclaw#139490) test: check file accessibility without runtime-specific return values (openclaw#139590) refactor(sdk): keep helper types private (openclaw#139601) fix(cron): preserve current-session delivery intent (openclaw#139491) fix: prevent browser profile permission hangs in Doctor (openclaw#139612) fix(agents): repair storage-failure test fixture after failover owner move (openclaw#139531) fix(cli): keep note text with Windows and Unicode line endings (openclaw#139512) fix(agents): keep isolated completion context on its admitted generation (openclaw#139607) fix: avoid declaration builds during source-server updates (openclaw#139392) fix(models): keep discovered models after catalog refresh failures (openclaw#139357) fix(gateway): record a transcript notice when a run fails before replying (openclaw#139439) refactor(ios): reuse shared integer conversion (openclaw#139581) fix(sessions): prevent database lock failures during reclamation (openclaw#139469) ...
* commit 'refs/openclaw/tasks/pr-135167-main-latest': test(ui): scope dashboard settings setup to the top frame (#139618) refactor(skills): share pending proposal creation (#139617) fix(release): accept frozen targets before worker bundles (#136699) fix(gateway): preserve percent sequences in media filenames (#139508) fix: preserve current update availability alongside update history (#139501) feat(diagnostics): expose garbage collection duration metrics (#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (#139539) fix(ui): keep Swarm outcomes visible after completion (#139490) test: check file accessibility without runtime-specific return values (#139590) refactor(sdk): keep helper types private (#139601) fix(cron): preserve current-session delivery intent (#139491) fix: prevent browser profile permission hangs in Doctor (#139612) fix(agents): repair storage-failure test fixture after failover owner move (#139531) fix(cli): keep note text with Windows and Unicode line endings (#139512) fix(agents): keep isolated completion context on its admitted generation (#139607) fix: avoid declaration builds during source-server updates (#139392) fix(models): keep discovered models after catalog refresh failures (#139357) fix(gateway): record a transcript notice when a run fails before replying (#139439)
…139392) Pass the existing update context only to the source-server build, so the shared builder skips developer declarations by default while retaining runtime JavaScript, plugins, Control UI, and metadata. Preserve explicit declaration requests and the existing checkout, failure, and restart boundaries. Verified four exact-head real updater/compiler cases, the retained declaration hashes, focused regressions, normal CI, and fresh review. Related: openclaw#131746. Co-authored-by: Jason O'Neal <[email protected]>
Related: #131746 — runtime-only CLI update builds.
Additional instructions
Allow edits from maintainers is enabled.
What Problem This Solves
Fixes an issue where operators updating a source-checkout server with
scripts/update-gateway.shwould still wait for TypeScript declaration generation, even though ordinary CLI updates already build only the runtime artifacts by default.Declaration-cache misses can therefore trigger unnecessary compiler work on this server-update path. This fixes a confirmed route gap; it does not attribute every slow update or every
signature-mismatchnotice to this cause.Why This Change Was Made
Mark only the helper's build invocation with the existing
OPENCLAW_UPDATE_IN_PROGRESS=1context. The shared build orchestrator then applies its existing runtime-only default, with no duplicate profile policy, new setting, or weakened cache validation. Update the server and CLI documentation to describe the default and conditional declaration-cache reuse accurately.User Impact
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=0still explicitly requests fresh declarations for plugin development.Evidence
Real behavior proof
HEAD SHA:
5312a952799e235de79774c88182c062c294b484.Behavior addressed: The actual source-server shell updater must complete runtime, plugin, Control UI, and metadata builds without scheduling declaration work by default, while preserving the explicit
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=0override.Real environment tested: Disposable Ubuntu 24.04 x64 GitHub-hosted runners, Node 24.19.0, Corepack 0.35.0, repository-pinned pnpm 12.3.4. Real Git, Corepack, pnpm install, compiler, build, and CLI processes; no fake package-manager commands or intercepted build steps. Candidate processes use isolated state/home directories and no injected credentials. Product source is the exact HEAD above; proof tooling is separately pinned to
978bf589586ac2973189384775f33d35665710b8and is not part of this PR.Exact steps or command run after this patch:
The immutable proof driver runs the unmodified checked-in
bash scripts/update-gateway.sh. It setsOPENCLAW_UPDATE_REMOTE=proofto a real disposable Git remote andOPENCLAW_UPDATE_RESTART_CMD=to disable service-manager restart. Default cases have both update/DTS variables initially unset; explicit cases set onlyOPENCLAW_RUN_NODE_SKIP_DTS_BUILD=0. The shell itself owns the update marker, fetch, package-manager pin probe, checkout transition, frozen install, and full build.Evidence after fix: Public proof run and logs.
PR-specific proof artifacts (all include
summary.jsonand full logs):Cold runtime artifact:
summary.json,cold-runtime.log,cold-runtime-cli.log,cold-runtime-declarations.json,built-channel-smoke.log.Cold declarations artifact:
summary.json,cold-declarations.log,cold-declarations-cli.log,cold-declarations-declarations.json.Existing-checkout artifact:
setup.log,seed-older-typed-checkout.log,existing-upgrade-runtime.log,existing-explicit-declarations.log, CLI logs, and before/after declaration SHA-256 inventories.Relevant observed output:
Observed result after fix: Each of the four current-head cases verifies
dist/build-info.jsonand both build stamps identify the exact PR HEAD, all 330 production runtime SDK JavaScript entries exist, and the Control UI entry assets/service worker match the recorded build identity. The real launcher completes--helpand--version. The cold runtime case additionally loads built bundled channel entries from the maintained synthetic installed-layout smoke with source fallback disabled. The existing-checkout fixture first built older compatible runtime source with a patch-equivalent copy of this updater (seedceb966c9ed8c3a49e196a628335578014335262d, based one90a3baabc14ca1639b68514b76a90b090ee567e). The unmodified updater then performed the real Git rebase across runtime-source changes and ended at the exact PR HEAD, with no checkout repair. Its default build retained all 643 previous declaration files byte-for-byte without scheduling typed phases. Those retained declarations are intentionally not refreshed by default. The subsequent explicit-override run started after removal of only those generated declarations and the 10 declaration-cache subdirectories (not artifact locks or unrelated caches), then demonstrably emitted 643 fresh declaration files. Tracked checkout cleanliness was asserted after every completed build.What was not tested: No service-manager restart, running Gateway health, authenticated provider/channel traffic, or macOS/Windows behavior. The synthetic older-source seed is supporting setup evidence, not current-head proof. Timings are individual CI observations, not a controlled end-to-end speedup benchmark or a diagnosis of any specific operator's hour-long update.
Supplemental regression and CI evidence
node scripts/run-vitest.mjs test/scripts/update-gateway.test.ts— 9 intended failures / 25 passed, exposing the missing build marker.node scripts/run-vitest.mjs test/scripts/update-gateway.test.ts test/scripts/build-all.test.ts— 130 passed. These use executable shell fixtures/intercepted compiler calls and are supplemental coverage, not the real behavior proof above.bash -n scripts/update-gateway.sh, targeted Oxfmt, andgit diff --checkpassed. Earlier broad local validation was intentionally stopped and is not claimed as a completed local run.autoreview --mode local --max-priority P1found no actionable blockers. Separate fork-only proof tooling also passed independent and automated review.Scope: production shell +2/-1, tests +11/-3, docs +6/-1. Source installers and repeated managed-update preflights remain separate follow-up opportunities, not changes in this PR.