Skip to content

Rebuild main as upstream/main + the re-implemented fork patch set (Option A) - #22

Merged
rega10 merged 0 commit into
mainfrom
fm/firstmate-fork-reconciliation-option-a-v2
Sep 5, 2026
Merged

rega10 merged 0 commit into
mainfrom
fm/firstmate-fork-reconciliation-option-a-v2

Conversation

@rega10

@rega10 rega10 commented Sep 5, 2026

Copy link
Copy Markdown
Owner

What this is

This rebuilds the fork's main as current upstream/main plus a hand-re-implemented fork patch set (the captain-approved Option A). The branch is built from upstream/main and carries every still-needed piece of fork-original work as fresh, reviewed commits - one unit per commit, each naming the fork PR/commit it replaces.

  • Base upstream commit: 86ff1bf5e67bdb3eef82b1abb9f5838b8558f7c8 (this branch is a strict descendant of it).
  • upstream/main has since advanced to e075c964dfa5dad072199c6f7b4f2230f6f9bf37; this branch is not rebased onto it (that is a future, separate sync).
  • Diff size vs the base: 71 files changed, +8823 / -280. None of the ~177-file straight-merge conflict is inherited - the patch set never touches the files where fork and upstream both independently rewrote the same code.

⚠️ Merging this PR normally is impossible

origin/main and upstream/main diverged long ago (291 upstream vs 19 fork commits at the reconciliation baseline), so GitHub cannot build a merge commit and no fast-forward is possible. This PR is a reviewable presentation of the reconstructed history; landing it requires the captain's separate main-replacement sign-off (force-updating origin/main, or switching the default branch), which is the destructive, irreversible step AGENTS.md reserves for explicit captain authority. Do not attempt a normal merge.

Unit inventory

Re-implemented by hand against current upstream (not mechanical cherry-picks; upstream rewrote several of these files, so each was relocated/reworked):

Unit Replaces Notes
fix(cmux): list-panes-failure false-positive guard fork 5bb9217 + behavioral regression
fix(review-diff): resolve compare branch from worktree HEAD fork PR #3 + matrix case
fix(herdr): in-process events-schema match (broken-pipe) fork PR #6 core GitLab-MR bit dropped (already upstream)
fix(spawn): drop inherited Claude session identity fork PR #8 integrated into upstream's identity-sanitize wrapper
feat(lock): hosted Codex session-lock reclaim fork PR #1
feat(herdr): guarded legacy endpoint-binding repair fork PR #10 fm-landed-lib.sh factored fresh from upstream's current predicate (report decision 4)
test: gate tasks-axi handoff suites on fm_tasks_axi_compatible fork 00adcb9 (group G)
feat(bin): Bitwarden migration ceremony tooling fork PR #13
docs: clarify Bitwarden rotation boundary fork PR #17
feat: opt-in Automic Vault authentication for Claude workers fork PR #15 large; hand-integrated with spawn/herdr; a follow-up review round made the credential-scrubbing --settings the sole authoritative one and strengthened its regression test
docs: Automic Vault development-only secret-store boundary fork PR #19
feat(bearings): project lifecycle posture registry (core) fork PR #18 (core) registry + projects[] fleet-snapshot surface only
feat(bearings): versioned --contract for the snapshot vocabulary fork PR #20 contract reconciled to upstream's vocabulary (added in_flight.repo, secondmate_reconcile)

Dropped as superseded by upstream: fork PR #16 (keep parked tasks off the wedge escalation ladder) - upstream's watcher independently grew the same declared-pause/captain-held long-cadence handling (8 watcher + 7 daemon references, 15 tests), so the accepted behavioral intent already holds upstream. Also dropped: the fork's source-byte-asserting tests (replaced with behavioral tests) and fork changes already present/superseded upstream (e.g. the public-followup date-stability fix).

Deferred to a follow-up (by captain decision): the #18 Bearings display integration - posture-aware Captain's Call / Charted Next gating - because upstream independently rewrote the Bearings captain-hold/gate model (the fork's deferred_marker field was replaced by hold_bucket/live_captain_call). It must be rebuilt against upstream's current hold_bucket/live_captain_call model rather than ported from the fork.

Test evidence

The no-mistakes pipeline's own review, test, document, and lint gates passed on this content earlier today (its CI step cannot run because the PR is unmergeable; GitHub runs the workflow lanes only on main after the main-replacement step).

Full local suite on the pushed head: the no-mistakes pipeline's full test step passed on this content (its review, document, and lint gates passed too). Locally on the pushed head: every changed unit's behavioral tests pass, the test-coverage guard confirms the complete 185-test partition (185 total: 24 parallel, 147 serial, 14 real-herdr-gated), and bin/fm-lint.sh and bin/fm-doc-audience-check.sh are clean. An exhaustive serial re-run of the portable suite (171 tests, real-herdr-gated excluded as it needs a live harness) is additionally in progress with 0 failures so far (14/171 completed at capture time).

Landing and re-tracking the running install (report section 4)

After the captain approves the main-replacement and origin/main is rebuilt as this branch, the running install's local main (which currently tracks upstream/main) should be repointed and fast-forwarded. This is a live firstmate home, so only a plain fast-forward is permitted - never a reset or force:

git fetch origin
# local main must first be a strict ancestor of the new origin/main, which it is
# by construction (the new origin/main is upstream/main + this patch set):
git merge --ff-only origin/main
# or, if the local branch must be recreated cleanly to track origin/main:
git switch -c main --track origin/main
# repoint local main to track origin/main instead of upstream/main:
git branch main --set-upstream-to=origin/main

After that, bin/fm-update.sh behaves as designed (it fast-forwards from origin), and every subsequent upstream advance flows through origin/main via ordinary PRs instead of a giant squash-merge.

🤖 Generated with Claude Code

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