Skip to content

fm-merge-local: pin the reported done head before reading it - #319

Merged
trillium merged 1 commit into
mainfrom
fm/merge-local-pin-done
Nov 4, 2026
Merged

trillium merged 1 commit into
mainfrom
fm/merge-local-pin-done

Conversation

@trillium

@trillium trillium commented Nov 4, 2026

Copy link
Copy Markdown
Owner

What changes for a human

bin/fm-merge-local.sh <id> no longer refuses a local-only landing when the worker already appended its done: ready in branch fm/<id> line but nothing had yet run bin/fm-crew-state.sh <id>. Before reading the pinned head, it now records the head from the done line through the same fm_dod_accept_ship_done pin path that crew-state uses. With no valid done line the old refusal ("missing or malformed local done head ... report readiness before approval") is unchanged, as are the head-changed and branch-mismatch refusals.

Evidence

flowchart LR
  subgraph Before
    A1[done line appended] --> B1[fm-merge-local] --> C1[refused: no pinned head] --> D1[run fm-crew-state by hand] --> E1[merge ok]
  end
  subgraph After
    A2[done line appended] --> B2[fm-merge-local pins head from done line] --> E2[merge ok]
  end
Loading

Test transcript (tests/fm-merge-local.test.sh, new case "a reported done line lands without a prior crew-state observation"):

ok - ledger and teardown record the first done head without reacquiring or releasing caller locks
ok - a reported done line lands without a prior crew-state observation
FM_TEST_COMPLETE

@coderabbitai

coderabbitai Bot commented Nov 4, 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: 5705906f-430d-481a-9d61-54862457c093
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 8a239be into main Nov 4, 2026
25 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.

1 participant