Skip to content

feat: merge upstream firstmate main (update-branch merges, inherit recovery, procevent and record-export fixes) - #358

Merged
trillium merged 5 commits into
mainfrom
fm/upstream-merge-20261106
Nov 6, 2026
Merged

trillium merged 5 commits into
mainfrom
fm/upstream-merge-20261106

Conversation

@trillium

@trillium trillium commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Intent

Resolve the nightly firstmate upstream reconcile conflict under the captain's runbook (runbooks-0et, 2026-11-04): firstmate owns the conflict-resolution PR (yolo, merged on green, never parked on the captain), and every conflict outcome gets a creature review.

Context: the mini0 nightly job tried at 2026-11-06T11:45Z to merge upstream kunchenguid/firstmate main 65a9a51 (4 commits) into the fork trillium/firstmate main 3f7bdf3 and hit conflicts in: bin/fm-pr-merge.sh docs/pi-supervision-branch.md tests/fm-test-run.test.sh. Nothing was pushed.

What Changed

  • Merges upstream kunchenguid/firstmate main (65a9a51, 4 commits) into the fork and resolves the conflicts in bin/fm-pr-merge.sh, docs/pi-supervision-branch.md, and tests/fm-test-run.test.sh.
  • fm-pr-merge.sh gains a GitHub-only --update-branch flag. Without the flag, a merge request for a green PR that is behind its base is refused. With it, the script updates the branch through the REST update-branch endpoint, pinned to the verified old head. It then records the new head and polls the full preflight within a bounded budget before merging, and refuses immediately on failed checks, conflicts, drafts, or a head that moves again.
  • Upstream fixes:
    • fm-remote-inherit.sh adds a locked, validated generation query. fm_remote_inherit_generation_next accepts a committed remote floor, so remote inheritance recovers after the sender loses its counter.
    • fm-procevent.sh refreshes the owner lease before detached runner launches.
    • fm-record-export.py now treats empty FM_* override variables as unset and skips hidden state files.
    • The branch adds tests for each change, including a new tests/fm-remote-inherit-generation.test.sh registered in fm-test-run.sh, plus matching doc updates.

Risk Assessment

✅ Low: All three conflicts were resolved by keeping both sides' intent. Upstream's GitHub readiness changes were moved into the fork's shared library, where the four functions match upstream except for two existing fork-only additions. The doc row merge and the test registration both line up, and no conflict markers or duplicate function definitions are left.

Testing

I ran the full fm-pr-merge suite: it drives the real merged script against a stubbed forge, and all 137 cases passed, including upstream's new behind-branch update flows. The resolved fm-test-run.test.sh registers and passes upstream's new remote-inheritance selector test. The real fm-test-run.sh selection CLI picks fm-pr-merge, fm-test-run and fm-remote-inherit-generation tests for the merge diff. The fork-only consumer bin/fm-pr-ready-check.sh, which sources the merged lib, works against three live GitHub PRs and gives coherent refusals for red and unreported checks. I tried a direct lab-home CLI probe of the --update-branch argument guards. It stopped at an earlier "invalid PR merge request" check, so I discarded it and relied on the suite's coverage of those guards instead. The merge flow and the test-runner registration were only checked through test suites, not live, so they are recorded as untested.

  • Live validation: ✅ go - 2 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Operator merges a GitHub PR through the merged fm-pr-merge.sh: upstream's behind-branch update only with --update-branch, and all existing guards still refuse ⏸️ untested no The earlier payload did not establish a live result. This flow was only run through bash tests/fm-pr-merge.test.sh against a stubbed gh forge (137 ok). A truly live merge would merge real GitHub pul…
