Repository navigation
improve(update): reuse dev preflight build cache - #117246
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 1:50 AM ET / 05:50 UTC. ClawSweeper reviewWhat this changesThis PR shares the declaration-build cache between dev-update preflight worktrees and the rebased checkout, while avoiding a second Control UI build when the normal full build already produced its assets. Merge readinessKeep open for the assigned maintainer’s technical approval rather than cleanup closure. The patch uses the existing content-addressed declaration cache for the two dev-update builds, preserves the final checkout’s authoritative build, and retains the existing post-build Control UI fallback; no discrete correctness defect was established. Likely related people: steipete (high confidence) and yetval (medium confidence). Priority: P3 Review scores
Verification
How this fits togetherDev-channel source updates first build a candidate in a temporary Git worktree, then rebase and build the live checkout before running doctor. The changed path passes reusable declaration outputs through build-all’s cache while the final build still creates the runtime and Control UI artifacts consumed by the updated installation. flowchart LR
A[Dev update request] --> B[Preflight worktree build]
B --> C[Content-addressed declaration cache]
B --> D[Selected buildable commit]
D --> E[Rebased live checkout]
C --> F[Final checkout build]
E --> F
F --> G[Control UI asset health check]
G --> H[Doctor and updated runtime]
Decision needed
Why: The PR carries the protected maintainer label and introduces a process-level environment control for a compatibility-sensitive update path; source evidence supports the implementation, but the intended permanent operator contract belongs to the update owner. Before merge
Agent review detailsSecurityNone. PR surfaceSource +18, Tests +63, Docs 0, Other +12. Total +93 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one cache handoff owned by the dev updater, retain the normal final build and UI-health fallbacks, and merge only after the assigned owner accepts the internal environment handoff on the current head. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR improves an existing dev-update performance path rather than reporting a broken behavior. Its body provides after-fix full-build timing evidence and focused test results, but this read-only review did not rerun the build. Is this the best way to solve the issue? Yes: reusing the existing content-addressed declaration cache is narrower than introducing another build flow or copying whole worktree outputs, while the final checkout still performs its normal runtime/UI build and health checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ad409a828515. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where source-checkout operators updating on the dev channel would wait for the same expensive TypeScript declaration build twice: once in the safety preflight worktree and again after the live checkout moved to the selected commit. The updater also rebuilt the Control UI after the full build had already produced it.
Why This Change Was Made
The dev preflight and final checkout now share build-all's content-addressed cache. The final checkout still performs its authoritative build, so rebased source changes miss the relevant cache automatically and all normal stamps, runtime outputs, and clean-tree checks remain intact. The standalone Control UI build now runs only when the target build or doctor actually omitted its assets.
User Impact
Dev-channel source updates retain the existing newest-buildable-commit safety contract while spending seconds, rather than minutes, on the repeated same-content build phase.
Evidence
test/scripts/build-all.test.tsandsrc/infra/update-runner.test.ts.tbx_01kyxwh45ashyxmdv81a6dwtm1: touched core/tooling lint passed, focused tests passed, and two full builds used an isolated shared cache.tsdown-unified: 141.5 s cold to 3.93 s with the declaration cache restored. The warm build still ran runtime JS, Control UI, stamps, build-info, and postbuild phases.Provenance: the paired preflight/live builds were introduced by direct commit
ff3d8cab2bc98b5b8a2c098dfc442b56ab328640on 2026-01-22; GitHub has no associated PR. PR #86010 later made the full build include Control UI, leaving the updater's explicit UI build redundant for current targets.