Skip to content

fix(bin): stop reading a passed no-mistakes run as a merged or closed PR - #4156

Closed
Mauryanx wants to merge 3 commits into
kunchenguid:mainfrom
Mauryanx:fm/crew-state-false-merged-label
Closed

Mauryanx wants to merge 3 commits into
kunchenguid:mainfrom
Mauryanx:fm/crew-state-false-merged-label

Conversation

@Mauryanx

@Mauryanx Mauryanx commented Sep 10, 2026 •

Copy link
Copy Markdown

A concluded validation run now reports run completed and its PR URL. Merge or closure claims require forge evidence; run completion alone supplies none.

Delivery verification: inspected published commit 1d22de1d574ee367c6296e6758a7e6445fed8730 and confirmed the completion wording, shared PR URL helper, strengthened regression assertions, and removal of the redundant test function. Local review, regression tests, documentation checks, and lint passed. CI was skipped because fork workflows await upstream maintainer approval. CI has NOT run against tip 1d22de1d574ee367c6296e6758a7e6445fed8730, so CI remains unverified. Both workflows reported action_required. The pipeline completed only after the explicitly authorized skip; its terminal outcome does not establish CI success or PR merge. Skipping CI ended this run and its CI/merge monitor.

Out of scope and separately filed: the CI-readiness reader treats no CI checks reported - still monitoring until merged or closed as green. This PR does not change that separate readiness rule.

Intent

firstmate’s current-state reader rendered a concluded validation run as a merged or closed pull request while the pull request was open and the default branch untouched, which is a claim about work having landed that no forge was ever asked to confirm. This makes a merge or closure claim come only from the forge saying so, and renders a concluded run as exactly that when the forge has not been consulted, with regression coverage pinning it so the claim cannot silently return.

What Changed

  • bin/fm-crew-state.sh now renders a terminal passed run as run completed plus the run's PR URL instead of claiming PR merged/closed, so the merge/closure claim is never synthesized from run completion alone - only forge evidence can make it.
  • Factored the PR-URL suffix into a shared nm_append_run_pr_url helper, reused by both the passed branch and the existing held-for-merge reclassification, and corrected the nm_ci_checks_state comment that asserted outcome=passed implies a merged PR (a run can pass with ci skipped and the PR still open).
  • Extended the terminal_passed test to pin the new detail string, assert the PR URL is surfaced, and assert the output contains neither "merged" nor "closed"; documented the rule in docs/architecture.md.

Risk Assessment

✅ Low: A tightly scoped, single-site change to one rendered detail string plus a two-call-site helper extraction: it removes an unproven merge/closure claim at the reader's only owner of that mapping, makes no wrong claim on any traced state, is invisible to every downstream consumer (all of which parse state/source or read PR URLs from the status log rather than this line), and is pinned by assertions that fail against the pre-fix string.

Testing

I stood the reader up the way the captain runs it - real throwaway git worktrees, real state/<id>.meta, and a no-mistakes CLI on PATH serving live axi status run records - and drove every terminal-outcome branch this change touches, then replayed the identical driver against the base commit to reproduce the defect. Base reported run passed: PR merged/closed for a run whose PR was still open; head reports run completed: https://github.com/o/r/pull/1. Empty and missing pr fields both fall back to a bare run completed with no dangling separator, the held-green sibling path still appends its URL after the extraction into nm_append_run_pr_url, checks-passed is unchanged, and a stale status-log event asserting "merged and closed" does not leak into the line. The composed fm-fleet-snapshot.sh --json the captain actually reads shows the same before/after and splits the appended URL cleanly into detail. The added regression assertions, run unchanged against the pre-fix tree, fail with not ok - passed outcome reports only run completion, and the full targeted suite passes on head. No screenshot or rendered-HTML artifact applies: this change has no UI surface - its end-user output is a single terminal status line and a JSON field, both captured verbatim in the transcripts.

  • Live validation: ✅ go - 8 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Captain reads a crew whose validation run concluded while its PR is still open: the line reports run completion plus the PR URL, never a merge or closure ✅ pass live bin/fm-crew-state.sh feat-open -> state: done · source: run-step · run completed: https://github.com/o/r/pull/1; same command on base b1ad702 -> run passed: PR merged/closed (crew-state-before-a…
Concluded run that produced no PR URL degrades gracefully instead of emitting a dangling separator ✅ pass live bin/fm-crew-state.sh feat-nopr with pr: "" -> state: done · source: run-step · run completed (crew-state-before-after.txt, S2)
Concluded run whose record omits the pr field entirely still reads cleanly ✅ pass live bin/fm-crew-state.sh feat-noprfield with no pr: key at all -> state: done · source: run-step · run completed (crew-state-before-after.txt, S2b)
Adversarial: a stale status-log event claiming the PR merged and closed cannot reintroduce the forge claim ✅ pass live status log seeded with done: PR https://github.com/o/r/pull/3 merged and closed + concluded run -> state: done · source: run-step · run completed: https://github.com/o/r/pull/3 (crew-state-before-…
Held-for-merge path still surfaces its PR URL after the URL append was extracted into a shared helper ✅ pass live terminal failed run, only ci step failed, ci log reads checks green -> state: done · source: run-step · checks green: PR held for merge (ci monitor ended): https://github.com/o/r/pull/7, identical o…
checks-passed outcome is unchanged by this fix ✅ pass live bin/fm-crew-state.sh feat-cp with outcome: checks-passed -> checks green: PR ready for review on both base and head (crew-state-before-after.txt, S4)
The composed captain-facing fleet snapshot carries the honest detail and parses the appended URL into its own field ✅ pass live bin/fm-fleet-snapshot.sh --json -> current_state.detail: "run completed: https://github.com/o/r/pull/1" with state/source split intact; base emitted "run passed: PR merged/closed" (fleet-snapsho…
The regression coverage genuinely pins the defect: it fails against the pre-fix product and passes against the fix ✅ pass live head's tests/fm-crew-state.test.sh run unchanged over a base-commit tree -> not ok - passed outcome reports only run completion; on head -> ok - terminal passed run is authoritative (regression-…
Evidence: fm-crew-state.sh CLI transcript, base vs head, all terminal-outcome scenarios

Source: fm-crew-state.sh CLI transcript, base vs head, all terminal-outcome scenarios

fm-crew-state.sh - captain-facing current-state line
Real bin/fm-crew-state.sh driven over real git worktrees + real state/<id>.meta,
with a no-mistakes CLI on PATH serving live axi status run records.

#################### BEFORE (base b1ad702) ####################

========== S1  concluded validation run, PR #1 still OPEN, default branch untouched ==========
$ bin/fm-crew-state.sh feat-open
state: done · source: run-step · run passed: PR merged/closed

========== S2  concluded run carrying no PR URL (pr: empty) ==========
$ bin/fm-crew-state.sh feat-nopr
state: done · source: run-step · run passed: PR merged/closed

========== S2b concluded run whose record has no pr field at all ==========
$ bin/fm-crew-state.sh feat-noprfield
state: done · source: run-step · run passed: PR merged/closed

========== S3  terminal failed run, only ci monitor failed, checks green (held-for-merge) ==========
$ bin/fm-crew-state.sh feat-held
state: done · source: run-step · checks green: PR held for merge (ci monitor ended): https://github.com/o/r/pull/7

========== S4  outcome=checks-passed (untouched sibling branch) ==========
$ bin/fm-crew-state.sh feat-cp
state: done · source: run-step · checks green: PR ready for review

========== S5  adversarial: run passed with a branch/PR whose URL is long; assert no forge claim words ==========
$ bin/fm-crew-state.sh feat-adv
state: done · source: run-step · run passed: PR merged/closed

fixture: /tmp/nm-crewstate.kLU6aC

========== S6  adversarial: concluded run + stale status-log event claiming 'PR merged' ==========
$ bin/fm-crew-state.sh feat-stalelog
state: done · source: run-step · run passed: PR merged/closed

#################### AFTER  (head bed96c5) ####################

========== S1  concluded validation run, PR #1 still OPEN, default branch untouched ==========
$ bin/fm-crew-state.sh feat-open
state: done · source: run-step · run completed: https://github.com/o/r/pull/1

========== S2  concluded run carrying no PR URL (pr: empty) ==========
$ bin/fm-crew-state.sh feat-nopr
state: done · source: run-step · run completed

========== S2b concluded run whose record has no pr field at all ==========
$ bin/fm-crew-state.sh feat-noprfield
state: done · source: run-step · run completed

========== S3  terminal failed run, only ci monitor failed, checks green (held-for-merge) ==========
$ bin/fm-crew-state.sh feat-held
state: done · source: run-step · checks green: PR held for merge (ci monitor ended): https://github.com/o/r/pull/7

========== S4  outcome=checks-passed (untouched sibling branch) ==========
$ bin/fm-crew-state.sh feat-cp
state: done · source: run-step · checks green: PR ready for review

========== S5  adversarial: run passed with a branch/PR whose URL is long; assert no forge claim words ==========
$ bin/fm-crew-state.sh feat-adv
state: done · source: run-step · run completed: https://github.com/acme/widgets/pull/4242

fixture: /tmp/nm-crewstate.QlysCw

========== S6  adversarial: concluded run + stale status-log event claiming 'PR merged' ==========
$ bin/fm-crew-state.sh feat-stalelog
state: done · source: run-step · run completed: https://github.com/o/r/pull/3
Evidence: Captain-facing fleet snapshot JSON, base vs head

Source: Captain-facing fleet snapshot JSON, base vs head

bin/fm-fleet-snapshot.sh --json - the composed captain-facing fleet snapshot
One crew whose no-mistakes run concluded while its PR #1 is still OPEN.

#################### BEFORE (base b1ad702) ####################
$ FM_HOME=<fixture> bin/fm-fleet-snapshot.sh --json | jq '.tasks[] | {id, current_state}'
{
  "id": "feat-open",
  "current_state": {
    "state": "done",
    "source": "run-step",
    "detail": "run passed: PR merged/closed",
    "raw": "state: done · source: run-step · run passed: PR merged/closed",
    "observed_at": "2026-09-10T14:04:57Z",
    "freshness": "fresh"
  }
}

#################### AFTER  (head bed96c5) ####################
$ FM_HOME=<fixture> bin/fm-fleet-snapshot.sh --json | jq '.tasks[] | {id, current_state}'
{
  "id": "feat-open",
  "current_state": {
    "state": "done",
    "source": "run-step",
    "detail": "run completed: https://github.com/o/r/pull/1",
    "raw": "state: done · source: run-step · run completed: https://github.com/o/r/pull/1",
    "observed_at": "2026-09-10T14:04:53Z",
    "freshness": "fresh"
  }
}
Evidence: Regression pin fails before the fix, passes after

Source: Regression pin fails before the fix, passes after

not ok - passed outcome reports only run completion (missing: 'run completed') state: done · source: run-step · run passed: PR merged/closed ...and against the fixed product (head bed96c5): ok - terminal passed run is authoritative

Regression pin: the new assertions in tests/fm-crew-state.test.sh
run UNCHANGED against the PRE-FIX product (base b1ad702):

not ok - passed outcome reports only run completion (missing: 'run completed')
state: done · source: run-step · run passed: PR merged/closed

...and against the fixed product (head bed96c5):

ok - terminal passed run is authoritative
Evidence: Live driver script for the crew-state scenarios (reproducible)

Source: Live driver script for the crew-state scenarios (reproducible)

#!/usr/bin/env bash
# Live driver: stand up a real firstmate crew fixture (real git worktree, real
# state/<id>.meta, real fake-CLI on PATH exactly as a live crew would have) and
# run the REAL bin/fm-crew-state.sh against it, the way the captain does.
set -u

BIN=${BIN:?set BIN to the bin/ dir under test}
ROOTDIR=$(mktemp -d /tmp/nm-crewstate.XXXXXX)
export GIT_CONFIG_GLOBAL=$ROOTDIR/gitconfig
git config --file "$ROOTDIR/gitconfig" user.name fmtest
git config --file "$ROOTDIR/gitconfig" user.email fmtest@example.invalid
git config --file "$ROOTDIR/gitconfig" init.defaultBranch main

fakebin=$ROOTDIR/fakebin; mkdir -p "$fakebin"
cat > "$fakebin/no-mistakes" <<'SH'
#!/usr/bin/env bash
set -u
case "${1:-}" in
  axi) shift
    case "${1:-}" in
      status) shift
        if [ "${1:-}" = --run ]; then printf '%s\n' "${FM_FAKE_AXI_STATUS_RUN:-}"
        else printf '%s\n' "${FM_FAKE_AXI_STATUS:-}"; fi ;;
      logs) printf '%s\n' "${FM_FAKE_CI_LOGS:-}" ;;
    esac ;;
  runs) printf '%s\n' "${FM_FAKE_RUNS_LIST:-}" ;;
  daemon) printf '%s\n' 'daemon running (pid 4242)'; exit 0 ;;
esac
exit 0
SH
cat > "$fakebin/tmux" <<'SH'
#!/usr/bin/env bash
set -u
case "${1:-}" in
  display-message) printf '%%1\n' ;;
  capture-pane) printf 'all quiet\n> \n' ;;
esac
exit 0
SH
chmod +x "$fakebin/no-mistakes" "$fakebin/tmux"

# One crew: real repo checked out on its branch, meta pointing at it.
mk_crew() {  # <id> <branch>
  local id=$1 br=$2 wt
  wt="$ROOTDIR/wt-$id"
  mkdir -p "$wt" "$ROOTDIR/state"
  git -C "$wt" init -q
  git -C "$wt" commit -q --allow-empty -m init
  git -C "$wt" checkout -q -b "$br"
  printf 'window=fm:fm-%s\nworktree=%s\nkind=ship\n' "$id" "$wt" > "$ROOTDIR/state/$id.meta"
  git -C "$wt" rev-parse HEAD
}

read_state() {  # <id>
  PATH="$fakebin:$PATH" FM_STATE_OVERRIDE="$ROOTDIR/state" "$BIN/fm-crew-state.sh" "$1"
}

banner() { printf '\n========== %s ==========\n' "$*"; }

# ---------- S1: concluded run, PR still OPEN on the forge ----------
banner "S1  concluded validation run, PR #1 still OPEN, default branch untouched"
HEAD1=$(mk_crew feat-open fm/feat-open)
export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-open
  status: completed
  head: \"$HEAD1\"
  pr: \"https://github.com/o/r/pull/1\"
  findings: none
outcome: passed"
export FM_FAKE_AXI_STATUS_RUN="" FM_FAKE_RUNS_LIST="" FM_FAKE_CI_LOGS=""
echo "\$ bin/fm-crew-state.sh feat-open"
read_state feat-open

# ---------- S2: concluded run that produced NO PR at all ----------
banner "S2  concluded run carrying no PR URL (pr: empty)"
HEAD2=$(mk_crew feat-nopr fm/feat-nopr)
export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-nopr
  status: completed
  head: \"$HEAD2\"
  pr: \"\"
  findings: none
outcome: passed"
echo "\$ bin/fm-crew-state.sh feat-nopr"
read_state feat-nopr

# ---------- S2b: concluded run whose record omits the pr field entirely ----------
banner "S2b concluded run whose record has no pr field at all"
HEAD2B=$(mk_crew feat-noprfield fm/feat-noprfield)
export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-noprfield
  status: completed
  head: \"$HEAD2B\"
  findings: none
outcome: passed"
echo "\$ bin/fm-crew-state.sh feat-noprfield"
read_state feat-noprfield

# ---------- S3: sibling held-green path still surfaces its PR ----------
banner "S3  terminal failed run, only ci monitor failed, checks green (held-for-merge)"
HEAD3=$(mk_crew feat-held fm/feat-held)
export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-held
  status: completed
  head: \"$HEAD3\"
  pr: \"https://github.com/o/r/pull/7\"
  findings: none
  steps[6]{step,status,findings,duration_ms}:
    intent,completed,0,0
    review,completed,0,0
    test,completed,0,0
    lint,completed,0,0
    push,completed,0,0
    ci,failed,0,0
outcome: failed"
export FM_FAKE_CI_LOGS="all CI checks passed - still monitoring until merged or closed"
echo "\$ bin/fm-crew-state.sh feat-held"
read_state feat-held
export FM_FAKE_CI_LOGS=""

# ---------- S4: checks-passed outcome unchanged ----------
banner "S4  outcome=checks-passed (untouched sibling branch)"
HEAD4=$(mk_crew feat-cp fm/feat-cp)
export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-cp
  status: completed
  head: \"$HEAD4\"
  pr: \"https://github.com/o/r/pull/9\"
  findings: none
outcome: checks-passed"
echo "\$ bin/fm-crew-state.sh feat-cp"
read_state feat-cp

# ---------- S5: adversarial - a PR URL that itself contains 'merged'/'closed' words? ----------
banner "S5  adversarial: run passed with a branch/PR whose URL is long; assert no forge claim words"
HEAD5=$(mk_crew feat-adv fm/feat-adv)
export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-adv
  status: completed
  head: \"$HEAD5\"
  pr: \"https://github.com/acme/widgets/pull/4242\"
  findings: none
outcome: passed"
echo "\$ bin/fm-crew-state.sh feat-adv"
read_state feat-adv

printf '\nfixture: %s\n' "$ROOTDIR"

# ---------- S6: adversarial - stale status-log event claiming the PR merged ----------
banner "S6  adversarial: concluded run + stale status-log event claiming 'PR merged'"
HEAD6=$(mk_crew feat-stalelog fm/feat-stalelog)
printf 'done: PR https://github.com/o/r/pull/3 merged and closed\n' > "$ROOTDIR/state/feat-stalelog.status"
export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-stalelog
  status: completed
  head: \"$HEAD6\"
  pr: \"https://github.com/o/r/pull/3\"
  findings: none
outcome: passed"
echo "\$ bin/fm-crew-state.sh feat-stalelog"
read_state feat-stalelog
Evidence: Live driver script for the fleet-snapshot scenario (reproducible)

Source: Live driver script for the fleet-snapshot scenario (reproducible)

#!/usr/bin/env bash
# Live driver: the captain-facing fleet snapshot composition. Runs the REAL
# bin/fm-fleet-snapshot.sh over a real fixture home holding one crew whose
# no-mistakes run concluded while its PR is still open on the forge.
set -u
BIN=${BIN:?}
HOME_DIR=$(mktemp -d /tmp/nm-snapshot.XXXXXX)
export GIT_CONFIG_GLOBAL=$HOME_DIR/gitconfig
git config --file "$GIT_CONFIG_GLOBAL" user.name fmtest
git config --file "$GIT_CONFIG_GLOBAL" user.email fmtest@example.invalid
git config --file "$GIT_CONFIG_GLOBAL" init.defaultBranch main
mkdir -p "$HOME_DIR"/{state,data,config,projects}

fakebin=$HOME_DIR/fakebin; mkdir -p "$fakebin"
cat > "$fakebin/no-mistakes" <<'SH'
#!/usr/bin/env bash
set -u
case "${1:-}" in
  axi) shift
    case "${1:-}" in
      status) shift
        if [ "${1:-}" = --run ]; then printf '%s\n' "${FM_FAKE_AXI_STATUS_RUN:-}"
        else printf '%s\n' "${FM_FAKE_AXI_STATUS:-}"; fi ;;
      logs) printf '%s\n' "${FM_FAKE_CI_LOGS:-}" ;;
    esac ;;
  runs) printf '%s\n' "${FM_FAKE_RUNS_LIST:-}" ;;
  daemon) printf 'daemon running (pid 4242)\n'; exit 0 ;;
esac
exit 0
SH
cat > "$fakebin/tmux" <<'SH'
#!/usr/bin/env bash
set -u
case "${1:-}" in
  display-message) printf '%%1\n' ;;
  capture-pane) printf 'all quiet\n> \n' ;;
esac
exit 0
SH
chmod +x "$fakebin/no-mistakes" "$fakebin/tmux"

wt=$HOME_DIR/wt-feat-open
mkdir -p "$wt"
git -C "$wt" init -q
git -C "$wt" commit -q --allow-empty -m init
git -C "$wt" checkout -q -b fm/feat-open
head=$(git -C "$wt" rev-parse HEAD)
printf 'window=fm:fm-feat-open\nworktree=%s\nkind=ship\n' "$wt" > "$HOME_DIR/state/feat-open.meta"

cat > "$HOME_DIR/data/backlog.md" <<'MD'
# Backlog

## In flight
- [ ] feat-open - ship the widget

## Queued

## Done
MD

export FM_FAKE_AXI_STATUS="run:
  id: \"01RUN\"
  branch: fm/feat-open
  status: completed
  head: \"$head\"
  pr: \"https://github.com/o/r/pull/1\"
  findings: none
outcome: passed"
export FM_FAKE_AXI_STATUS_RUN="" FM_FAKE_RUNS_LIST="" FM_FAKE_CI_LOGS=""

echo "\$ FM_HOME=<fixture> bin/fm-fleet-snapshot.sh --json | jq '.tasks[] | {id, current_state}'"
PATH="$fakebin:$PATH" FM_HOME="$HOME_DIR" "$BIN/fm-fleet-snapshot.sh" --json 2>/dev/null \
  | jq '.tasks[] | {id, current_state}'

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 2 issues found → auto-fixed ✅
  • ⚠️ tests/fm-crew-state.test.sh:947 - tests/fm-crew-state.test.sh:947 adds test_terminal_run_with_skipped_ci_does_not_claim_pr_landed, but neither of its two arms is required by the intent's regression-coverage requirement. Its full arm feeds the same run_passed fixture, branch, and head as the strengthened test_terminal_passed (tests/fm-crew-state.test.sh:941-943), which already fails before the fix and passes after; the appended steps[3] table with ci,skipped is never read, because the outcome branch at bin/fm-crew-state.sh:663 short-circuits before any steps parsing, so the 'skipped CI' scenario the name advertises is decorative. Its coarse arm exercises bin/fm-crew-state.sh:640, a path that already emitted 'run completed' before this commit, so its merged/closed/checks-green assertions are vacuous and could never have caught the defect. Narrower form that satisfies the intent: keep the three assertions already added to test_terminal_passed and drop the new function. The remedy is removal, not hardening.
  • ℹ️ bin/fm-crew-state.sh:666 - The new 'run completed' detail at bin/fm-crew-state.sh:666 drops the only signal that a terminal run had a PR at all. The run object carries pr: (run_passed emits https://github.com/o/r/pull/1), and the sibling held-green path at bin/fm-crew-state.sh:457-459 appends that URL precisely so the captain sees an artifact still awaiting a decision. After this change a concluded run whose PR is open reads as 'state: done - source: run-step - run completed' with no pointer: honest, but less actionable than before. This is a product-behavior question, and surfacing the URL would extend the change past its stated intent rather than correct what it already does, so it needs the author's call rather than an automatic fix.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 8 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Captain reads a crew whose validation run concluded while its PR is still open: the line reports run completion plus the PR URL, never a merge or closure ✅ pass live bin/fm-crew-state.sh feat-open -> state: done · source: run-step · run completed: https://github.com/o/r/pull/1; same command on base b1ad702 -> run passed: PR merged/closed (crew-state-before-a…
Concluded run that produced no PR URL degrades gracefully instead of emitting a dangling separator ✅ pass live bin/fm-crew-state.sh feat-nopr with pr: &#34;&#34; -> state: done · source: run-step · run completed (crew-state-before-after.txt, S2)
Concluded run whose record omits the pr field entirely still reads cleanly ✅ pass live bin/fm-crew-state.sh feat-noprfield with no pr: key at all -> state: done · source: run-step · run completed (crew-state-before-after.txt, S2b)
Adversarial: a stale status-log event claiming the PR merged and closed cannot reintroduce the forge claim ✅ pass live status log seeded with done: PR https://github.com/o/r/pull/3 merged and closed + concluded run -> state: done · source: run-step · run completed: https://github.com/o/r/pull/3 (crew-state-before-…
Held-for-merge path still surfaces its PR URL after the URL append was extracted into a shared helper ✅ pass live terminal failed run, only ci step failed, ci log reads checks green -> state: done · source: run-step · checks green: PR held for merge (ci monitor ended): https://github.com/o/r/pull/7, identical o…
checks-passed outcome is unchanged by this fix ✅ pass live bin/fm-crew-state.sh feat-cp with outcome: checks-passed -> checks green: PR ready for review on both base and head (crew-state-before-after.txt, S4)
The composed captain-facing fleet snapshot carries the honest detail and parses the appended URL into its own field ✅ pass live bin/fm-fleet-snapshot.sh --json -> current_state.detail: &#34;run completed: https://github.com/o/r/pull/1&#34; with state/source split intact; base emitted &#34;run passed: PR merged/closed&#34; (fleet-snapsho…
The regression coverage genuinely pins the defect: it fails against the pre-fix product and passes against the fix ✅ pass live head's tests/fm-crew-state.test.sh run unchanged over a base-commit tree -> not ok - passed outcome reports only run completion; on head -> ok - terminal passed run is authoritative (regression-…
  • bash tests/fm-crew-state.test.sh (full targeted suite for the changed script - all cases pass)
  • Live driver over the real product: real git worktrees + real state/&lt;id&gt;.meta + a no-mistakes CLI on PATH serving axi status run records, running bin/fm-crew-state.sh &lt;id&gt; for outcomes passed (open PR), passed (empty pr:), passed (no pr field), failed/held-green, checks-passed, and passed-with-stale-merged-log
  • Same driver replayed against the base commit's bin/ (git archive b1ad702 bin) to reproduce the run passed: PR merged/closed defect end to end
  • FM_HOME=&lt;fixture&gt; bin/fm-fleet-snapshot.sh --json | jq &#39;.tasks[] | {id, current_state}&#39; on both base and head, to confirm the captain-facing composition carries the honest detail and parses the appended URL into detail
  • tests/fm-crew-state.test.sh from the head commit run unchanged against a base-commit tree, to prove the new assertions fail before the fix
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@devin-ai-integration

Copy link
Copy Markdown

Closed as superseded — this work already landed on main via #4624.

— Kun's Firstmate

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