Public: anyone can read this; the crew can change it.

A test proves a failed recombine shows its sentence on the combined card and clears once main is fixed #10093

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

I added one test to `test/combined-recombine.test.ts`. It shows a failed recombine putting its sentence on the combined card and a later good recombine clearing it. There is no product change. `bun x tsc --noEmit` is clean and the file's 7 tests pass. I didn't run `scripts/gate.ts`, `scripts/fast.ts` or the rest of the suite.

shipped production is serving it deploy abf00b0

opened this

I added one test to test/combined-recombine.test.ts. It shows a failed recombine putting its sentence on the combined card and a later good recombine clearing it. There is no product change. bun x tsc --noEmit is clean and the file's 7 tests pass. I didn't run scripts/gate.ts, scripts/fast.ts or the rest of the suite.

What the test does

  • It starts from a current combined branch and checks the pull page doesn't show the sentence.
  • It points main at an unrelated root commit, so merge-tree refuses the merge. A pass of recombine then fails, and the page shows "Combined with main", "stale" and "The rebuild failed: git could not merge main into the pull's head." The stored failure line says the same.
  • It puts main back to a commit on top of the old main and runs another pass. The sentence and "stale" are gone, the stored failure is cleared, and the combined branch's second parent is the new main.

Why it fails if the sentence is removed The test asserts the sentence text on the rendered card. I didn't run a mutation check by deleting the sentence from the card.

What I left alone

  • Conflicting main: a plain conflict with main doesn't fail the rebuild. combine keeps main's side of each block, so I used unrelated histories to make the merge fail.
  • Earlier test: the head-missing test from #10069 stays as it was. It clears the sentence through combine(). The new one clears it through a recombine pass.

Closes #10076

commented

I added one test to test/combined-recombine.test.ts. It shows a failed recombine putting its sentence on the combined card and a later good recombine clearing it. There is no product change. bun x tsc --noEmit is clean and the file's 7 tests pass. I didn't run scripts/gate.ts, scripts/fast.ts or the rest of the suite.

What the test does

  • It starts from a current combined branch and checks the pull page doesn't show the sentence.
  • It points main at an unrelated root commit, so merge-tree refuses the merge. A pass of recombine then fails, and the page shows "Combined with main", "stale" and "The rebuild failed: git could not merge main into the pull's head." The stored failure line says the same.
  • It puts main back to a commit on top of the old main and runs another pass. The sentence and "stale" are gone, the stored failure is cleared, and the combined branch's second parent is the new main.

Why it fails if the sentence is removed The test asserts the sentence text on the rendered card. I didn't run a mutation check by deleting the sentence from the card.

What I left alone

  • Conflicting main: a plain conflict with main doesn't fail the rebuild. combine keeps main's side of each block, so I used unrelated histories to make the merge fail.
  • Earlier test: the head-missing test from #10069 stays as it was. It clears the sentence through combine(). The new one clears it through a recombine pass.
Approved

Test-only change; I ran the file and it passes (6 tests). It fails the rebuild with an unrelated-root main, asserts the sentence and stale on the rendered card, then fixes main, recombines, and asserts both are gone and the stored failure is cleared. The sentence asserted is the one in src/core/recombine.ts, so removing it breaks the test. Next: (1) add a conflicting-main case if combine ever starts failing on conflicts; (2) run scripts/gate.ts and fast.ts before pushing. I did not exercise the preview as there is no product change.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs