Repository navigation
feat: merge upstream firstmate main (update-branch merges, inherit recovery, procevent and record-export fixes) - #358
Merged
Conversation
…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
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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
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
bin/fm-pr-merge.sh,docs/pi-supervision-branch.md, andtests/fm-test-run.test.sh.fm-pr-merge.shgains a GitHub-only--update-branchflag. 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 RESTupdate-branchendpoint, 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.fm-remote-inherit.shadds a locked, validatedgenerationquery.fm_remote_inherit_generation_nextaccepts a committed remote floor, so remote inheritance recovers after the sender loses its counter.fm-procevent.shrefreshes the owner lease before detached runner launches.fm-record-export.pynow treats emptyFM_*override variables as unset and skips hidden state files.tests/fm-remote-inherit-generation.test.shregistered infm-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.
bash tests/fm-pr-merge.test.shagainst a stubbed gh forge (137 ok). A truly live merge would merge real GitHub pul…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)
Evidence: fm-test-run selection on merge diff
Source: fm-test-run selection on merge diff
Evidence: Live read-only fm-pr-ready-check against real PRs
Source: Live read-only fm-pr-ready-check against real PRs
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.
bash tests/fm-pr-merge.test.shagainst a stubbed gh forge (137 ok). A truly live merge would merge real GitHub pul…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.shbin/fm-test-run.sh --list --changed --base 3f7bdf31and--list --all --affected --base 3f7bdf31on the merge diffbin/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 inbin/fm-pr-github-ready-lib.sh. Ported upstream's check-settling and refusal-tracking changes into that library, keptgithub_update_behind_branchinfm-pr-merge.sh, and took upstream's--update-branchheader, 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 naminglive-workers.tests/fm-test-run.test.sh: kept fork. Kept the fork'sTESTS=(array and added upstream's newtest_changed_remote_inheritance_selects_generation_contractto 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-workerswording 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.shnow refuses a merge of a green PR that is behind its base unless--update-branchis passed, in which case it updates the branch first. The away-mode doc table indocs/pi-supervision-branch.mdreads 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