VersionControl:PRs/magenta/463
From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
| State | 🟢 open |
|---|---|
| Worked on by | magent, skyler, justin |
| Moods | #interfaces |
| Deploy | redeploy maybelle (memory-lane); no migrations |
| Branch | magent/ramp-conflicts → main, by magent-cryptograss
|
| Opened · last pushed | 2026-11-10 20:13:48 · 2026-11-10 20:19:21 |
Skyler, 10 Nov (#interfaces): "should we have conflict tab that tells us if there is conflict in the code?" Justin: "yep go". Built as marks on each ramp row, not a separate tab, so you see them where you'd press Merge. **Two marks per open candidate branch:** - **⚠ conflicts with main** (or whatever its base is): merging it into the base as githouse has it now would conflict. Hovering lists the files and says the author merges or rebases onto the base first. - **⇄ magenta#436**: if both this and that open candidate merged, they would conflict. Hovering lists the files and says whichever merges second rebases. **Lines, not files.** When I proposed this I said ⇄ would mean "touches the same files". In magenta nearly every branch touches `moods.html`, so that would mark almost every pair. The check now does a real three-way merge of the two heads, so ⇄ means they change the same lines. **Avoiding false ⇄ marks.** If either branch already conflicts with its base in a file, that file isn't counted for the pair. Without this, #436, which conflicts with main in `todo.py`, also showed as clashing with #460 and #462, only because those are built on main. Its ⚠ already says so. **How:** - `git merge-tree --write-tree --name-only` runs the merge in memory. - Its objects go to a scratch directory (`GIT_OBJECT_DIRECTORY`, with githouse's objects as alternates), since githouse's copy is mounted read-only on maybelle. - Each answer is cached for a week, keyed by the two commit ids, which never change, so a board rebuild only checks heads that moved. - Pairs are capped at 600 per build. - If git can't answer (too old, a bad id), no mark is shown. **On real data**, against hunter's read-only copy of magenta with its 11 open PR heads: - First run 0.86 s; cached 0.001 s. - #436 shows ⚠ for `todo.py`; nothing else conflicts right now. **Tests:** new `ClashTest` uses real repositories, with the bare copy chmodded read-only: - conflicts with the base, by file; - a branch built on the moved base is clean; - two candidates at odds only with each other get ⇄; - the row renders both marks. The full suite passes: 1,958 tests OK. Deploy: redeploy maybelle (memory-lane); no migrations Worked on by: magent, skyler, justin, in #interfaces