Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/land-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ result—hand back that PR, quoting the attempt and its location in the diagnosi
## Mechanical fixes

The repository has `batch`, `base`, and one `pr-<number>` branch per pinned PR.
For each PR, requeue it unchanged if healthy (including a flaky failure), commit a
For each PR, requeue it unchanged if healthy (if the failure was flaky, name the
flaky test in the reason so it can be followed up), commit a
mechanical fix on its own branch, or hand it back with diagnosis and recommendation.
Allowed fixes: preserve both sides' intent in conflicts, format/lint, regenerate
lockfiles/generated files, or follow a base rename. Merge base where practical.
Expand Down
3 changes: 2 additions & 1 deletion src/cli/land-fixer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ async function collectJob(
github,
job.plan,
entry,
`Requeued unchanged: ${result.reason.slice(0, 200)}. Suggested follow-up: investigate the batch failure and stabilize any flaky checks.`,
// The reason says why: another PR in the batch, or a flaky check worth a follow-up.
`Requeued unchanged: ${result.reason.slice(0, 200)}`,
"requeue",
author(result),
);
Expand Down
4 changes: 2 additions & 2 deletions test/land.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1667,14 +1667,14 @@ printf '[{"number":1,"action":"fixed","head":"%s","reason":"preserve both confli

describe("asynchronous land fixer", () => {
afterEach(() => vi.unstubAllEnvs());
test("requeues unchanged, suggests follow-up, and hands back a second ejection in the same pick", async () => {
test("requeues unchanged with its reason, and hands back a second ejection in the same pick", async () => {
const fixture = await fixerFixture(requeueScript);
await fixture.finished;
expect(await fixture.collect()).toEqual(["requeued 1"]);
expect(fixture.pull.head).toBe(fixture.plan.queue[0].head);
expect(fixture.pull.autoMerge?.commitBody).toBe(pin(fixture.pull.head!));
expect(fixture.pull.labels).toContain("quest:merge");
expect(fixture.forge.comment(1)).toContain("Suggested follow-up");
expect(fixture.forge.comment(1)).toContain("Requeued unchanged:");
const next = await resolveQueue(REPOSITORY, undefined, fixture.deps);
await serveBatch(
fixture.root,
Expand Down
Loading