Skip to content

fix(bearings): keep active children underway during captain holds - #3505

Merged
kunchenguid merged 4 commits into
mainfrom
fm/fm-bearings-underway-precedence-r1
Sep 2, 2026
Merged

kunchenguid merged 4 commits into
mainfrom
fm/fm-bearings-underway-precedence-r1

Conversation

@kunchenguid

@kunchenguid kunchenguid commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

Intent

Project every active child from every readable secondmate home ledger into Bearings in_flight/Underway independently of that home's bearings_state, so an open captain hold no longer drops live children from Underway. Keep the home-level row for decisions and gates: a home with an open captain hold and two active children must yield two Underway rows plus its decision in Captain's Call; a hold-only home still shows the decision and no Underway rows; a children-only home still shows those Underway rows. Update the bearings skill contract if it still describes the old home-state precedence that hid children. Keep the change bash-3.2-safe. Cover it with a behavioral regression through the real snapshot path that asserts observable board output, never implementation-source matching. The stock macOS Bash CI job must expect 45 Bearings tests (the new regression plus the prior 44). Behavior portable serial 1 already passed on the first CI run of this PR; a later cancelled serial-1 check was a provider cancellation, not a failed assertion against the old Underway precedence.

What Changed

  • Project each active secondmate child as its own Underway row regardless of the home-level Bearings state, while preserving home decisions and gates.
  • Carry repository metadata into in-flight rows and disclose active children omitted by snapshot bounds.
  • Update the Bearings contract and behavioral regression coverage, including the macOS Bash CI expectation of 45 tests.

Risk Assessment

✅ Low: The change is narrowly scoped, preserves bounded-output disclosures and repository metadata, updates the skill contract, and adds an end-to-end regression through the real snapshot path.

Testing

Executed the targeted Bearings suite under stock macOS Bash 3.2 and confirmed its expected 45 tests, then captured and validated real snapshot output showing a captain-held home simultaneously contributing its decision to Captain's Call and both active children to Underway; the worktree remained clean.

Evidence: Bearings snapshot: captain hold with two active children

Source: Bearings snapshot: captain hold with two active children

{
  "schema": "fm-bearings.v1",
  "home": "fm-bearings.aKKuiY/underway-hold-parent",
  "generated": "2026-07-11T18:00:00Z",
  "prs": "not_requested (run: /bearings include PRs)",
  "in_flight": [
    {
      "id": "busy-hold/child-a",
      "kind": "ship",
      "state": "working",
      "repo": "sample",
      "doing": "harness busy (claude-hook)"
    },
    {
      "id": "busy-hold/child-b",
      "kind": "ship",
      "state": "working",
      "repo": "sample",
      "doing": "harness busy (claude-hook)"
    }
  ],
  "secondmates": [
    {
      "id": "busy-hold",
      "state": "captain_decision",
      "doing": "Choose release route",
      "provenance": "structured-home",
      "freshness": "fresh",
      "age_seconds": 0,
      "contradiction": false,
      "reason": "-"
    }
  ],
  "secondmate_reconcile": [
    {
      "id": "busy-hold",
      "spawn_gen": null,
      "host": null,
      "kind": null,
      "ids": []
    }
  ],
  "decisions_open": [
    {
      "id": "busy-hold/release-call",
      "key": "release-call",
      "verb": "captain-hold",
      "summary": "Choose release route: pick route A or B",
      "owner": "busy-hold"
    }
  ],
  "landed": [],
  "gates": [],
  "reports": [],
  "recorded_prs": [],
  "omitted": [
    {
      "surface": "backlog item bodies",
      "reveal": "--fields bodies"
    },
    {
      "surface": "task paths",
      "reveal": "--fields paths"
    },
    {
      "surface": "watch/steer actions",
      "reveal": "--fields actions"
    },
    {
      "surface": "healthy endpoint detail",
      "reveal": "--fields endpoints"
    },
    {
      "surface": "full scout-report inventory",
      "reveal": "--all-reports"
    },
    {
      "surface": "superseded or prose-deferred queued items",
      "reveal": "--all-queued"
    },
    {
      "surface": "live PR discovery + checks",
      "reveal": "--include-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.

  • /bin/bash tests/fm-bearings-snapshot.test.sh with an exact assertion that 45 ok - results were emitted
  • Focused execution of test_active_children_project_independent_of_home_captain_hold through the real snapshot path under /bin/bash 3.2
  • jq validation of the captured fm-bearings.v1 output for two Underway children, one Captain's Call decision, and the home-level captain_decision state
  • git status --short after cleanup to confirm no transient worktree artifacts remained
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported repository-metadata and child-truncation issues are addressed in the current code.

Reviews (3): Last reviewed commit: "no-mistakes(ci): Updated the stock macOS..." | Re-trigger Greptile

Project each readable home's active children into Underway independently of the home-level captain-decision classification so a hold no longer hides live work.
… 45 Bearings tests, matching the newly added behavioral regression. Verified all 45 tests pass under /bin/bash, Bash syntax checks pass, and git diff validation is clean
@kunchenguid
kunchenguid force-pushed the fm/fm-bearings-underway-precedence-r1 branch from e715190 to 9e1f8bd Compare September 2, 2026 08:11
@kunchenguid kunchenguid changed the title fix(bearings): keep active children underway beside a captain hold fix(bearings): keep active children underway during captain holds Sep 2, 2026
@kunchenguid
kunchenguid merged commit 8988af2 into main Sep 2, 2026
15 of 16 checks passed
@kunchenguid
kunchenguid deleted the fm/fm-bearings-underway-precedence-r1 branch September 2, 2026 08:46
Marcos-Leyva added a commit to Marcos-Leyva/firstmate that referenced this pull request Sep 3, 2026