Conversation
added 18 commits
September 8, 2026 17:45
When a branch's commits are already contained in the rebase base, the pipeline loses the whole diff, logs "empty diff after rebase, skipping remaining steps", and still records the run as completed. Review, test, document, lint, push, pr and ci never execute and no PR is opened, yet fm-crew-state.sh mapped that terminal success straight to done, so a run that validated and delivered nothing read as shippable. Read the steps table instead of the result word: when every mandatory delivery phase is present and skipped, report the run failed and say why. Positive evidence is required in both directions, matching the existing held-green reclassification - an absent table, or any mandatory row that is missing or not skipped, leaves the run's own reported result untouched, so a real delivery and a partial skip both stay done. Record at project-management the measured supported way to change a delivery target: the PR target is the clone's own origin remote, so it changes by repointing origin and re-running no-mistakes init, which also refreshes the gate mirror. Editing the gate mirror's remote URL alone changes neither the registration nor its tracking refs.
…p unreachable hook
… continuation path
GitHub merge-queue rulesets refuse any explicit merge method, and the unguarded --squash default made the guarded merge path unusable on those branches. --method=queue and --no-method now skip that default without forwarding a strategy, matching the GitLab "let the project decide" rule. A queued pull request stays OPEN until it lands, so the merge poll and teardown still wait for MERGED rather than treating enqueue as landing.
…ides flags on GitLab
…ategy Dropping only the queue token forwarded --squash, --merge, or --rebase, and a merge-queue branch would reject that merge. Name both incompatible requests and refuse before the forge is called.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intent
Launch two additional grouped batches, with the objective of reducing the remaining task queue to zero where possible. For this delivery-reliability batch, finish the already identified Firstmate work as one coherent delivery: make the guarded merge path support merge-queue branches through enqueuePullRequest; never propose a retry the command parser will reject or that the caller already supplied; ensure Firstmate ships to cisrd/firstmate, where the captain has merge authority, rather than silently opening work against a read-only upstream; and finish the existing guard from #8 so a no-mistakes run that delivered nothing cannot be declared valid. Reuse and reconcile existing published work instead of duplicating it, and preserve every existing branch and pull request.
What Changed
enqueuePullRequest, with head-bound preflight checks, live queue confirmation, and parser-compatible retries that are not repeated when already supplied.Risk Assessment
Testing
All four relevant suites passed with lsof available. Independent CLI replays confirmed real process reaping and simulated GitHub enqueue/retry behavior. Prior empty-delivery evidence remains available; no live PRs or branches were changed.
Evidence: Real leaked-process discovery and teardown
Source: Real leaked-process discovery and teardown
Evidence: Queue retry and GraphQL enqueue replay (simulated GitHub)
Source: Queue retry and GraphQL enqueue replay (simulated GitHub)
Evidence: Prior empty-delivery CLI rejection
Source: Prior empty-delivery CLI rejection
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 4 issues found → auto-fixed ✅
bin/fm-pr-merge.sh:635- The head-continuity check reads metadata after record_pr_metadata has refreshed it. Concrete sequence: readiness records head A; another push replaces it with B; --queue calls fm-pr-check.sh, which overwrites pr_head with B (or removes it on lookup failure); preflight then accepts B and enqueues it. expectedHeadOid only protects pushes after preflight, not this replacement. Preserve the previously recorded head before registration and compare it before refreshing metadata. Extend the regression to change the head before invoking the wrapper, rather than only between its two live reads.bin/fm-pr-merge.sh:156- Simplification: --no-method, --method=queue, and --method queue introduce three alternative queue spellings absent from the base implementation. The stated intent requires a supported enqueue operation and runnable, non-repeated retry guidance, not compatibility with intermediate implementations in this branch. Recommend retaining only --queue and removing the additional acceptance paths and alias-specific tests.tests/fm-teardown.test.sh:379- Simplification: the newly added add_gh_pr_open_for_head helper has no callers and duplicates the open-state fixture already provided by add_gh_pr_state_for_head. No intent requirement needs this parallel implementation. Remove the unused helper.tests/fm-crew-state.test.sh:484- The full-delivery control fixture uses outcome: checks-passed, which bypasses the new vacuous-success guard and unconditionally reports done. Consequently, test_completed_run_with_full_delivery_still_reads_done would pass even if the guard incorrectly rejected an all-completed table. Remove this outcome line or use outcome: passed so the control exercises the changed classification path.🔧 Fix: Remove intermediate queue aliases and unused teardown fixture
✅ Re-checked - no issues remain.
🔧 **Test** - 1 issue found → auto-fixed ✅
tests/fm-teardown.test.sh:3296- Teardown testing stopped at test_leaked_worktree_process_is_reaped: the sleeper survived teardown. This host lacks lsof, needed to discover the fixture's detached process. Installing packages is prohibited in this phase; provide lsof and rerun this test to complete process-reaping verification.bash tests/fm-pr-merge.test.shpassed.bash tests/fm-pr-check-security.test.shpassed on standalone retry after the initial combined command timed out.bash tests/fm-crew-state.test.shpassed.bash tests/fm-teardown.test.shpassed queued-PR preservation checks, then failed detached-process reaping.Executed temporary fixture drivers through the real merge and crew-state CLIs, replayed emitted retry arguments, and captured queue, permission-refusal, metadata, and empty-delivery outputs; removed both drivers.command -v lsofconfirmed the missing dependency;git remote -vconfirmed cisrd/firstmate; finalgit status --shortwas clean.🔧 Fix: Verify detached-process reaping with restored lsof dependency
✅ Re-checked - no issues remain.
command -v lsofconfirmed the supplied executable.bash tests/fm-teardown.test.shran the complete teardown suite, including leaked-process reaping.bash tests/fm-pr-merge.test.shexercised enqueue, runnable retry guidance, permissions, and merge verification.bash tests/fm-crew-state.test.shexercised empty-delivery rejection and delivery-state classification.bash tests/fm-pr-check-security.test.shexercised PR registration and poll security.Replayedtest_leaked_worktree_process_is_reapedindependently and captured actual teardown output.Replayedtest_github_queue_retry_guidance_is_runnableandtest_queue_preflight_refuses_read_only_repositoryusing existing fixtures; captured CLI output and GraphQL requests.Reviewed prior queue and empty-delivery CLI evidence; removed transient harnesses and confirmed a clean worktree.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.