Repository navigation
fix(build): keep concurrent UI publication from failing postbuild - #170455
Conversation
Runtime postbuild enumerated browser staging assets while the concurrent UI publisher renamed and removed their directory, then failed with ENOENT when reading a collected path. Exclude the independently owned top-level Control UI output and the staging/retired siblings recognized by the UI publisher. Runtime module discovery and missing-file failures keep their existing behavior. A deterministic filesystem publication regression fails on exact main parent e4f4631 and passes with this repair. The regression and existing cleanup/external-binding tests pass all 11 cases; independent review found no actionable P0-P2 issues. Validation: scoped lint/format and scripts typecheck pass. The CI runtime configuration of pnpm build passes in 601.55 seconds with UI publication concurrent with runtime postbuild (OPENCLAW_BUILD_ALL_NO_PNPM=1, OPENCLAW_BUILD_PRIVATE_QA=1, OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1).
|
🦞👀 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: blocked before merge. What this changesThis PR excludes Control UI publication directories from updater compatibility module discovery. Example: UI publication replaces dist/control-ui.build-1234-fixture while runtime postbuild runs.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-authored PR fixes a concrete build failure still present on main, with no introduced correctness defect found. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherRuntime postbuild scans compiled modules and a recorded release inventory to generate import bridges for older updaters; the UI publisher independently replaces browser directories under dist. flowchart TD
Build[Build orchestrator] --> Postbuild[Runtime postbuild]
Build --> Publisher[UI publisher]
Publisher --> Browser[Browser publication trees]
Postbuild --> Discovery[Runtime module discovery]
Discovery --> Bridges[Compatibility bridges]
Inventory[Release inventory] --> Bridges
Technical reviewBest possible solution: Land one repair that excludes browser publication trees while preserving strict runtime bridge validation. Do we have a high-confidence way to reproduce the issue? Concurrent build branches, the publisher's rename lifecycle, and main's unfiltered enumeration establish the stale-path failure; the author reports a matching baseline failure, and this read-only review executed no target code. Is this the best way to solve the issue? Excluding independently owned browser trees before traversal fixes the source boundary without swallowing filesystem errors or weakening runtime implementation checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ba8025d18e97. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +56, Other +8. Total +64 across 2 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 HistoryReview history (1 earlier review cycle)
Reviewed October 12, 2026, 9:00 PM ET / October 13, 2026, 01:00 UTC (Revision 2). |
|
Merged via squash.
|
…law#170455) Runtime postbuild enumerated browser staging assets while the concurrent UI publisher renamed and removed their directory, then failed with ENOENT when reading a collected path. Exclude the independently owned top-level Control UI output and the staging/retired siblings recognized by the UI publisher. Runtime module discovery and missing-file failures keep their existing behavior. A deterministic filesystem publication regression fails on exact main parent 22d374c and passes with this repair. The regression and existing cleanup/external-binding tests pass all 11 cases; independent review found no actionable P0-P2 issues. Validation: scoped lint/format and scripts typecheck pass. The CI runtime configuration of pnpm build passes in 601.55 seconds with UI publication concurrent with runtime postbuild (OPENCLAW_BUILD_ALL_NO_PNPM=1, OPENCLAW_BUILD_PRIVATE_QA=1, OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1).
Related: #169725
What Problem This Solves
Runtime postbuild can fail with
ENOENTwhen the concurrent Control UI build publishes its staging directory. Updater compatibility discovery enumerated browser JavaScript underdist/control-ui.build-*, then tried to read those paths after the UI publisher renamed or removed them. This failed the real-Gateway build in CI run 38323759808.User Impact
Builds can complete when Control UI publication overlaps runtime postbuild. This changes build tooling only.
Why This Change Was Made
Exclude the independently owned, top-level Control UI output and its staging/retired siblings before traversing runtime modules. The filter reuses the UI publisher's existing sibling-name parser. Missing runtime files still fail, and updater bridge generation and validation retain their existing contracts.
Evidence
The regression performs real filesystem publication after module enumeration, generates the compatibility bridges, then imports the legacy filename and calls its recorded exports. It fails with the same owner-level
ENOENTon the exact CI main parente4f463159d0ae54c4858bf2ab22ba79600fe23cband passes with this repair.pnpm buildTargeted tests ran through
node scripts/run-vitest.mjs <file> --maxWorkers=1fortest/scripts/update-compat-ui-publish.test.ts,update-compat-cleanup.test.ts, andupdate-compat-external-bindings.test.ts. Build proof used the failing CI job's existing environment:OPENCLAW_BUILD_ALL_NO_PNPM=1 OPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1. An earlier default full build was stopped during unrelated declaration generation; it is not counted as passing proof. CI timing above covers the complete selected run.Production LOC: 672 → 680 (+8). New regression: 0 → 56. No dependencies or UI rendering changed. Build and owner proof remain valid across the subsequent mechanical main integrations; the relevant owner, publisher, fixtures, and dependency manifests were unchanged.
Three direct-main attempts under the red-main repair policy were rejected solely because main advanced before each push (
fetch first). This focused PR uses the native landing workflow to handle that contention.