Skip to content

fix(build): keep concurrent UI publication from failing postbuild - #170455

Merged
steipete merged 1 commit into
mainfrom
fix/update-compat-ui-publication-20261012
Oct 13, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/update-compat-ui-publication-20261012

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: #169725

What Problem This Solves

Runtime postbuild can fail with ENOENT when the concurrent Control UI build publishes its staging directory. Updater compatibility discovery enumerated browser JavaScript under dist/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 ENOENT on the exact CI main parent e4f463159d0ae54c4858bf2ab22ba79600fe23cb and passes with this repair.

Proof Result
New publication regression on exact main parent 1 failed as expected; 94.25 s command wall
Publication regression with repair 1 passed; 33.57 s
Published 10.1 cleanup ordering 1 passed; 32.23 s
External binding compatibility 9 passed; 92.37 s
Scoped OXLint, formatting, scripts typecheck Passed with a task-owned frozen install
CI runtime configuration of pnpm build Passed; 601.55 s wall, including concurrent UI publication and runtime postbuild
Independent review through P2 No actionable findings
Exact-head CI run 38328443027 Passed: 35 successful jobs, 27 skipped, no failures; 526 s successful-job span, 5,483 successful-job seconds

Targeted tests ran through node scripts/run-vitest.mjs <file> --maxWorkers=1 for test/scripts/update-compat-ui-publish.test.ts, update-compat-cleanup.test.ts, and update-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.

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).
@clawsweeper

clawsweeper Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Oct 13, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 13, 2026
@clawsweeper

clawsweeper Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This 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.

  • Before: Discovery collects browser paths that disappear before reading, causing ENOENT.
  • After: Discovery skips the browser trees and generates compatibility bridges from runtime modules.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused implementation and meaningful regression support correctness, while required updater qualification remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A source build can fail when UI publication removes browser paths collected by runtime postbuild.
Reason: The maintainer-authored repair restores the existing separation between browser publication and updater runtime implementations without adding configuration.

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
Reviewed head: 297b14010eca110245a9a421c6de6c2796051841
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Which of the two open same-author repairs should carry the final change?
  • Recommendation: Retain this PR: Keep the precise publisher-name parser and reported baseline/head regression evidence, preserving useful isolation coverage from the sibling repair.
  • Why: Both repair the same source boundary, and the discussions do not designate a retained PR.

Before merge

  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

None.

Tests

  • Missing end-to-end proof: The required published-driver update against this exact candidate has no recorded result.
Agent review details

How this fits together

Runtime 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
Loading

Technical review

Best 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

  • Runtime compatibility discovery keeps the original intent (05bf4e0: Generate bridges for verified older updater imports while rejecting missing or ambiguous runtime implementations; the subsequent runtime-graph repair explicitly excluded independently built implementation graphs.)
  • Control UI publication keeps the original intent (4157ed6: Stage and validate browser output before replacing the served bundle so failed builds preserve working output.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Focused introduced repair: The pinned introduction adds a top-level exclusion using the existing publisher sibling-name parser; runtime reads, mapping validation, and bridge writes remain unchanged. (scripts/lib/update-compat-chunks.mts:83, 297b14010eca)
  • Main remains affected: Fetched main recursively enters Control UI publication directories, while the build orchestrator runs UI publication concurrently with runtime finalization. (scripts/lib/update-compat-chunks.mts:76, ba8025d18e97)
  • Publisher ownership and lifecycle: The publisher creates PID-named staging directories, renames the previous output to a retired sibling, publishes staging, and removes retired output; the repair reuses its exact sibling-name contract. (scripts/ui.mts:383, 297b14010eca)
  • Meaningful regression: The added test performs real directory publication after enumeration, invokes the production bridge writer, imports a generated legacy filename, and calls its exports; the body reports matching baseline failure and repaired success. (test/scripts/update-compat-ui-publish.test.ts:14, 297b14010eca)
  • CI and failed-check classification: Run 38328443027 passed for the reviewed head, including openclaw/ci-gate, but skipped published-driver-update and build-artifacts. The separate failed context checks request PR-body section headings rather than reporting a code failure. (297b14010eca)
  • Overlapping repair: fix(build): exclude publishing UI trees from update scanning #170449 is an open same-author repair of the same traversal boundary, using a broader prefix exclusion and additional missing-runtime isolation cases. (scripts/lib/update-compat-chunks.mts:83, 4e17fcb119c5)

Likely related people:

  • Peter Steinberger: Raw commit 05bf4e0 adds scripts/lib/update-compat-chunks.mts:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 05bf4e050b1c; files: scripts/lib/update-compat-chunks.mts)

PR surface

Tests +56, Other +8. Total +64 across 2 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 56 0 +56
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 8 0 +8
Total 2 64 0 +64

Review metrics

Metric Value Why it matters
Production versus test growth Production +8 lines; tests +56 lines The exclusion reuses the publisher's parser, and the regression exercises filesystem publication and generated imports without adding a production test seam.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A concrete concurrent-build failure affects artifact preparation without evidence of an installed-runtime outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the published-driver upgrade result against the retained candidate.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-13T00:45:54.952Z sha 297b140 :: blocked before merge. :: none

Reviewed October 12, 2026, 9:00 PM ET / October 13, 2026, 01:00 UTC (Revision 2).

@steipete steipete changed the title fix(build): exclude UI publication trees from updater compatibility discovery fix(build): keep concurrent UI publication from failing postbuild Oct 13, 2026
@steipete
steipete merged commit aab809d into main Oct 13, 2026
134 of 136 checks passed
@steipete
steipete deleted the fix/update-compat-ui-publication-20261012 branch October 13, 2026 01:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant