Skip to content

test(land): port the own queue's rare landing paths - #714

Merged
kixelated merged 2 commits into
mainfrom
quest/m0/own-queue-landing-tests
Nov 14, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m0/own-queue-landing-tests

Conversation

@kixelated

@kixelated kixelated commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m0/own-queue-landing-tests.md.

Summary

Ports the serve tests that #707 deleted (recovered from its base, c1c04e0) to the watcher's own queue suite in test/land.test.ts. They keep their original assertions and now run through ownPass:

  • Restarting after a prepared-head push: the queue's recorded merge lands, and a writer's commit pushed over it is ejected as head_moved.
  • A fork's fallback base push that GitHub refuses (ejected merge_refused, PR not closed) or that finds the base moved (stops quietly, then the next pass rebuilds on the new base).
  • GitHub's transient "Repository not found": retried on the fallback base push, and on the prepared-head push with bounded backoff (1 failure lands; 5 failures give pauses 1s/2s/4s/8s and then merge_refused).
  • 405/409 merge refusals while GitHub reports a stale pin, a stale mergeable false/dirty, and mergeability that never settles (the pick stays queued and the next pass lands it).
  • Tree mismatches: a squash tree mismatch or a merge commit with a stranger second parent logs CRITICAL and stays merged; a prepared tree mismatch logs CRITICAL and ejects tree_mismatch.
  • Merge tokens get workflows: write only when the PR's commits, the queue's base merge, or the author's base merge touch .github/workflows.

queueSetup now records warnings and retry pauses. It also has a token hook, and an opt-in scoped mode that mints each token with workflows: write only on request.

Choices made without asking

  • The own queue reaches every path, so nothing in land-head.ts was deleted.
  • I dropped the old batch-only assertions about sibling PRs in the same batch, since the own queue lands one pick at a time. In their place, the tests check that the next pick still builds.
  • Merge-token scopes are recorded per merge request. The fake GitHub's token counter restarts on each forge.deps(), so token strings can't identify a grant.

just check and just test pass (1232 tests).

Models

  • Implementer: Claude Code, claude-opus-5-5, low effort

Suggested follow-ups

None.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5 with low)

Review

Rewritten by quest review after each round.

  • Head: 1013ee7

  • Base: origin/main at b62403e

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1d752-82e6-7b10-ab3e-e24f5289930f, round 1

  • Score: 9/10, The added tests exercise the targeted own-queue landing paths, and code inspection found no actionable defects; builds and tests were not run, as instructed.

  • Rounds: 1; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

  • Reviewer: Codex, gpt-6.1-sol, low effort, shadow

  • Session: 01a1d752-82e6-7bb1-849d-e086dae101c8, round 1

  • Score: 9/10, The added tests cover the own queue's rare landing paths without changing production behavior, and code inspection found no actionable defects, though builds and tests were not run as instructed.

  • Rounds: 1; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 13, 2026 15:46
…serve tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Test the own queue's rare landing paths test(land): port the own queue's rare landing paths Nov 13, 2026
@kixelated
kixelated marked this pull request as ready for review November 13, 2026 23:51
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a1f564c7-9cb8-4f11-a3e9-bd334703afa5
Commits

Reviewing files that changed from the base of the PR and between b62403e and 1013ee7.

Files selected for processing: 2

  • quest/m0/own-queue-landing-tests.md
  • test/land.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

I reviewed the port of the retired serve tests into the "watcher's own queue" suite. All 36 tests in that suite pass locally.

  • queueSetup instrumentation: it now records warnings and retry pauses, and adds a hooks.token callback. An opt-in scoped mode mints tokens with workflows: write only when asked, and scopes records the grant in force at each merge PUT.
  • Restart after a prepared-head push: the queue's recorded merge lands. A writer's commit pushed over it is ejected as head_moved.
  • Fork fallback base push: refused → ejects merge_refused, and the PR is not closed. Base moved → the pass stops quietly and the next one rebuilds. A transient Repository not found is retried. I checked that the moved hook fires inside finishFallback's push, as the comment says.
  • Prepared-head push backoff: 1 failure lands. 5 failures pause 1s/2s/4s/8s, then the pick is refused with merge_refused.
  • Merge refusals: covers a 409, a 405 on a stale pin (forge.lag), stale mergeable false/dirty, and mergeability that never settles (the pick stays queued and the next pass lands it).
  • Tree checks: an API squash mismatch or a stranger second parent logs CRITICAL and stays merged. A prepared tree mismatch ejects tree_mismatch. It swaps the quest wrapper in PATH[0], which is a per-test temp dir, so other tests are unaffected.
  • Workflow scoping: the merge token gets workflows: write only for the PR's own commits, the queue's base merge, or the author's base merge. The base-merge case really separates the diff check from the log -m check in touchesWorkflows.
  • Quest file: quest/m0/own-queue-landing-tests.md is removed as finished, and nothing still links to it.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 8b4abed Nov 14, 2026
26 checks passed
@kixelated
kixelated deleted the quest/m0/own-queue-landing-tests branch November 14, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant