JS-072 HIGH: patchscope.lca returns a stale (non-recent) merge base

patchscope.resolve pins the 3-way fork for be patch via lca(ours, theirs) (patchscope.js:139); patch.js:354 consumes sc.fork as the common base of the merge. But lca() walks theirs with a LIFO stack and returns the FIRST popped sha present in ancestorSet(ours) — DFS pop order has no relation to recency, so a diamond/merge history can hand back an older shared ancestor as the base. A too-old fork yields a noisier, wrong 3-way merge. Both walks are also uncapped. Method: Issues.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome