Skip to content

fix(wait): resolve a starting head that a merge into the branch made - #433

Merged
moq-bot[bot] merged 3 commits into
mainfrom
quest/m1/wait-merge-heads
Nov 3, 2026
Merged

moq-bot[bot] merged 3 commits into
mainfrom
quest/m1/wait-merge-heads

Conversation

@kixelated

@kixelated kixelated commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m1/wait-merge-heads.md, raised by moq-dev/quest#347.

Summary

quest wait <pr> <sha> now resolves a starting head that a merge into the branch made (GitHub's Update branch, or a merge queue's merge) instead of failing with cannot resolve push time for <sha>; pass a timestamp with --since.

  • src/cli/status.ts: exports BRANCH_UPDATES (push, force_push, branch_creation, pr_merge, merge_queue_merge), so quest wait and quest status's enabled-head lookup share one list.
  • src/cli/wait.ts: the point, including the default current-head point and the "not listed yet" retry, matches among BRANCH_UPDATES. Reported pushes keep using the push-only list (PUSHES), so a merge never prints as pushed and force pushes print as before.
  • A merge into the branch after the point is no longer swallowed by the baseline commit snapshot: it is reported as its new commit (<sha> committed ...), as a push observed while waiting is.
  • README and --since help: a SHA point may be any tip a push or a merge into the branch moved it to.
  • Deletes the quest and its link from quest/m1/README.md.

Choices made without asking

  • A merge after the point is reported as committed. Before, such a merge's commit landed in the baseline and was never reported (a pre-existing gap the change exposes, since a merge can now be the point while later merges follow). The Plan only says merges must not print as pushed; reporting them as their new commit matches how pushes seen while waiting print, and keeps "a racing head move is never swallowed".
  • PUSHES stays a local list in wait.ts beside the shared BRANCH_UPDATES, since only wait distinguishes a push from a merge.

Tests

bun run check, quest check, and the full bun run test (940 passed, 2 skipped) pass locally. New tests in test/wait.test.ts cover a SHA point made by pr_merge and merge_queue_merge, the default point on a merge-made head, a merge after the point reported as a commit, and that a non-moving activity (branch_deletion) never resolves the point; the first three fail on the old code.

Review

mechanical fix by quest land watch: merged main at 4c19e1125bcb4f951bfe9f48cd54a4ce657fa9a8 with the quest merge driver (head 07bf78b)

  • Harness: quest review → Codex, gpt-6.1-sol, medium effort
  • Head: bc41397 (round 1)
  • Findings: none

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 2 commits November 2, 2026 19:43
`quest wait <pr> <sha>` matched the point only among pushes, so a head
made by GitHub's Update branch or a merge queue's merge failed with
"cannot resolve push time". Match it among every move `quest status`
counts (exported `BRANCH_UPDATES`), keep reporting only real pushes as
`pushed`, and report a merge into the branch after the point as its new
commit instead of swallowing it in the baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title quest wait resolves heads that came from a merge into the branch fix(wait): resolve a starting head that a merge into the branch made Nov 3, 2026
@kixelated
kixelated marked this pull request as ready for review November 3, 2026 03:47
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

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: 07fce1c0-ac9c-40be-8d61-0d4f338c6fe8
  • 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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@kixelated
kixelated added this pull request to the merge queue Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 3, 2026
@moq-bot

moq-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

quest land watch: the merge queue removed this pull request at bc41397 because it conflicts with main (merge_conflict).

The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.

(written by quest land watch)

@moq-bot
moq-bot Bot enabled auto-merge November 3, 2026 16:10
@moq-bot

moq-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

quest land watch: armed auto-merge on this pull request at 07bf78b, so it joins the back of the merge queue once its required checks pass, with main at 4c19e11 merged in by the quest merge driver.

(written by quest land watch)

@moq-bot
moq-bot Bot added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 1043546 Nov 3, 2026
16 checks passed
@moq-bot
moq-bot Bot deleted the quest/m1/wait-merge-heads branch November 3, 2026 16:20
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