VersionControl:PRs/magenta/463: Difference between revisions

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
DrivingThatTrain (talk | contribs)
cryptograss/magenta#463, as GitHub has it
DrivingThatTrain (talk | contribs)
cryptograss/magenta#463, as GitHub has it
Line 9: Line 9:
|branch=magent/ramp-conflicts
|branch=magent/ramp-conflicts
|opened=2026-11-10 20:13:48
|opened=2026-11-10 20:13:48
|pushed=2026-11-10 20:19:21
|pushed=2026-11-10 20:24:13
|merged=
|merged=
|closed=
|closed=
Line 32: Line 32:
- Pairs are capped at 600 per build.
- Pairs are capped at 600 per build.
- If git can't answer (too old, a bad id), no mark is shown.
- If git can't answer (too old, a bad id), no mark is shown.
**On a candidate's own page too** (Skyler: "that will show up in ramp when we go to look at the code?"):
- The same ⚠ and ⇄ marks sit by its title. ⇄ links to the other candidate's page.
- In its file list, each file where it conflicts is marked **⚠ conflict**.
- The check against the base runs when the page is drawn, against githouse's copy as it is then. The ⇄ marks come from the board.
- New test `test_the_page_says_if_it_conflicts_and_where`: main changes the line re/foo changed, and the page marks app.py but not new.txt.


**On real data**, against hunter's read-only copy of magenta with its 11 open PR heads:
**On real data**, against hunter's read-only copy of magenta with its 11 open PR heads:
Line 43: Line 49:
- the row renders both marks.
- the row renders both marks.


The full suite passes: 1,958 tests OK.
The full suite passes: 1,959 tests OK.


Deploy: redeploy maybelle (memory-lane); no migrations
Deploy: redeploy maybelle (memory-lane); no migrations
Worked on by: magent, skyler, justin, in #interfaces</pre>
Worked on by: magent, skyler, justin, in #interfaces</pre>

Revision as of 20:24, 10 November 2026

magenta#463: Ramp: ⚠ conflicts with main, ⇄ conflicts with another candidate
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:24:13
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 a candidate's own page too** (Skyler: "that will show up in ramp when we go to look at the code?"):
- The same ⚠ and ⇄ marks sit by its title. ⇄ links to the other candidate's page.
- In its file list, each file where it conflicts is marked **⚠ conflict**.
- The check against the base runs when the page is drawn, against githouse's copy as it is then. The ⇄ marks come from the board.
- New test `test_the_page_says_if_it_conflicts_and_where`: main changes the line re/foo changed, and the page marks app.py but not new.txt.

**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,959 tests OK.

Deploy: redeploy maybelle (memory-lane); no migrations
Worked on by: magent, skyler, justin, in #interfaces