Skip to content

feat(land): alternate batch order and shrink batches after a failure - #334

Merged
moq-bot[bot] merged 2 commits into
mainfrom
feat/land-batch-policy
Oct 31, 2026
Merged

moq-bot[bot] merged 2 commits into
mainfrom
feat/land-batch-policy

Conversation

@kixelated

@kixelated kixelated commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

quest land serve now alternates which end of the queue a batch starts from, and shrinks batches after a failure.

Change

On 2026-10-31 moq landed nothing from 11:27 until past 16:30. Every batch of six to eight PRs held at least one failing PR, and each was ejected whole.

  • Order: batches alternate between the oldest and the newest queued PR as their base. The maintainer chose this over oldest-first, since old PRs are the likeliest to conflict, and over pure LIFO, which would starve old PRs.
  • Size: a failed batch halves the next batch, down to one PR. Each batch that lands grows it back by one, toward the usual 1 + floor(log₂ n).
  • Persistence: both live in batch-policy.json in the daemon's state directory, so a restart keeps them. A missing or unreadable file starts oldest-first at full size.
  • Unchanged: a base conflict (no check ran) leaves the policy alone. Bisection stays gone: a shrunken batch is a fresh batch from the queue.
  • README and quest land serve --help describe the new rule.

Together with fail-fast checks (moq-dev/moq#7466) and per-PR screening (#322), a failure now costs minutes and takes at most half the next batch with it.

Checks

  • just check passes.
  • just test passes (732 CLI and 426 Worker tests), run with CLAUDE_CONFIG_DIR unset.
  • New tests:
    • build orders newest-first and caps the batch at the policy's size.
    • The policy walks fail at 3 → newest at 1 → fail → oldest at 1 → land → newest at 2.
  • Two existing tests reused one state directory across batches. They now assert their intent independently of the order: the overlap comment isn't repeated, and a restart lands what's left.

Review

quest review --base origin/main (Codex), round 1 on head a870975: no findings.

  • Head d72d9bd shrinks the new policy test to five PRs over three rounds, after CI's run of the eight-PR version hit vitest's 5s timeout. It is test-only, so the review was skipped as trivial; the test runs in 1.8s locally.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

moq landed nothing for five hours on 2026-10-31: every batch of six to
eight PRs held a failing PR and was ejected whole. Batches now alternate
between the oldest and the newest queued PR as the base, a failed batch
halves the next one's size down to one PR, and each landed batch grows it
back by one toward 1 + floor(log2 n). The order and size persist in the
daemon's state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 31, 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 10 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: 17279227-153f-4201-9b82-d8a1744abb17
Commits

Reviewing files that changed from the base of the PR and between 4c0eb97 and d72d9bd.

Files selected for processing: 5
  • README.md
  • src/cli/land-serve.ts
  • src/cli/land.ts
  • src/cli/main.ts
  • 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

Five PRs over three rounds still walk fail, halve, flip, land, and grow,
and stay well under vitest's 5s limit on CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated enabled auto-merge (squash) October 31, 2026 23:36
@moq-bot
moq-bot Bot merged commit 12f4af0 into main Oct 31, 2026
12 of 13 checks passed
@moq-bot
moq-bot Bot deleted the feat/land-batch-policy branch October 31, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant