Skip to content

fix(bin): sync upstream compact-adviser and captain-hold due fixes - #11

Merged
mlim1972 merged 3 commits into
mainfrom
sync-upstream-2026-09-18
Sep 19, 2026
Merged

mlim1972 merged 3 commits into
mainfrom
sync-upstream-2026-09-18

Conversation

@mlim1972

@mlim1972 mlim1972 commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Intent

Captain asked to bring firstmate's fork back in line: move the primary checkout back to main (it had drifted onto a feature branch, 'my-changes', with an unrelated botched merge-conflict artifact left in bin/fm-backend.sh) and sync main with the parent/upstream repo (kunchenguid/firstmate) so origin is at the same level as upstream. This branch is a pure fast-forward merge of upstream/main (2 commits already reviewed and merged upstream: disable compact adviser for spawned agents kunchenguid#4877, and create captain-hold rows when Beads requires due kunchenguid#4854) with no local changes on top - content is unchanged from upstream, same shape as the prior sync-upstream-2026-09-17 branch.

What Changed

  • bin/fm-spawn.sh now unconditionally exports COMPACT_ADVISER_DISABLE=1 into every crewmate, scout, and secondmate launch — via the LAUNCH command prefix, the pane pre-launch export, the cleared-environment (env -i) floor, and the LAUNCH_ENV_PREFIX allowlist path — so a spawned agent never activates the compact adviser, regardless of raw launches, remote secondmates, or relaunches.
  • bin/fm-captain-hold.sh hold now creates a missing captain row with BD_DUE_REQUIRED=false tasks-axi add --kind captain, waiving Beads' due.required policy instead of inventing a synthetic due date or registering a types.custom captain issue type.
  • bin/fm-test-run.sh routes the two new compact-adviser test files into the backend-dispatch test family; tests/fixtures.sh, tests/fm-captain-hold-lifecycle.test.sh, tests/fm-kimi-harness.test.sh, and tests/fm-spawn-dispatch-profile.test.sh gained corresponding coverage, and two new test files (fm-spawn-compact-adviser-disable.test.sh, fm-spawn-compact-adviser-disable-remote.test.sh) were added.
  • docs/configuration.md and docs/captain-hold-lifecycle.md document both behaviors: the compact-adviser kill switch's launch coverage and the captain-hold row creation's due-waiver semantics.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: The diff is an exact fast-forward of two already upstream-reviewed commits (kunchenguid#4877, kunchenguid#4854) with no local modifications, no leftover merge-conflict artifacts in bin/fm-backend.sh, and the changed shell logic (env-assignment ordering for COMPACT_ADVISER_DISABLE, BD_DUE_REQUIRED waiver) and new tests are correct and behavior-verifying rather than source-grepping.

Testing

Confirmed the branch is a clean fast-forward sync of the two named upstream commits with no leftover artifacts, and all executable diff-relevant tests passed; one new Beads-specific test self-skipped due to a missing Beads backend in this sandbox, an environment limitation rather than a code defect.

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.

  • git merge-base --is-ancestor to confirm fast-forward ancestry
  • git diff --stat over base..target to confirm diff scope matches the two named commits
  • grep for conflict markers in bin/fm-backend.sh
  • bash tests/fm-spawn-compact-adviser-disable.test.sh
  • bash tests/fm-spawn-compact-adviser-disable-remote.test.sh
  • bash tests/fm-spawn-dispatch-profile.test.sh
  • bash tests/fm-kimi-harness.test.sh
  • scoped run of the new captain-hold regression test
  • git status to confirm clean worktree
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

RooseveltAdvisors and others added 3 commits September 18, 2026 11:48
…id#4854)

Captain holds have no due semantics and are a hold kind, not a Beads issue
type. The create path now waives due.required and maps to native type task.

Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(bin): launch every spawned agent with the compact adviser disabled

Every crewmate, scout, and secondmate Firstmate launches now starts with
COMPACT_ADVISER_DISABLE=1, on a fresh spawn and on a relaunch alike, so an
unattended session never activates the compact adviser.
The value is unconditional: no configuration file gates it and there is no
override, unlike the trace carrier beside it.

Three carriers deliver it, because no single one covers every launch shape.
The pane shell receives an export beside GOTMPDIR, so the agent's own children
inherit it too.
The launch command carries an explicit assignment, prepended outermost so it
wins over any ambient value the pane already held.
The cleared launch environment sets it again at the `env -i` boundary and keeps
COMPACT_ADVISER_DISABLE in the fixed operational floor, which is what preserves
the switch when config/launch-env-allowlist empties the environment, and what
delivers it on a remote host that never had the value.

bin/fm-control.sh relaunch, the bootstrap secondmate relaunch, and the remote
secondmate transport all rebuild their launch through bin/fm-spawn.sh, so they
inherit the same floor.
The captain's own primary session is untouched.

The two new suites drive the real spawn and then execute the launch command the
pane actually received, with the harness replaced by a probe that prints its own
environment, rather than matching script text.
They cover ship and secondmate launches with the allowlist absent and enabled,
the pane export and its ordering, fm-control.sh relaunch, and the full parent to
remote-host chain.

* no-mistakes(review): Export compact-adviser disable across compound launches

* no-mistakes(document): Document spawned-agent compact-adviser environment guarantee
@mlim1972 mlim1972 changed the title chore: sync upstream (2 commits) fix(bin): sync upstream compact-adviser and captain-hold due fixes Sep 19, 2026
@mlim1972
mlim1972 merged commit 8ae4dbb into main Sep 19, 2026
19 of 20 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.

3 participants