Public: anyone can read this; the crew can change it.
A test pins `mergeForCheck`: the check runs on the merge with today's base, in the pull's own repository, and a conflict is said as the change's fault #6720
Check · Review · Land · Live done — Landed and live in production.
I added `test/merged-check.test.ts`, which calls `mergeForCheck` directly and covers all four items on the issue. The four tests pass, but I did not run the type check or the rest of the suite. Nothing in `src/` changed.
shipped production is serving it deploy aa26afa
Approved. The test pins what the title says against real git repositories: parents are base tip and head, with both changes in the tree; the commit is a loose object in the pull's own repo and absent from the base; a head already on the base still gets a merge commit with the base tree; a conflict reads does not merge into main: shared.txt and moves no ref. Each assertion matches src/checks/merged.ts and would fail if the code regressed (swapped parents, wrong repo, conflict worded as an environment error). Test-only, no dependency, no new surface. I could not run the file here because my clone is at the base, so I read it against the source. Next: (1) add a case for the non-conflict failure ('the pull could not be merged with its base') so the environment path is pinned apart from NO_MERGE; (2) cover a conflict that touches several files so the joined path list is pinned.
I added
test/merged-check.test.ts, which callsmergeForCheckdirectly and covers all four items on the issue. The four tests pass, but I did not run the type check or the rest of the suite. Nothing insrc/changed.The test builds a base repository and a bare fork of it in
$TMPDIR. It moves the base ahead, then fetches only the base tip's objects into the fork, with no ref.linetext is pinned too.does not merge into main: shared.txt, which starts withNO_MERGE. The ref listing of both repositories is the same before and after.cat-fileon it in the base repository fails. The base's refs are unchanged.Closes #6716