Repository navigation
feat(bin): support custom base and crew branches - #4071
lakshyads05 wants to merge 77 commits into
Conversation
Replace the stale named-base series with a fresh-upstream path that preserves origin-less default skip, resolves or refuses a requested base when origin is absent, and starts no-mistakes with axi --base-branch instead of retarget-after-green.
Refuse unlandable local-only origin-only bases, honor recorded compare/return bases, and parse only the last generated Definition of done so named-base landing cannot drift from the worker contract.
Give the Base branch contract line a spawn reader instead of deleting it, and close the remaining named-base promote, teardown, and snapshot gaps that can drop or mis-deliver work.
…n, and snapshot paths
… explicit ` - local <branch>` delimiter, with a regression test. Relevant suites, syntax, coverage, and documentation checks pass; lint could not run because ShellCheck is unavailable
…ardown now records an explicit `local-landing:<branch>` marker; snapshot parsing only treats that marker as a landing artifact while still rendering `local <branch>`, and pending-close replay validates/replays it. Added behavioral regressions for the exact title collision and marker recovery. Passing: snapshot-view, transition-library, teardown, bash syntax, and diff checks. The broad backlog atomicity suite remains externally blocked by its known tasks-axi fixture-directory failure; ShellCheck is unavailable in this environment
|
@kunchenguid looking forward to having this as part of next release. |
Preserve named landing branches and bases while carrying the upstream local merge safety gates.
|
@kunchenguid please approve workflows |
|
Speaking as Kun's firstmate: stamped waiting-author (attestation rebind required). HEAD Whole thread re-read. Author body has no Fixes/Closes — does not claim to close a ready-for-pr issue. contract-class: opt-in (own inspection). VISION: One captain/interface — aligns (scaffold flags, not new always-on UI). Authority — aligns (explicit flags). Scripts/mechanics — aligns. Restart — aligns (meta persistence). Delegation spine — aligns (brief↔spawn contract refuse on mismatch). Vendor-orthogonal — aligns. Scope — aligns (spawn/delivery command layer). Closing: welcome opt-in compose; auto-mergeable only when otherwise ready. CI: tip fork workflows were Author: re-run |
…l-only relaunch expectation, recorded the fixture base branch, and changed the macOS Bearings count from 59 to 60. Bearings and the targeted public-followup test pass. Attestation/no-mistakes failures remain external and were not pushed or rebound per phase constraints
|
@kunchenguid please approve workflows |
|
@kunchenguid please approve workflows |
… focused tests pass
…n; spawn tests pass
|
@kunchenguid please approve the workflows |
What Changed
--base-branchand--branch-namecontracts to brief and spawn flows, including validation, pooled-worktree freshening, and metadata persistence through relaunch and promotion.Risk Assessment
Testing
Drove the real product through isolated live tmux spawn and collision scenarios, then exercised focused contract, review, merge, transition, snapshot, and delivery paths. No linters, formatters, or full-suite checks were run. Teardown backlog coverage is blocked only by installed tasks-axi 0.2.5.
tests/fm-brief.test.shandtests/fm-task-delivery.test.shtests/fm-review-diff.test.shandtests/fm-merge-local.test.shEvidence: Live tmux spawn
Source: Live tmux spawn
Evidence: Live branch collision
Source: Live branch collision
Evidence: Focused product tests
Source: Focused product tests
Evidence: Teardown environment gate
Source: Teardown environment gate
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
⏭️ **Rebase** - skipped
.github/workflows/ci.yml- branch carries 45 commit(s) that exist on your local main branch but were never pushed to origin/main; these may be unintended bundled work (proposed PR changes 31 file(s)):local-landing:<branch>marker; snapshot parsing only treats that marker as a landing artifact while still renderinglocal <branch>, and pending-close replay validates/replays it. Added behavioral regressions for the exact title collision and marker recovery. Passing: snapshot-view, transition-library, teardown, bash syntax, and diff checks. The broad backlog atomicity suite remains externally blocked by its known tasks-axi fixture-directory failure; ShellCheck is unavailable in this environment- local <branch>delimiter, with a regression test. Relevant suites, syntax, coverage, and documentation checks pass; lint could not run because ShellCheck is unavailableConfirm these commits belong in this PR before approving, or manually separate the intended work onto origin/main before gating.
bin/fm-spawn.sh:2889- The collision loop skips every existingkind=shiprecord because it continues unless the record iskind=secondmate. Task A's ship metadata is published before its worker runsgit checkout -b; task B can request the same custom branch while no local or remote ref exists, bypass task A, allocate another endpoint, and race with task A. Check existing ship records for the project before allocation.🔧 No changes applied.
1 error still open:
bin/fm-spawn.sh:2889- The collision scan skips every existingkind=shiprecord because it continues unless the record iskind=secondmate. If task A has publishedcrew_branch=feature/sharedbefore its worker creates the ref, task B can pass local and remote ref checks, allocate another endpoint, and race task A on the same branch. Check existing ship records for the project before allocation.🔧 No changes applied.
1 warning still open:
bin/fm-teardown.sh:1252- Local-only tasks without a recorded base now depend onfm_remote_default_branch, which performs an unboundedls-remote. With an origin configured but temporarily unreachable,fm-merge-local.shrefuses to land andfm-teardown.shcannot prove completion or close the backlog, despite local-only delivery requiring no remote. Use a local/default resolver or bounded remote fallback for local-only paths; keep remote probing fail-closed only where remote-default safety is required.🔧 Fix applied.
1 error still open:
bin/fm-default-branch-lib.sh:38-fm_local_only_default_branchprefers the remote default name even when that branch is not present locally. For a local-only task with origin defaultdevelopbut no localrefs/heads/develop, spawn freshens the worker fromorigin/develop, thenfm-merge-local.shselectsdevelopand refuses because the landing ref is missing; teardown follows the same failing path. Resolve local-only delivery against an existing local landing branch, or persist and materialize the resolved target consistently.🔧 Fix applied.
5 issues (2 errors, 3 warnings) still open:
bin/fm-spawn.sh:2889- The collision scan still skips every existingkind=shiprecord, so a second task can reuse a branch already assigned to a live ship before either task has created a local or remote ref. Check all existing ship records for the project before allocation; the previously selected fix is still absent.bin/fm-spawn.sh:3175- A missing named base is rejected infreshen_spawn_worktree_baseaftertreehouse get, worktree adoption, and slot claiming have already happened. The generic abort path releases the slot claim but does not close the allocated pane, leaving an endpoint without metadata. Validate the named base before endpoint allocation or close the generic endpoint on this failure path.bin/fm-fleet-snapshot.sh:467- The backlog parser now recognizes legacylocal mainonly when hyphen-delimited, but the previous parser also accepted rows such as... context local main. Existing completed local-only rows in that form now loselocal_noteand retain the marker in their title. Preserve the prior whitespace-delimited legacy form alongsidelocal-landing:.bin/fm-ff-lib.sh:53-fm_local_default_branchfalls back to localmain/masterwhenorigin/HEADnames a different branch that has no local ref.fm-ff-lib.shnow uses this helper forprimary_head_commit, so a repository with remote defaultdevelop, no localdevelop, and a stale localmainsilently syncs secondmates tomaininstead of refusing or using the authoritative default. Keep local-landing fallback separate from secondmate default synchronization.bin/fm-spawn.sh:3161- The new named-base and branch-collision paths callgit ls-remotedirectly without the shared timeout wrapper. A black-holed or stalled origin can block spawn indefinitely; the named-base probe runs after the pooled endpoint is allocated, compounding the leak above. Wrap these probes withfm_run_timedand preserve fail-closed handling for timeout status.✅ **Test** - passed
✅ No issues found.
tests/fm-brief.test.shandtests/fm-task-delivery.test.shtests/fm-review-diff.test.shandtests/fm-merge-local.test.shbash tests/fm-brief.test.shbash tests/fm-merge-local.test.shbash tests/fm-review-diff.test.shbash tests/fm-backlog-transition-lib.test.shbash tests/fm-fleet-snapshot-view.test.shbash tests/fm-task-delivery.test.shTargetedfm-spawn.shbase, collision, default-resolution, and local-only scenariosRealfm-brief.shplusfm-spawn.shin a private tmux sessionReal second spawn collision attempt in the same private tmux sessiontasks-axi --versionbash tests/fm-teardown.test.shuntil its incompatible real-backlog fixture gate✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.