Skip to content

fix(build): exclude publishing UI trees from update scanning - #170449

Closed
steipete wants to merge 1 commit into
mainfrom
dbasync/redmain-update-ui-traversal
Closed

steipete wants to merge 1 commit into
mainfrom
dbasync/redmain-update-ui-traversal

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes builds that fail with a missing Control UI asset while UI publication overlaps runtime postbuild.

User Impact

Builds can publish the Control UI while generating update compatibility bridges. The update bridge contract and browser output stay unchanged; no configuration or data migration is required.

Why This Change Was Made

Commit 7446a6a (#170363) made these build phases concurrent. The compatibility scanner still descended into published, staging, and retired browser trees. UI publication can rename or remove a tree between enumeration and reading, leaving the scanner with a stale path.

Exclude those independent UI trees before recursion, using the UI owner's existing staging prefix. Keep missing and ambiguous runtime implementation checks. The regression covers each UI tree with and without a valid runtime implementation, plus a deterministic directory rename after root enumeration.

No SQL, database worker, schema, SDK, or Gateway runtime path changes. T1 and warmed-turn statement/request measurements are not applicable to this build-only fix; no measured performance claim is made. No authority checks are removed. The accepted scope boundary is that browser modules cannot provide post-swap runtime compatibility implementations.

Evidence

Observed failure: PR CI 38325778237, job 115064821263. UI publication finished at 00:13:32.450 UTC; the compatibility writer failed at 00:13:32.483 UTC opening an asset under dist/control-ui.build-*. The scanner, build orchestration and UI publisher have identical source blobs on the inspected main revision. This establishes a shared-source race; the cited execution is PR CI, not a failing scheduled-main run.

Focused formatting, basic lint, diff checks, normal hooks and isolated Codex review (P0–P2) pass. Candidate CI 38327802140 completed successfully: 35 successful / 27 skipped jobs. The complete test/scripts/runtime-postbuild.test.ts file passed 150/150 cases in 12.286 seconds, including the new traversal regression in 43 milliseconds. Job 115070738168 tested synthetic merge 6c9a9bb1 of candidate 4e17fcb119c5be08cc0d9a80b179d6c7dc10ff4a into main 34309ea. Baseline runtime execution was not performed; these are actual CI file/case timings, not separate local timing.

All selected type-aware lint, production/test types, source contracts and ratchets passed. The architecture job actually ran Madge (zero cycles), import-cycle checks (zero), and Kysely guardrails (passed). Ordinary CI omitted Knip. Scoped reuse: scheduled main run 38322669274, job 115054342044, passed both the script unused-export scan and full-tree unused-file scan; its failures were unrelated UI findings. The scanner/config/dependency inputs are unchanged. This patch adds a use of an already-consumed export, removes no imports/exports, and adds no files or packages. No fresh whole-tree Knip pass is claimed.

The required exact-candidate published-driver update run 38327804121 remains pending. Its admission log verifies selected SHA 4e17fcb119c5be08cc0d9a80b179d6c7dc10ff4a. Ordinary CI skipped build-artifacts and the update cell, so neither result is inferred from its green conclusion. Record the package source identity, build and update outcomes before landing.

Focused command: pnpm test test/scripts/runtime-postbuild.test.ts --maxWorkers=1. Patch: 2 files, +48 / -2 lines. No local test timing is claimed.

@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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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 published, staging, and retired Control UI directories from update compatibility scanning.

Example: UI publication renames dist/control-ui.build-123-fixture after the scanner enumerates dist.

  • Before: The scanner follows the stale browser directory and the build can fail with ENOENT.
  • After: The scanner skips browser publication trees and generates bridges from runtime modules.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused patch has meaningful integration coverage and no identified defect, but mandatory package and upgrade qualification has not completed.
Proof confidence 🧂 unranked krab (1/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: Source builds can fail when Control UI publication replaces directories that runtime postbuild is scanning.
Reason: The maintainer-authored repair restores the established separation between browser output and updater runtime implementations.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR repairs a concrete build race still present on main, and review found no introduced correctness or security defect.

Priority: P2
Reviewed head: 4e17fcb119c5be08cc0d9a80b179d6c7dc10ff4a
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Which same-author repair should carry the final scanner change?
  • Recommendation: Retain this PR: Keep its runtime-present and runtime-missing isolation coverage and complete the qualification already targeting this candidate.
  • Why: Both open PRs repair the same owner boundary, and no recorded maintainer decision selects one.

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 × exact-candidate package and upgrade result remains pending, and baseline execution of this PR's regression was explicitly not performed.
Agent review details

How this fits together

Runtime postbuild scans compiled runtime modules and a release inventory to generate compatibility bridges for older updaters, while the UI publisher independently replaces browser output.

flowchart TD
Build[Build orchestrator] --> Runtime[Runtime postbuild]
Build --> Publisher[UI publisher]
Publisher --> Browser[Browser publication trees]
Runtime --> Scanner[Runtime module scanner]
Scanner --> Bridges[Updater compatibility bridges]
Inventory[Release inventory] --> Bridges
Loading

Technical review

Best possible solution:

Land one consolidated traversal repair that excludes browser publication trees while preserving strict runtime compatibility validation.

Do we have a high-confidence way to reproduce the issue?

Concurrent build branches, the publisher's directory replacement lifecycle, and main's unfiltered traversal establish the stale-path failure mechanism; this read-only review executed no target code.

Is this the best way to solve the issue?

Excluding the independent browser graph before recursion fixes the ownership 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 72536479c635.

Provenance checked

  • Compatibility scanner runtime boundary keeps the original intent (05bf4e0: Generate compatibility bridges for shipped updater imports; subsequent runtime-graph work intentionally excluded independently built implementations.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests +42, Other +4. Total +46 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 42 0 +42
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 6 2 +4
Total 2 48 2 +46

Labels

Label changes:

  • remove status: 👀 ready for maintainer look: Current PR status no longer selects a status label.

Label justifications:

  • P2: An intermittent concurrent-build failure affects artifact preparation without evidence of an installed-runtime outage.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.

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:37:25.342Z sha 4e17fcb :: needs maintainer review before merge. :: none

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

@clawsweeper clawsweeper Bot removed the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Oct 13, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by #170455, merged as aab809d and verified in main ancestry. Its narrower top-level publication-directory filtering fixes the same update-compat scanning race and includes the rename-after-enumeration regression. Closing this duplicate.

The exact-candidate published-driver run 38330358834 is still preparing its package; no completed update-cell pass is claimed yet.

@steipete steipete closed this Oct 13, 2026
@RomneyDa
RomneyDa deleted the dbasync/redmain-update-ui-traversal branch October 22, 2026 05:33
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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant