You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Completes lane K2/K3 on baseline 13a7b308011c1ea5ef57ec974c5c338584538ec2:
persists submitting -> queued -> merged | removed | failed attempts against the exact plan revision, snapshot, review version, and reviewed head;
treats enqueue success as queued, never merged, and recovers a committed enqueue when its immediate local refresh fails;
polls queue state through a narrow endpoint without rebuilding Git history;
disables the action while submitting/queued and after confirmed merge;
preserves terminal removal/failure reasons and safely retries only an unchanged reviewed context;
keeps replacement heads blocked until every plan item has a replacement-snapshot approval;
requires both validation reads to agree on queue mode before submission;
guards stale poll publication by attempt identity and legal-state compare-and-swap;
aborts and awaits active enqueue/queue inspection during shutdown;
preserves UI selection, draft, attachments, and navigation while queue polling updates only merge state.
Lifecycle/state-holder and interface details are recorded in issue #24 and docs/implementation/merge-queue.md. Queue support remains fail-closed for adapters that do not implement the K1 observation contract.
GitHub CI run 36046438177: typecheck passed; 379 tests across 16 files passed; 46 browser tests passed.
GitHub CI run 36046445549: typecheck passed; 379 tests across 16 files passed; 46 browser tests passed.
Focused local review regressions: replacement approval generation, queue-mode flip, and the previously timed-out question suite all passed.
git diff --check passed.
A local full-suite attempt experienced timeout-only failures while lane D ran Vitest concurrently in another worktree; each failed suite passed in isolation, and both isolated GitHub runners passed the standard commands at the exact head.
Controlled regressions cover enqueue success, delayed merge, queue removal, unmergeable failure, head replacement and complete re-review, queue-mode changes between validation passes, retry, retry while prior work is active, stale old-attempt publication, restart recovery, post-enqueue local refresh failure, queue-inspection shutdown settlement, partial-request shutdown admission, and UI draft/selection preservation.
Review rounds
Self-review round 1: fixed exact-head observation validation and stale poll invalidation after page failure.
Self-review round 2: no new findings.
Copilot round 1: two valid findings fixed in cff4b12: replacement-head fresh-review gating and queue-mode stability across validation reads. Regressions added; threads replied to and resolved.
Declined findings: none.
Deferred follow-ups: none.
Review-lesson audit
Existing rules cover stale publication, shutdown settlement, durable/visible divergence, and post-action failure handling.
New AGENTS.md rules capture both round-1 lessons: context replacement does not itself satisfy fresh review, and lifecycle mode changes between validation passes must abort before the irreversible command.
No finding was classified as one-off.
Current head is mergeable, both CI runs are green, and unresolved review threads are 0. Awaiting a clean Copilot re-review. Do not merge without explicit authorization.
Preserve submitting state for ambiguous enqueue outcomes
runner/merge.ts:155
This catch marks every enqueue-side error, including cancellation or timeout, as a terminal failed attempt and makes it retryable. If gh pr merge has already been accepted by GitHub when the local process is aborted (especially during close()), the existing queue entry is no longer polled; after restart the UI can offer a second enqueue for the same head. Preserve the submitting record for ambiguous command outcomes and recover it through queue inspection, only recording failed when the adapter can establish that submission was refused before commit.
Stale polling response can overwrite newer review state
web/public/app.js:140
This poll is guarded only by mergeGeneration, but review actions in act() update data and reviewGeneration without incrementing mergeGeneration. If a note/assignment completes while this request is in flight, the older response can overwrite the current merge queue status (for example, re-enable retry using the pre-action review version). Capture the current review token/generation when polling starts and discard the response if it changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #24.
Outcome
Completes lane K2/K3 on baseline
13a7b308011c1ea5ef57ec974c5c338584538ec2:submitting -> queued -> merged | removed | failedattempts against the exact plan revision, snapshot, review version, and reviewed head;Lifecycle/state-holder and interface details are recorded in issue #24 and
docs/implementation/merge-queue.md. Queue support remains fail-closed for adapters that do not implement the K1 observation contract.Validation
Validated head:
cff4b12b11bd2c33f5eeab7304cf583953dee19a(exact pushed head).git diff --checkpassed.A local full-suite attempt experienced timeout-only failures while lane D ran Vitest concurrently in another worktree; each failed suite passed in isolation, and both isolated GitHub runners passed the standard commands at the exact head.
Controlled regressions cover enqueue success, delayed merge, queue removal, unmergeable failure, head replacement and complete re-review, queue-mode changes between validation passes, retry, retry while prior work is active, stale old-attempt publication, restart recovery, post-enqueue local refresh failure, queue-inspection shutdown settlement, partial-request shutdown admission, and UI draft/selection preservation.
Review rounds
cff4b12: replacement-head fresh-review gating and queue-mode stability across validation reads. Regressions added; threads replied to and resolved.Review-lesson audit
AGENTS.mdrules capture both round-1 lessons: context replacement does not itself satisfy fresh review, and lifecycle mode changes between validation passes must abort before the irreversible command.Current head is mergeable, both CI runs are green, and unresolved review threads are 0. Awaiting a clean Copilot re-review. Do not merge without explicit authorization.