fix(ci): fetch main's head objects before config sync in 'ci pr --keep-lane'#10460
Conversation
PR Summary by Qodofix(ci): prefetch main head objects before config sync in Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
|
Code review by qodo was updated up to the latest commit c058756 |
|
Code review by qodo was updated up to the latest commit e31982b |
|
Code review by qodo was updated up to the latest commit fd873be |
|
Code review by qodo was updated up to the latest commit 85d46c6 |
bit ci pr --keep-lanerunssyncConfigFromMain, which 3-way-merges aspect config from main onto the lane. For each component it loads main's head Version object (modelComponent.head). The lane import only fetches lane-head objects plus the lightweight version-history (parent graph) — enough for the diverge check to see main is ahead, but NOT the full Version object for main's head where main advanced past the lane's fork point.So
loadVersion(mainHead)throwsVersionNotFoundOnFS, the per-component catch swallows it asskipping config sync from main (… was not found on the filesystem), and the config sync silently no-ops for those components.Fix: pre-fetch main's head objects in one batched call via
importObjectsFromMainIfExistbefore the merge loop — the same pre-merge pattern used bymerge-status-provider/merge-lanes. Passes the specific main-head version socache: truestill fetches it, and is best-effort so a fetch hiccup doesn't abortci pr.