Fork-only fm-pr-ready-check.sh still judges real PRs through the merged ready-lib, which now includes upstream's settled_only and flag changes ✅ pass live fm-pr-ready-check-live.txt: PRs 355/354/352 each exit 1, listing not-green checks and the unreported required check at the live head
Conflicted test runner file: upstream's new remote-inheritance selection test is registered in the fork's TESTS array and passes ⏸️ untested no The earlier payload did not establish a live result. This is a test-harness file with no runtime product surface; it was only run as a test (`FM_TEST_SELECTOR=test_changed_remote_inheritance_selects_g…
fm-test-run.sh selects the affected suites for the merge diff, including fm-pr-merge, fm-test-run and fm-remote-inherit-generation ✅ pass live fm-test-run-selection.txt
docs/pi-supervision-branch.md conflict keeps the fork's fm-spawn live-workers row and upstream's fm-pr-merge row ⏸️ untested no This is a docs-only conflict with no runtime surface. I checked the resolution by reading git show --remerge-diff e7acdd44 -- docs/pi-supervision-branch.md, and it holds exactly one row per script.
Evidence: fm-pr-merge suite transcript (137 ok)

Source: fm-pr-merge suite transcript (137 ok)

observation: visibility=updated blocker=draft waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=updated blocker=draft waiting=missing preflight_reads=2 retry_advice=false
observation: visibility=updated blocker=closed waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=updated blocker=closed waiting=missing preflight_reads=2 retry_advice=false
observation: visibility=updated blocker=conflict waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=updated blocker=conflict waiting=missing preflight_reads=2 retry_advice=false
observation: visibility=updated blocker=required-source waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=updated blocker=required-source waiting=missing preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=draft waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=draft waiting=missing preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=closed waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=closed waiting=missing preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=conflict waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=conflict waiting=missing preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=required-source waiting=pending preflight_reads=2 retry_advice=false
observation: visibility=delayed blocker=required-source waiting=missing preflight_reads=2 retry_advice=false
ok - fm-pr-merge immediately refuses draft, closed, conflicting, or unreadable updated heads despite pending or missing checks
ok - fm-pr-merge refuses a concurrent source-head change before updating, with or without --expected-head
ok - fm-pr-merge reports exact queue retry flags after a zero-exit false success
ok - fm-pr-merge omits merge-queue retry guidance for a closed GitHub PR
ok - fm-pr-merge aggregates agreeing merge-queue rules
ok - fm-pr-merge reports ambiguity for conflicting merge-queue rules
ok - fm-pr-merge records pr= and pr_head= for a verified GitHub merge
ok - fm-pr-merge records pr= before the forge call can land the merge
ok - fm-pr-merge propagates a real merge failure without silently succeeding
ok - fm-pr-merge refuses a GitHub merge call that leaves the PR open and unqueued
ok - fm-pr-merge retries a bounded number of times when mergeable is UNKNOWN and merges once it resolves
ok - fm-pr-merge reports mergeability still pending after its bounded UNKNOWN retry is spent
ok - fm-pr-merge refuses on the UNKNOWN re-check when a check turned red between reads
ok - fm-pr-merge refuses a genuine mergeable conflict immediately, without retrying
ok - fm-pr-merge keeps PR bookkeeping when it cannot read a successful merge call's outcome
ok - fm-pr-merge refuses with the forge's own output quoted apart from its verdict
ok - fm-pr-merge quotes the forge output when it cannot read the outcome either
ok - fm-pr-merge does not echo back queue flags the caller already used
ok - fm-pr-merge still names retry flags when the caller used a different method
ok - fm-pr-merge names the queue requirement even when its method is unrecognised
ok - fm-pr-merge distinguishes unreadable branch rules from a base with no merge queue
ok - fm-pr-merge reads a plan-gated 403 on branch rules as no merge queue, not unreadable
ok - fm-pr-merge says nothing about a merge queue when the base branch has no queue rule
ok - fm-pr-merge accepts only a proved merge from the gh-axi fallback
ok - fm-pr-merge explains an armed auto-merge that landed nothing on a queue-less base
ok - fm-pr-merge never reports auto-merge as armed when the merge command failed
ok - fm-pr-merge claims no acceptance for a failed merge command carrying queue flags
ok - fm-pr-merge falls back to the gh-axi view when gh's read fails
ok - fm-pr-merge names a landed state hiding behind a failed GitHub merge command
ok - fm-pr-merge refuses a GitHub merge when gh is missing, before recording
ok - fm-pr-merge refuses a GitHub merge when gh is missing rather than merging blind
ok - fm-pr-merge verifies a genuinely merged GitHub pull request
ok - fm-pr-merge refuses to claim a merge when poll recording fails
ok - fm-pr-merge accepts and accurately reports a GitHub merge-queue entry
ok - fm-pr-merge explains how to retry with the required GitHub merge queue method
ok - fm-pr-merge refuses branch deletion unless --attended-override is passed
ok - fm-pr-merge refuses before merging when task meta is missing
ok - fm-pr-merge refuses malformed PR URLs before calling gh-axi
ok - fm-pr-merge --help and -h print the header usage and exit 0
ok - fm-pr-merge refuses unsafe PR URL segments before recording state
ok - fm-pr-merge refuses repo override args before recording state
ok - fm-pr-merge refuses a bundled short-option repo override and refuses -d unless attended
ok - fm-pr-merge does not add default --squash when the caller passes an explicit merge method
ok - fm-pr-merge respects --method=<value> as an explicit merge method
ok - fm-pr-merge parses a GitHub PR URL into gh-axi number and --repo arguments
ok - fm-pr-merge refuses a caller --sha on GitHub because the head comes from the live read
ok - fm-pr-merge merges a GitLab merge request through glab instead of refusing it
ok - fm-pr-merge takes the GitLab instance from the URL rather than assuming one
ok - fm-pr-merge imposes no merge method on GitLab, leaving the project's own one
ok - fm-pr-merge refuses GitLab source-branch deletion unless --attended-override is passed
ok - fm-pr-merge propagates a real glab merge failure without silently succeeding
ok - fm-pr-merge refuses on each GitLab pre-merge condition independently
ok - fm-pr-merge reports every failing GitLab condition, not only the first
ok - fm-pr-merge reports a stale recorded head and verifies the live one
ok - fm-pr-merge refuses an unreadable GitLab merge request state rather than merging blind
ok - fm-pr-merge refuses a GitLab head commit it cannot validate
ok - fm-pr-merge refuses before recording anything when glab or jq is absent
ok - fm-pr-merge merges a Forgejo pull request through tea api instead of refusing it
ok - fm-pr-merge resolves the tea login by matching the PR's host against every registered login
ok - fm-pr-merge refuses when zero or more than one tea login matches the pull request's host
ok - fm-pr-merge refuses on each Forgejo pre-merge condition independently
ok - fm-pr-merge treats an unconfigured Forgejo combined status as none, refusing rather than skipping the check
ok - fm-pr-merge reads every Forgejo combined-status page before merging
ok - fm-pr-merge reports a stale recorded head and binds the merge to the live one instead
ok - fm-pr-merge refuses a Forgejo head commit it cannot validate
ok - fm-pr-merge refuses before recording anything when tea or jq is absent
ok - fm-pr-merge never trusts tea api's exit status alone; a rejected merge is caught by the confirm read
ok - fm-pr-merge retries a failed Forgejo confirmation read and persists the merge authority
ok - fm-pr-merge maps --squash/--rebase to Forgejo's Do field, defaults to the repository's default merge style, and refuses any other extra argument
ok - fm-pr-merge refuses a GitLab head override before recording state
ok - a merge a secondmate home performs itself is reported upward exactly once
ok - a locally routed secondmate home reports the landed PR into its parent's own channel
ok - a landed GitLab merge request is reported upward on the same channel
ok - a queued GitLab merge stays silent and leaves confirmation to the armed poll
ok - a refused or failed merge reports no outcome
ok - a GitLab merge refused before the forge call reports no outcome
ok - a merge a main home performs itself leaves one durable wake naming the PR
ok - a queued GitHub merge stays silent and leaves confirmation to the armed poll
ok - distinct merged PRs for one task retain distinct captain-facing wakes
ok - an uncommitted marker retry preserves at least one durable outcome
ok - a secondmate home that cannot report upward says so instead of merging in silence
ok - fm-pr-merge proceeds when the home carries no backlog at all
ok - fm-pr-merge refuses when the backlog exists but cannot be read
ok - fm-pr-merge refuses when its configured backend cannot be read
ok - fm-pr-merge refuses when its user backend configuration cannot be read
ok - fm-pr-merge refuses when its user backend configuration directory cannot be traversed
ok - fm-pr-merge proceeds once when its user configuration directory and backlog are genuinely absent
ok - fm-pr-merge honors a backend override over an unreadable user configuration
ok - fm-pr-merge updates behind branches only with explicit opt-in after all guards pass
ok - fm-pr-merge retains --expected-head before and after a consented behind-branch update
ok - fm-pr-merge refuses failed updated checks immediately while other checks are pending
ok - fm-pr-merge updates a green behind branch and merges only after the new head is green
ok - fm-pr-merge refuses red GitHub checks and waives only a named --allow-red check
ok - fm-pr-merge refuses a draft pull request and one with no boolean draft state
ok - fm-pr-merge merges when a failed check run was replaced by a passing re-run
ok - fm-pr-merge never lets a check run supersede a legacy status context
ok - fm-pr-merge still refuses when a check's current run failed after an earlier pass
ok - fm-pr-merge uses start order when the old success finishes last
ok - fm-pr-merge supersedes an old cancellation that finishes last
ok - fm-pr-merge keeps a check red while its re-run is still in flight
ok - fm-pr-merge never lets one check's pass clear another check's failure
ok - fm-pr-merge clears a failure only on a proven later pass of the same check
ok - fm-pr-merge keeps --allow-red scoped to its named check beside a superseded failure
ok - fm-pr-merge rechecks away presence before an attended red merge
ok - fm-pr-merge keeps a quiet-mode home's merges attended, the named red-check waiver included
ok - fm-pr-merge accepts exactly one separately named red-check waiver
ok - while the away-posture record exists any green merge lands under away authority, yolo or not, and attended merges stay untagged
ok - under the away-posture record the branch merges a green task, is refused on a red check with or without --allow-red, and is refused at the partition while attended
ok - a branch merge refuses under the lock when the away record is archived during preflight
ok - away posture permits immediate merges but refuses every asynchronous path
ok - away merge proceeds on a plan-gated 403 because that repository cannot have a merge queue
ok - the away record does not bypass red checks, and a recorded pr= must match the URL
ok - an unreadable away-posture record refuses the merge instead of skipping the record
ok - no away-record archive or replacement lands between the authority read and the merge
ok - a record made unreadable before the merge's own authority read refuses the merge
ok - a merge that cannot lock the away record refuses instead of merging unlocked
ok - fm-pr-merge refuses --allow-red on GitLab
ok - fm-pr-merge refuses when a required check from branch protection or a ruleset never reported
ok - fm-pr-merge merges when every required check reported and is green
ok - fm-pr-merge reports a red check and an unreported required check together with every other failure
ok - fm-pr-merge names a cancelled check and says it needs a rerun
ok - fm-pr-merge refuses when the required checks cannot be read, and tells a plan without rules apart
ok - fm-pr-merge --allow-missing waives only its named unreported check
ok - fm-pr-merge --allow-missing is single use, attended-only, and GitHub-only like --allow-red
ok - fm-pr-merge enforces required producer identity and named waivers
ok - fm-pr-merge matches an app-bound required commit status by name
ok - fm-pr-merge reports known missing checks and all independent read errors
ok - fm-pr-merge refuses --allow-red on Forgejo
ok - fm-pr-merge refuses --allow-missing on Forgejo
ok - fm-pr-merge --allow-no-pipeline waives only a null GitLab head pipeline and keeps every other condition
ok - fm-pr-merge --allow-no-pipeline is attended-only, takes no value, and applies only to GitLab
ok - fm-pr-merge sends a matching --expected-head to each forge
ok - fm-pr-merge refuses before any merge write when the live head differs from --expected-head
ok - fm-pr-merge binds the forge write to the supplied head after that head moves
ok - fm-pr-merge does not replace --expected-head when a later preflight reads a new head
ok - fm-pr-merge refuses a malformed, abbreviated, missing, or conflicting --expected-head before any effect
ok - fm-pr-merge keeps draft, hold, review, check, authority, and identity refusals when --expected-head matches
bash tests/fm-pr-merge.test.sh  274.72s user 239.67s system 83% cpu 10:19.06 total
Evidence: fm-test-run selection on merge diff

Source: fm-test-run selection on merge diff

$ bin/fm-test-run.sh --list --changed --base 3f7bdf31
tests/fm-check-unregister.test.sh
tests/fm-pipeline-spend.test.sh
tests/fm-pr-check-security.test.sh
tests/fm-pr-health.test.sh
tests/fm-pr-merge.test.sh
tests/fm-pr-reviewers.test.sh
tests/fm-pr-state.test.sh
tests/fm-review-diff.test.sh
tests/fm-teardown.test.sh
tests/fm-x-mode.test.sh
tests/fm-backlog-handoff.test.sh
tests/fm-on.test.sh
tests/fm-remote-backlog-handoff.test.sh
tests/fm-remote-doctor.test.sh
tests/fm-remote-herdr-guard.test.sh
tests/fm-remote-job-orphan-reap.test.sh
tests/fm-remote-job-process-start.test.sh
tests/fm-remote-job.test.sh
tests/fm-remote-reply.test.sh
tests/fm-remote-secondmate-lifecycle-e2e.test.sh
tests/fm-remote-secondmate-relaunch.test.sh
tests/fm-remote-secondmate-trace-context.test.sh
tests/fm-remote-transport-lanes.test.sh
tests/fm-secondmate-harness.test.sh
tests/fm-secondmate-lifecycle-e2e.test.sh
tests/fm-secondmate-liveness.test.sh
tests/fm-secondmate-reconcile.test.sh
tests/fm-secondmate-restart.test.sh
tests/fm-secondmate-safety.test.sh
tests/fm-secondmate-sync.test.sh
tests/fm-send-secondmate-marker.test.sh
tests/fm-shared-captain-inheritance.test.sh
tests/fm-startup-memory-budget.test.sh
tests/fm-stow-cascade.test.sh
tests/fm-agy-harness.test.sh
tests/fm-arm-pretool-check.test.sh
tests/fm-ask-user-authority.test.sh
tests/fm-bearings-board.test.sh
tests/fm-brief.test.sh
tests/fm-calm-claude-mod.test.sh
tests/fm-calm-pi-extension.test.sh
tests/fm-captain-hold-lifecycle.test.sh
tests/fm-cd-pretool-check.test.sh
tests/fm-classify-decision-key.test.sh
tests/fm-commandcode-harness.test.sh
tests/fm-composer-ghost.test.sh
tests/fm-composer-lib.test.sh
tests/fm-cortex-harness.test.sh
tests/fm-crew-state.test.sh
tests/fm-devin-harness.test.sh
tests/fm-documentation-audiences.test.sh
tests/fm-dod-lib.test.sh
tests/fm-ensure-agents-md.test.sh
tests/fm-forge-detect.test.sh
tests/fm-fork-free-helpers.test.sh
tests/fm-grok-harness.test.sh
tests/fm-harness-adapter-references.test.sh
tests/fm-harness-precedence.test.sh
tests/fm-herdr-lab.test.sh
tests/fm-hermes-harness.test.sh
tests/fm-install-herdr.test.sh
tests/fm-kimi-harness.test.sh
tests/fm-kiro-harness.test.sh
tests/fm-lint-workflows.test.sh
tests/fm-lint.test.sh
tests/fm-merge-local.test.sh
tests/fm-muse-harness.test.sh
tests/fm-omp-harness.test.sh
tests/fm-operational-input.test.sh
tests/fm-pi-primary-types.test.sh
tests/fm-polytoken-harness.test.sh
tests/fm-project-mode.test.sh
tests/fm-question-tool-pretool-check.test.sh
tests/fm-read-repetition.test.sh
tests/fm-remote-inherit-generation.test.sh
tests/fm-rovo-harness.test.sh
tests/fm-send-popup-settle.test.sh
tests/fm-send-settle.test.sh
tests/fm-subagent-pretool-check.test.sh
tests/fm-supervision-instructions.test.sh
tests/fm-task-delivery.test.sh
tests/fm-test-isolation-proof.test.sh
tests/fm-test-linux.test.sh
tests/fm-test-run.test.sh
tests/fm-test-tap-verify.test.sh
tests/fm-timeout-lib.test.sh
tests/fm-tmux-submit-busy.test.sh
tests/fm-trace-context-lib.test.sh
tests/fm-transition-lib.test.sh
tests/fm-vendor-auth-probe.test.sh
tests/fm-extension-binding.test.sh
tests/fm-procevent-extension-errors.test.sh
tests/fm-procevent.test.sh
tests/fm-procevent-when.test.sh
tests/fm-record-export.test.sh
tests/fm-backend-t3code.test.sh
tests/fm-test-fixtures.test.sh
tests/fm-bootstrap-network-parallel.test.sh
rc=0

$ bin/fm-test-run.sh --list --all --affected --base 3f7bdf31
fm-test-run: FM_TEST_AFFECTED mode=full reason=shared-test-runner:bin/fm-test-run.sh changed=19 tests=362
tests/fm-afk-contract.test.sh
tests/fm-afk-inject-e2e.test.sh
tests/fm-afk-inject-herdr-e2e.test.sh
tests/fm-afk-launch.test.sh
tests/fm-afk-pi-herdr-return-e2e.test.sh
tests/fm-afk-return.test.sh
tests/fm-agy-harness.test.sh
tests/fm-agy-primary-live-e2e.test.sh
tests/fm-agy-primary.test.sh
tests/fm-agy-signals-live-e2e.test.sh
tests/fm-approval-failover.test.sh
tests/fm-arm-pretool-check.test.sh
tests/fm-ask-user-authority.test.sh
tests/fm-assertions.test.sh
tests/fm-backend-autodetect-smoke.test.sh
tests/fm-backend-cmux-smoke.test.sh
tests/fm-backend-cmux.test.sh
tests/fm-backend-hc-appdetect-smoke.test.sh
tests/fm-backend-hc-liveness-live-e2e.test.sh
tests/fm-backend-hc-smoke.test.sh
tests/fm-backend-hc.test.sh
tests/fm-backend-herdr-agent-exit-shell-e2e.test.sh
tests/fm-backend-herdr-eventwait-smoke.test.sh
tests/fm-backend-herdr-focus-flash-e2e.test.sh
tests/fm-backend-herdr-launcher-workspace-e2e.test.sh
tests/fm-backend-herdr-presentation-e2e.test.sh
tests/fm-backend-herdr-prune-safety-e2e.test.sh
tests/fm-backend-herdr-respawn-idem-e2e.test.sh
tests/fm-backend-herdr-smoke.test.sh
tests/fm-backend-herdr-stale-active-tab-e2e.test.sh
tests/fm-backend-herdr-workspace-per-home-e2e.test.sh
tests/fm-backend-herdr.test.sh
tests/fm-backend-orca.test.sh
tests/fm-backend-paseo-smoke.test.sh
tests/fm-backend-paseo.test.sh
tests/fm-backend-rex-composer-live-e2e.test.sh
tests/fm-backend-rex-eventwait-smoke.test.sh
tests/fm-backend-rex-smoke.test.sh
tests/fm-backend-rex.test.sh
tests/fm-backend-t3code-live-e2e.test.sh
tests/fm-backend-t3code-pr-tools-live-e2e.test.sh
tests/fm-backend-t3code.test.sh
tests/fm-backend-tern-smoke.test.sh
tests/fm-backend-tern.test.sh
tests/fm-backend-tmux-smoke.test.sh
tests/fm-backend-zellij-smoke.test.sh
tests/fm-backend-zellij.test.sh
tests/fm-backend.test.sh
tests/fm-backlog-atomicity.test.sh
tests/fm-backlog-handoff.test.sh
tests/fm-backlog-read-bound.test.sh
tests/fm-bearings-board-lavish-live-e2e.test.sh
tests/fm-bearings-board-render.test.sh
tests/fm-bearings-board.test.sh
tests/fm-bearings-snapshot.test.sh
tests/fm-bootstrap-network-parallel.test.sh
tests/fm-bootstrap.test.sh
tests/fm-branch-supervision.test.sh
tests/fm-brief.test.sh
Evidence: Live read-only fm-pr-ready-check against real PRs

Source: Live read-only fm-pr-ready-check against real PRs

$ bin/fm-pr-ready-check.sh https://github.com/trillium/firstmate/pull/355
error: refusing to merge https://github.com/trillium/firstmate/pull/355
  - check 'Behavior portable serial 4' is not green
  - required check 'Behavior timing aggregate' has not reported at head 62275e28c3c39a7cbbdd75984910d62eb6e5b1ff
error: these checks are not green: Behavior portable serial 4
error: these required checks have not reported: Behavior timing aggregate
exit=1

$ bin/fm-pr-ready-check.sh https://github.com/trillium/firstmate/pull/354
error: refusing to merge https://github.com/trillium/firstmate/pull/354
  - check 'Behavior portable parallel 1' is not green
  - check 'Behavior portable serial 1' is not green
  - check 'Behavior portable serial 10' is not green
  - check 'Behavior portable serial 12' is not green
  - check 'Behavior portable serial 2' is not green
  - check 'Behavior portable serial 3' is not green
  - check 'Behavior portable serial 4' is not green
  - check 'Behavior portable serial 5' is not green
  - check 'Behavior portable serial 6' is not green
  - check 'Behavior portable serial 7' is not green
  - check 'Behavior portable serial 9' is not green
  - required check 'Behavior timing aggregate' has not reported at head c41b878213677fd1129fde36b4a938d0839e64d4
error: these checks are not green: Behavior portable parallel 1, Behavior portable serial 1, Behavior portable serial 10, Behavior portable serial 12, Behavior portable serial 2, Behavior portable serial 3, Behavior portable serial 4, Behavior portable serial 5, Behavior portable serial 6, Behavior portable serial 7, Behavior portable serial 9
error: these required checks have not reported: Behavior timing aggregate
exit=1

$ bin/fm-pr-ready-check.sh https://github.com/trillium/firstmate/pull/352
error: refusing to merge https://github.com/trillium/firstmate/pull/352
  - check 'Behavior portable parallel 1' is not green
  - check 'Behavior portable parallel 2' is not green
  - check 'Behavior portable serial 1' is not green
  - check 'Behavior portable serial 10' is not green
  - check 'Behavior portable serial 11' is not green
  - check 'Behavior portable serial 12' is not green
  - check 'Behavior portable serial 2' is not green
  - check 'Behavior portable serial 3' is not green
  - check 'Behavior portable serial 4' is not green
  - check 'Behavior portable serial 5' is not green
  - check 'Behavior portable serial 6' is not green
  - check 'Behavior portable serial 7' is not green
  - check 'Behavior portable serial 8' is not green
  - check 'Behavior portable serial 9' is not green
  - check 'Behavior tests (Herdr)' is not green
  - check 'Lint 1' is not green
  - check 'Lint 2' is not green
  - check 'Lint 3' is not green
  - check 'Lint 4' is not green
  - check 'Repo invariants' is not green
  - check 'Test coverage guard' is not green
  - required check 'Behavior timing aggregate' has not reported at head 0c41482adf4603687884dc264b8b1d91f52df130
error: these checks are not green: Behavior portable parallel 1, Behavior portable parallel 2, Behavior portable serial 1, Behavior portable serial 10, Behavior portable serial 11, Behavior portable serial 12, Behavior portable serial 2, Behavior portable serial 3, Behavior portable serial 4, Behavior portable serial 5, Behavior portable serial 6, Behavior portable serial 7, Behavior portable serial 8, Behavior portable serial 9, Behavior tests (Herdr), Lint 1, Lint 2, Lint 3, Lint 4, Repo invariants, Test coverage guard
error: these required checks have not reported: Behavior timing aggregate
exit=1

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 2 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Operator merges a GitHub PR through the merged fm-pr-merge.sh: upstream's behind-branch update only with --update-branch, and all existing guards still refuse ⏸️ untested no The earlier payload did not establish a live result. This flow was only run through bash tests/fm-pr-merge.test.sh against a stubbed gh forge (137 ok). A truly live merge would merge real GitHub pul…
Fork-only fm-pr-ready-check.sh still judges real PRs through the merged ready-lib, which now includes upstream's settled_only and flag changes ✅ pass live fm-pr-ready-check-live.txt: PRs 355/354/352 each exit 1, listing not-green checks and the unreported required check at the live head
Conflicted test runner file: upstream's new remote-inheritance selection test is registered in the fork's TESTS array and passes ⏸️ untested no The earlier payload did not establish a live result. This is a test-harness file with no runtime product surface; it was only run as a test (`FM_TEST_SELECTOR=test_changed_remote_inheritance_selects_g…
fm-test-run.sh selects the affected suites for the merge diff, including fm-pr-merge, fm-test-run and fm-remote-inherit-generation ✅ pass live fm-test-run-selection.txt
docs/pi-supervision-branch.md conflict keeps the fork's fm-spawn live-workers row and upstream's fm-pr-merge row ⏸️ untested no This is a docs-only conflict with no runtime surface. I checked the resolution by reading git show --remerge-diff e7acdd44 -- docs/pi-supervision-branch.md, and it holds exactly one row per script.
  • bash tests/fm-pr-merge.test.sh (all 137 cases ok, exit 0, including the upstream behind-branch/--update-branch cases)
  • FM_TEST_SELECTOR=test_changed_remote_inheritance_selects_generation_contract bash tests/fm-test-run.test.sh
  • bin/fm-test-run.sh --list --changed --base 3f7bdf31 and --list --all --affected --base 3f7bdf31 on the merge diff
  • bin/fm-pr-ready-check.sh https://github.com/trillium/firstmate/pull/{355,354,352} (read-only, real GitHub)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Conflict resolutions

  • bin/fm-pr-merge.sh: combined. Kept the fork's layout, where the GitHub readiness code lives in bin/fm-pr-github-ready-lib.sh. Ported upstream's check-settling and refusal-tracking changes into that library, kept github_update_behind_branch in fm-pr-merge.sh, and took upstream's --update-branch header, argument parsing and provider-case hunks as they merged.
  • docs/pi-supervision-branch.md: combined. Took upstream's merge-helper row and kept the fork's spawn-cap row naming live-workers.
  • tests/fm-test-run.test.sh: kept fork. Kept the fork's TESTS=( array and added upstream's new test_changed_remote_inheritance_selects_generation_contract to it; the test-runner selector stays in this PR.

No fork-only change looks redundant now that upstream covers it. The spawn-cap row's live-workers wording is a doc refinement upstream has not made, though the command itself exists upstream.

What a human will see

Nothing visual changes. The affected output is command behaviour: bin/fm-pr-merge.sh now refuses a merge of a green PR that is behind its base unless --update-branch is passed, in which case it updates the branch first. The away-mode doc table in docs/pi-supervision-branch.md reads slightly differently.

flowchart LR
  subgraph Before
    A[fork main 3f7bdf31] --- B[upstream main 4869cf58 base]
  end
  subgraph After
    C[fork main plus upstream 65a9a51f] --> D[merge-pr: refuses behind PR unless --update-branch]
  end
  Before --> After
Loading

tiago-peixoto and others added 5 commits November 5, 2026 11:16
…henguid#8191)

* Refresh owner presence before detached process-event startup

* no-mistakes(review): Correct lease documentation and CI evidence claims
…d#8104) (kunchenguid#8187)

* fix: recover remote inheritance generations after counter loss

* no-mistakes(review): Restore inheritance pushes to older receivers

* no-mistakes(document): Document inheritance counter recovery

* test: cover inheritance selection and mutation kill boundary

* no-mistakes(document): Clarify receiver generation query documentation
…uid#6330)

* fix: update green behind PR before merge

* no-mistakes(review): Update behind PRs for any method; await UNKNOWN

* no-mistakes(review): Cap update-branch wait under merge locks

* no-mistakes(review): Fix stale update-wait header comment

* docs: clarify branch update authority

* fix(merge): require branch-update consent and stop on failure

* no-mistakes(review): Await UNKNOWN after waivers; report unreadable post-update state

* fix(merge): pin branch update to checked head

Send expected_head_sha with the REST update so a concurrent push cannot
advance an unchecked replacement head.

Refuse a head mismatch without retrying against the new head.

* no-mistakes(document): Clarify branch-update consent, head pinning, and polling guidance

* fix(bin): stop waits on non-check refusals

Pending or missing checks must not mask draft, state, conflict, or required-check read refusals after a branch update.

* no-mistakes(review): Refuse blockers while awaiting updated pull request heads

* no-mistakes(document): Document immediate refusals during branch update polling
@coderabbitai

coderabbitai Bot commented Nov 6, 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: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b48a4ef3-498f-411f-911b-43c680d178b6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

@trillium
trillium merged commit 7179694 into main Nov 6, 2026
28 checks passed
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.

4 participants