Repository navigation
fix(plugins): git update aborts with build-dirty when NODE_ENV=production rebuilds the workboard Control UI - #139075
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 7, 2026, 2:05 PM ET / 18:05 UTC. ClawSweeper reviewWhat this changesMakes plugin browser builds prefer checked-out SDK and workspace sources over compiled output, with regression coverage for production-mode builds. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main retains the faulty resolution path, and the supplied real workboard builds demonstrate the repaired behavior. No actionable correctness or security findings remain. Likely related people: steipete is a routing candidate based on recent area history and review context; exact source-line attribution remains unverified. Priority: P1 Review scores
Verification
How this fits togetherPlugin browser builds turn plugin UI source and host SDK imports into immutable assets whose hashes are recorded in the plugin manifest. Git-checkout updates require those tracked manifests to remain clean after rebuilding. flowchart LR
A[Plugin UI source] --> C[Browser asset builder]
B[SDK and workspace imports] --> D[Prefer source with compiled fallback]
D --> C
C --> E[Content-hashed assets]
E --> F[Plugin manifest]
F --> G[Update clean-check]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +4, Tests +44. Total +48 across 2 files. View PR surface stats
Review metricsNone. 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 browser asset generation tied to checked-out sources while retaining compiled fallback and the updater's clean-check protection. Do we have a high-confidence way to reproduce the issue? Yes: current source exposes the production-mode dist preference, and the supplied real workboard comparison reproduces manifest drift with compiled artifacts present. This read-only review did not execute builds. Is this the best way to solve the issue? Yes: selecting the existing source-first resolver at the asset producer is a narrow repair that preserves packaged fallback and avoids weakening update safety checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4109aab58c14. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review — added the esbuild alias contract (esbuild@0.28.2, |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…NV=production Git-checkout updates aborted with build-dirty (and the rollback build with rollback-checkout-dirty) because extensions/workboard/openclaw.plugin.json came out of the build with a different content hash. With NODE_ENV=production the plugin loader alias map preferred compiled dist artifacts left behind by the previous build over the checked-out sources, so the browser bundle bytes and their hash depended on leftover build output instead of the revision. Resolve SDK and workspace aliases source-first for plugin Control UI builds. Source checkouts now always bundle src; packaged installs still fall back to dist because they have no src. Closes openclaw#138684
47cd139 to
2f5d6f0
Compare
|
Merged via squash.
|
…NV=production (openclaw#139075) Git-checkout updates aborted with build-dirty (and the rollback build with rollback-checkout-dirty) because extensions/workboard/openclaw.plugin.json came out of the build with a different content hash. With NODE_ENV=production the plugin loader alias map preferred compiled dist artifacts left behind by the previous build over the checked-out sources, so the browser bundle bytes and their hash depended on leftover build output instead of the revision. Resolve SDK and workspace aliases source-first for plugin Control UI builds. Source checkouts now always bundle src; packaged installs still fall back to dist because they have no src. Closes openclaw#138684
Closes #138684.
What Problem This Solves
Fixes Git-checkout updates that stop the Gateway and then abort with
build-dirtybecause building the workboard Control UI changes its tracked plugin manifest. The rollback build can hit the same problem and leave the service stopped withrollback-checkout-dirty.Why This Change Was Made
Browser asset builds now use the existing source-first SDK and workspace alias resolution. Under
NODE_ENV=production, automatic resolution preferred existing compiled output; compiling those inputs produces different bundle bytes and manifest hashes, even when the source revision has not changed. Old compiled output can also embed stale code.The repair belongs in the asset producer. The updater's clean-check guard remains intact, and packaged installations still fall back to compiled files when source is unavailable. Runtime loader preferences are unchanged.
User Impact
Production-mode Git-checkout builds use the checked-out sources consistently, preventing this generated-manifest failure during forward updates and rollback builds.
Thanks @ylcn91. The contributor's commit and authorship are preserved through rebase.
Evidence
Baseline:
6aa09cbadb594c3d46d5bd49a28c514df1b256b0. Reviewed and pushed head:2f5d6f00ab6d899feb2bb82f4ca8ce2727f85a45.NODE_ENV=production pnpm buildsucceeded with a clean tree. A subsequentNODE_ENV=production pnpm plugins:assets:build --plugin workboardchanged the tracked manifest hash from045246ad…to072f0b70…. Rebuilding withNODE_ENVunset restored the committed hash and clean tree. No source transition was required.pnpm check:changed --base 6aa09cbadb5passed. Focused browser-builder, authoring-command, and SDK-alias suites passed: 113 passed, 1 skipped.NODE_ENV=production pnpm plugins:assets:checkpassed; generated plugin assets match committed bytes.b695b7a3…. Restoring only the candidate builder and rebuilding in the same production environment restored045246ad…and a clean tracked checkout.alias?: Record<string, string>contract; this change only selects the existing source-first resolver mode.The build boundary is exercised directly. A complete live managed-Gateway update/rollback cycle was not run; its unchanged dirty-check and recovery paths were inspected.