Skip to content

Add relay-fleet serialized merge queue#676

Merged
sungjunlee merged 1 commit into
mainfrom
codex/fleet-merge-queue
May 31, 2026
Merged

Add relay-fleet serialized merge queue#676
sungjunlee merged 1 commit into
mainfrom
codex/fleet-merge-queue

Conversation

@sungjunlee
Copy link
Copy Markdown
Owner

Part of #480. Completes Phase 3 queue orchestration on top of #675.

Summary

  • add skills/relay-fleet/scripts/merge-queue.js to serialize fleet child merges through finalize-run.js subprocesses
  • transition fleets into merging, merge children in manifest order, and stop at the first failure
  • mark the failed ready child merge_blocked with a merge_blocked event so recovery is explicit and non-terminal
  • document the conservative stale-base recovery policy: stop, surface operator attention, and leave automation for a later explicit pass

Validation

  • node --test tests/relay-fleet/scripts/merge-queue.test.js
  • node --test tests/relay-fleet/scripts/*.test.js
  • node --test tests/relay-merge/scripts/*.test.js
  • node --test tests/relay-dispatch/scripts/manifest/*.test.js
  • node --test tests/skills-lint/scripts/*.test.js
  • git diff --check

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Warning

Review limit reached

@sungjunlee, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 39 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 897b8f21-803b-4dff-94c5-548d861040cc

📥 Commits

Reviewing files that changed from the base of the PR and between c2e7b86 and dedf81d.

📒 Files selected for processing (4)
  • skills/relay-fleet/SKILL.md
  • skills/relay-fleet/references/design.md
  • skills/relay-fleet/scripts/merge-queue.js
  • tests/relay-fleet/scripts/merge-queue.test.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fleet-merge-queue

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@sungjunlee
Copy link
Copy Markdown
Owner Author

Local review LGTM.

Reviewed merge-queue.js at dedf81d. The queue is intentionally conservative: sequential finalize-run subprocesses, stop at first failure, mark the child merge_blocked, and leave recovery explicit.

Validation:

  • node --test tests/relay-fleet/scripts/merge-queue.test.js
  • node --test tests/relay-fleet/scripts/*.test.js
  • node --test tests/relay-merge/scripts/*.test.js
  • node --test tests/relay-dispatch/scripts/manifest/*.test.js
  • node --test tests/skills-lint/scripts/*.test.js
  • git diff --check

GitHub Actions test: passing. CodeRabbit review body unavailable due rate/usage limit, with status context green.

@sungjunlee sungjunlee merged commit d3a596f into main May 31, 2026
2 checks passed
@sungjunlee sungjunlee deleted the codex/fleet-merge-queue branch May 31, 2026 14:40
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dedf81d332

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

throw new MergeQueueInputError(`fleet manifest does not exist: ${manifestPath}`);
}

transitionFleetToMerging(repoRoot, fleetId, options.dryRun);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid moving incomplete fleets into merging

When merge-queue.js is run before every child has reached ready_to_merge, this line persists the fleet as merging before the script checks the child states. A fleet with review_pending or dispatched children then has an empty merge queue and can even return success because those states are not included in operator_attention, but future relay-fleet --review calls will fail trying to transition merging -> reviewing (the fleet state machine only allows merging -> merging|closed). Gate this transition on there being no non-merge-ready/nonterminal children, or report the incomplete children without changing fleet state.

Useful? React with 👍 / 👎.

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