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

Full suite red: test/kept-fork-landing.test.ts #12900

Merged opened this in answer to

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

Merged

torque/forge:torque/12885-full-suite-red-test-kept-fork-landing-te → main 1 commit fork

  • Merged. torque/12885-full-suite-red-test-kept-fork-landing-te was merged into main as 1028bf9.

Review

Sign in to review this change.
1 file changed +15 −4
test/kept-fork-landing.test.ts +15 −4
@@ -84,7 +84,9 @@ describe("a kept fork lands as a true merge when the repository keeps `landing:
8484 await rm(work, { recursive: true, force: true });
8585 });
8686
87 test("squash is asked for, a merge commit lands, authors kept, and his next pull is a fast-forward", async () => {
87 let pullNo = 0;
88
89 test("his two commits are pushed and the pull is opened from his fork", async () => {
8890 const b = join(work, "b");
8991 await git(["clone", `${authed("bob", bob)}/bob/app.git`, "b"], work);
9092 for (const n of ["x", "y"]) {
@@ -100,8 +102,12 @@ describe("a kept fork lands as a true merge when the repository keeps `landing:
100102 headRepo: "bob/app",
101103 });
102104 expect(opened.status).toBe(201);
103 const { number } = (await opened.json()) as { number: number };
105 pullNo = ((await opened.json()) as { number: number }).number;
106 });
104107
108 test("squash is asked for, a merge commit lands, authors kept, and his next pull is a fast-forward", async () => {
109 const number = pullNo;
110 const b = join(work, "b");
105111 // Alice's main moves meanwhile, so the landing is a real merge.
106112 const a = join(work, "a");
107113 await Bun.write(join(a, "two.txt"), "two\n");
@@ -197,7 +203,7 @@ describe("a kept fork lands as a true merge when the repository keeps `landing:
197203 });
198204 });
199205
200 test("the MCP door honours the rule too: squash asked, a merge commit lands", async () => {
206 test("the MCP door: his next commit is pushed, the pull opened, and alice's main moves", async () => {
201207 const b = join(work, "b");
202208 await git(["pull", "--no-rebase", "--no-edit", "origin", "main"], b);
203209 await Bun.write(join(b, "z.txt"), "z\n");
@@ -210,12 +216,17 @@ describe("a kept fork lands as a true merge when the repository keeps `landing:
210216 head: "main",
211217 headRepo: "bob/app",
212218 });
213 const { number } = (await opened.json()) as { number: number };
219 pullNo = ((await opened.json()) as { number: number }).number;
214220 const a = join(work, "a");
215221 await Bun.write(join(a, "three.txt"), "three\n");
216222 await git(["add", "."], a);
217223 await git(["commit", "-m", "alice again"], a);
218224 await git(["push", "origin", "main"], a);
225 });
226
227 test("the MCP door honours the rule too: squash asked, a merge commit lands", async () => {
228 const number = pullNo;
229 const a = join(work, "a");
219230 const landed = await mcpTool(base, alice, "merge", {
220231 repo: "alice/app",
221232 number,

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs