Skip to content

fix(bin): surface unrecognized status prefixes instead of reading them as silence - #5588

Merged
kunchenguid merged 6 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/upstream-4763
Sep 25, 2026
Merged

kunchenguid merged 6 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/upstream-4763

Conversation

@tiago-peixoto

@tiago-peixoto tiago-peixoto commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Fixes #4763.
Implement ready-for-pr issue #4763: an unrecognized status prefix is silently not an event, so declared work reads as silence.

What Changed

  • bin/fm-classify-lib.sh adds status_prefix_unrecognized, which flags two kinds of declaration: a status line that starts with an unknown lowercase verb such as parked: or holding:, and a known verb whose correlation token is missing, mismatched, or written before the verb.
    The latest-event scan now counts such a line as an event, so an earlier recognized line can no longer hide it.
    status_is_captain_relevant escalates it as the line itself.
    Recognized nonterminal verbs keep their existing classification.
    Continuation prose is not treated as a prefix, including labels like Reason:, URLs, and clock times.
  • The recognized-verb list now lives in one shared helper (_fm_status_verb_recognized), and the stamp is stripped from a line before its prefix is checked.
  • The /afk skill and docs/architecture.md now describe the new escalation.
    Tests cover it in tests/fm-watch-triage.test.sh.
    Tests in fm-classify-corr-token and fm-session-start whose fixtures or assertions assumed unknown prefixes were silent are updated.

Risk Assessment

✅ Low: The fix-round changes are small and correct: the prefix check now runs on the unstamped line, and the event scan uses the shared verb list with the same verb set as before; the added tests would fail on the pre-fix code.

Testing

I ran fm-watch.sh on the base and target commits against the same isolated status logs. The five failing line shapes from the issue were silently dropped on the base and woke the captain on the target. Recognized verbs and continuation lines produced the same watcher decision on both commits. The paused rows woke the captain on both commits. A control with a paused: line alone did the same, so that wake is the watcher's normal first-sighting behavior, not something the continuation line causes. The new behavior test and the modified corr-token suite both pass. None of this ran against the live product, for two reasons. The runbook's bin/fm-lab-home.sh does not exist in this tree, so I could not start a lab primary. The runs also used the test suite's stand-in tmux and fm-crew-state.sh instead of a real crew pane. That is why every scenario below is marked untested. This change has no UI, so there are no screenshots.

  • Live validation: ⚠️ inconclusive - 0 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Worker writes parked: after working:: the watcher wakes the captain with the parked line ⏸️ untested no No live result was established. The prior run used the tests' stand-in tmux and fm-crew-state.sh, and no lab primary or real crew pane was available because the runbook's bin/fm-lab-home.sh does not e…
Worker writes holding: after working:: the watcher wakes the captain ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
done with a mismatched corr token wakes the captain as itself and is not treated as a terminal done ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
Readable-stamped parked [at=17:00]: and done corr=deadbeef [at=17:00]: wake the captain ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
Recognized verbs unchanged: done: still wakes the captain, working: is still absorbed ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
Adversarial: a URL, Reason:, Note:, e.g.: or 10:30 after paused:/working: does not replace the declaration or change the watcher decision ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
Evidence: Watcher results on base a8572f6 (bug reproduced)

Source: Watcher results on base a8572f6 (bug reproduced)

parked-after-working               latest='working: still on it'                     -> ABSORBED (watcher kept blocking, no wake)
holding-after-working              latest='working: still on it'                     -> ABSORBED (watcher kept blocking, no wake)
bad-corr-done                      latest='working: still on it'                     -> ABSORBED (watcher kept blocking, no wake)
stamped-parked                     latest='working [at=1]: still on it'              -> ABSORBED (watcher kept blocking, no wake)
stamped-bad-corr-done              latest='working [at=1]: still on it'              -> ABSORBED (watcher kept blocking, no wake)
control-done                       latest='done: shipped'                            -> SURFACED: signal: task.status 
control-working                    latest='working: still on it'                     -> ABSORBED (watcher kept blocking, no wake)
paused+ 'https://github.com/o/r/pull/12' latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'https://github.com/o/r/pull/12' latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ 'Reason: upstream is slow' latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'Reason: upstream is slow' latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ 'Note: see above'          latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'Note: see above'         latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ 'e.g.: the notes'          latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'e.g.: the notes'         latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ '10:30 retry scheduled'    latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ '10:30 retry scheduled'   latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
Evidence: Watcher results on target 23ac31e (fixed)

Source: Watcher results on target 23ac31e (fixed)

parked-after-working               latest='parked: waiting for upstream'             -> SURFACED: signal: task.status 
holding-after-working              latest='holding: for review'                      -> SURFACED: signal: task.status 
bad-corr-done                      latest='done corr=deadbeef: shipped'              -> SURFACED: signal: task.status 
stamped-parked                     latest='parked [at=17:00]: waiting upstream'      -> SURFACED: signal: task.status 
stamped-bad-corr-done              latest='done corr=deadbeef [at=17:00]: shipped'   -> SURFACED: signal: task.status 
control-done                       latest='done: shipped'                            -> SURFACED: signal: task.status 
control-working                    latest='working: still on it'                     -> ABSORBED (watcher kept blocking, no wake)
paused+ 'https://github.com/o/r/pull/12' latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'https://github.com/o/r/pull/12' latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ 'Reason: upstream is slow' latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'Reason: upstream is slow' latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ 'Note: see above'          latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'Note: see above'         latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ 'e.g.: the notes'          latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ 'e.g.: the notes'         latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
paused+ '10:30 retry scheduled'    latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
working+ '10:30 retry scheduled'   latest='working: opened PR'                       -> ABSORBED (watcher kept blocking, no wake)
Evidence: Paused-only control on both trees

Source: Paused-only control on both trees

control-paused-alone               latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
control-paused-alone               latest='paused: waiting on upstream release'      -> SURFACED: signal: task.status 
Evidence: Watcher driver script

Source: Watcher driver script

#!/usr/bin/env bash
# Drive the real bin/fm-watch.sh from <tree> against isolated state dirs, one
# status log per scenario, and print whether the watcher surfaced or absorbed.
set -u
TREE=$1
. "$TREE/tests/wake-helpers.sh"
. "$ROOT/bin/fm-classify-lib.sh"
WATCH="$ROOT/bin/fm-watch.sh"; DRAIN="$ROOT/bin/fm-wake-drain.sh"
TMP_ROOT=$(fm_test_tmproot fm-drive-4763)
file_mtime() { stat -c %Y "$1" 2>/dev/null; }
run() {  # <name> <crew-state> <status-content>
  local name=$1 crew=$2 content=$3 dir state fakebin out pid i beat first now verdict
  dir=$(make_case "$name"); state="$dir/state"; fakebin="$dir/fakebin"; out="$dir/watch.out"
  printf '%s' "$content" > "$state/task.status"
  FM_FAKE_CREW_STATE="$crew" PATH="$fakebin:$PATH" FM_STATE_OVERRIDE="$state" \
    FM_CREW_STATE_BIN="$fakebin/fm-crew-state.sh" FM_POLL=1 FM_SIGNAL_GRACE=1 \
    FM_CHECK_INTERVAL=999999 FM_HEARTBEAT=999999 FM_SECONDMATE_LIVENESS_SECS=99999999 \
    "$WATCH" > "$out" 2>/dev/null &
  pid=$!
  beat="$state/.last-watcher-beat"; first=''; i=0
  while [ $i -lt 150 ] && kill -0 $pid 2>/dev/null; do
    now=$(file_mtime "$beat")
    if [ -n "$now" ]; then [ -z "$first" ] && first=$now; [ "$now" != "$first" ] && break; fi
    sleep 0.1; i=$((i+1))
  done
  if kill -0 $pid 2>/dev/null; then verdict="ABSORBED (watcher kept blocking, no wake)"; kill $pid; wait $pid 2>/dev/null
  else wait $pid 2>/dev/null; verdict="SURFACED: $(tr '\n' ' ' < "$out" | sed "s#$state/##g")"; fi
  printf '%-34s latest=%-42s -> %s\n' "$name" "'$(last_status_line "$state/task.status")'" "$verdict"
}
W='state: working · source: run-step · validating (running)'
P='state: paused · source: status-log · waiting on upstream'
run parked-after-working   "$W" $'working: still on it\nparked: waiting for upstream\n'
run holding-after-working  "$W" $'working: still on it\nholding: for review\n'
run bad-corr-done          "$W" $'working: still on it\ndone corr=deadbeef: shipped\n'
run stamped-parked         "$W" $'working [at=1]: still on it\nparked [at=17:00]: waiting upstream\n'
run stamped-bad-corr-done  "$W" $'working [at=1]: still on it\ndone corr=deadbeef [at=17:00]: shipped\n'
run control-done           "$W" $'working: still on it\ndone: shipped\n'
run control-working        "$W" $'working: still on it\n'
for c in 'https://github.com/o/r/pull/12' 'Reason: upstream is slow' 'Note: see above' 'e.g.: the notes' '10:30 retry scheduled'; do
  run "paused+ '$c'"  "$P" "paused: waiting on upstream release"$'\n'"$c"$'\n'
  run "working+ '$c'" "$W" "working: opened PR"$'\n'"$c"$'\n'
done
rm -rf "$TMP_ROOT"
Evidence: New behavior test result

Source: New behavior test result

ok - unrecognized status prefixes are visible and recognized prefixes are unchanged
Evidence: Base vs target summary
BASE: parked-after-working latest='working: still on it' -> ABSORBED (no wake)
TARGET: parked-after-working latest='parked: waiting for upstream' -> SURFACED: signal: task.status
(same pattern for holding:, done corr=deadbeef:, and the [at=17:00]-stamped versions)
- Outcome: ⚠️ 1 warning across 1 run (5m24s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⏭️ **Rebase** - skipped
  • ⚠️ bin/fm-classify-lib.sh - merge conflict rebasing onto origin/main
  • ⚠️ docs/architecture.md - merge conflict rebasing onto origin/main
🔧 **Review** - 2 issues found → auto-fixed ✅
  • ⚠️ bin/fm-classify-lib.sh:197 - status_prefix_unrecognized checks for a space after the first colon on the raw line, not on the unstamped copy. The brief tells workers to write {state} [at=&lt;epoch&gt;]: ..., and the library already handles readable times like [at=17:00] as real worker output (see _fm_status_unstamped and tests/fm-classify-corr-token.test.sh:609 and 694). A readable time adds a colon inside the tag, so ${line#*:} becomes 00]: waiting, which does not start with a space, and the function returns 1. Reproduced on this commit: parked [at=17:00]: waiting gives unrecognized=1 and captain-relevant=1. parked [at=1790000000]: waiting gives 0 and 0. done corr=deadbeef [at=17:00]: x is also not relevant. With working [at=1]: a followed by parked [at=17:00]: waiting upstream, last_status_line still returns the working line. So the An unrecognized status prefix is silently not an event, so declared work reads as silence #4763 failure (a declared prefix reads as silence) is still reachable for a stamped line. The same check backs all three callers: _fm_status_line_is_event (line 258), status_is_captain_relevant (line 307), and the span reader through it (line 2333). Fix it in one place, the predicate: run the colon and space check on the _fm_status_unstamped copy of the line (as status_line_note does), then add a behaviour case with parked [at=17:00]: and done corr=deadbeef [at=17:00]: after a working: line.
  • ℹ️ bin/fm-classify-lib.sh:165 - The new _fm_status_verb_recognized repeats the recognized-verb case list that _fm_status_line_is_event (lines 250-255) spells out inline. If one list gains or loses a verb without the other, the event scan and the unrecognized check disagree on the same line. Have _fm_status_line_is_event call _fm_status_verb_recognized &#34;$verb&#34; &amp;&amp; return 0 instead of keeping its own copy.

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

⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (0 of 6 scenarios were driven live against the product); untested: Worker writes parked: after working:: the watcher wakes the captain with the parked line, Worker writes holding: after working:: the watcher wakes the captain, done with a mismatched corr token wakes the captain as itself and is not treated as a terminal done, Readable-stamped parked [at=17:00]: and done corr=deadbeef [at=17:00]: wake the captain, Recognized verbs unchanged: done: still wakes the captain, working: is still absorbed, Adversarial: a URL, Reason:, Note:, e.g.: or 10:30 after paused:/working: does not replace the declaration or change the watcher decision
  • Live validation: ⚠️ inconclusive - 0 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Worker writes parked: after working:: the watcher wakes the captain with the parked line ⏸️ untested no No live result was established. The prior run used the tests' stand-in tmux and fm-crew-state.sh, and no lab primary or real crew pane was available because the runbook's bin/fm-lab-home.sh does not e…
Worker writes holding: after working:: the watcher wakes the captain ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
done with a mismatched corr token wakes the captain as itself and is not treated as a terminal done ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
Readable-stamped parked [at=17:00]: and done corr=deadbeef [at=17:00]: wake the captain ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
Recognized verbs unchanged: done: still wakes the captain, working: is still absorbed ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
Adversarial: a URL, Reason:, Note:, e.g.: or 10:30 after paused:/working: does not replace the declaration or change the watcher decision ⏸️ untested no No live result was established. The prior run used the stand-in tmux and fm-crew-state.sh, and this tree has no lab home helper (bin/fm-lab-home.sh) to start a real primary.
  • drive-watch.sh &lt;base-tree&gt; and drive-watch.sh &lt;worktree&gt;: 17 status-log scenarios run through the real bin/fm-watch.sh against isolated FM_STATE_OVERRIDE state dirs, with the tests' stand-in tmux and fm-crew-state.sh; base and target results compared
  • drive-paused-control.sh on both trees: a paused: line alone, as a control for the paused-with-continuation rows
  • tests/fm-watch-triage.test.sh::test_unrecognized_status_prefix_is_visible (the new behavior test, run on its own)
  • bash tests/fm-classify-corr-token.test.sh (modified suite, 0 failures)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

tiago-peixoto and others added 5 commits September 25, 2026 00:49
A parked or holding declaration, and a verb whose correlation token did not parse, never became an event, so the supervisor still saw the earlier line.
…e locally and fixed it by changing the test data in one test. No product code changed. **What failed:** `tests/fm-session-start.test.sh`, in `test_orphan_status_logs_are_printed`, with "matched status log was printed 2 times". **Why:** the test writes status lines with made-up prefixes, `matched: surfaced once` and `orphan: step N`. The test only uses them as placeholder text. It checks that the session-start digest prints each task's status tail exactly once. This PR (kunchenguid#4763) deliberately makes an unrecognized one-word lowercase prefix a status event. So those lines now surface as captain-relevant events, and the wake queue's STATUS OUTCOME BACKSTOP section prints them a second time. The code under review is behaving as the issue asks. Only the test's placeholder data had become meaningful. **Rule the test depends on:** its status lines must not be captain-relevant, so the digest is the only place they are printed. Both lines in this test broke that rule. The orphan line would have failed the same count check right after the matched line did. **Fix:** in that test only, I switched both lines to the recognized, non-captain verb `working:`: `working: surfaced once` and `working: orphan step 1..6`. I updated the matching assertions and counts to use the new text. What the test checks is unchanged: orphan logs are labelled, the tail is bounded, the log path is printed, and each tail appears once. **Verification:** before the fix, the test failed locally the same way as in CI. After it, `bash tests/fm-session-start.test.sh` reports "all assertions passed
…kunchenguid#5599/kunchenguid#5544

Keep unrecognized status-prefix eventing from kunchenguid#5588 inside main's
shared _fm_status_line_is_event helper, and keep both the unrecognized-
prefix latest-event sentence and the declared-wait foreign-key sentence
in docs/architecture.md.
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Verdict: Was otherwise auto-merge-ready restore (Fixes #4763 verified; green CI/NM; attestation MATCH at b82e127…) until squash-merges of #5599/#5587/#5544 made the tip CONFLICTING on bin/fm-classify-lib.sh + docs/architecture.md.

Conflict resolve (maintainerCanModify, existing branch fm/upstream-4763 only): merged current main; kept #5588's unrecognized-prefix eventing inside main's shared _fm_status_line_is_event (add status_prefix_unrecognized check); kept both architecture sentences (unrecognized-prefix latest-event + declared-wait foreign-key). Local smoke: parked/holding event+relevant; Reason: silent; keyless pause stands past foreign [key=default]. Pushed 341b5ee68df1633e28c25895e9e6a7f559c4479d.

contract-class: restore — existing status-event scan silently dropped unrecognized verb-shaped prefixes; tip surfaces them on that same path (not a new observer). No new default-on surface beyond correcting silent miss.

VISION: Interface honesty — aligns (bad declaration no longer silence). Authority — aligns. Scripts — aligns. Restart — aligns. Spine/vendor/scope — align.

Attestation: MISMATCH vs body (still b82e127…); tip moved by conflict resolve. CI/NM: re-running on new HEAD. Firstmate flag: no. Waiting on green CI + fresh no-mistakes attestation at 341b5ee… (author / pipeline), not captain. Will re-triage when green+MATCH.

@tiago-peixoto tiago-peixoto changed the title fix(bin): surface an unrecognized status prefix instead of dropping it fix(bin): surface unrecognized status prefixes instead of reading them as silence Sep 25, 2026
@kunchenguid
kunchenguid merged commit 84362f6 into kunchenguid:main Sep 25, 2026
21 checks passed

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this is merged. Thank you @tiago-peixoto — really appreciate you taking the time on this.

mituso89 pushed a commit to mituso89/firstmate that referenced this pull request Sep 26, 2026
…m as silence (kunchenguid#5588)

* fix(bin): surface an unrecognized status prefix instead of dropping it

A parked or holding declaration, and a verb whose correlation token did not parse, never became an event, so the supervisor still saw the earlier line.

* no-mistakes(review): Require verb-shaped unrecognized status prefixes, add continuation tests

* no-mistakes(document): Document unrecognized status prefix escalation in afk skill

* no-mistakes(ci): I reproduced the "Behavior portable serial 6" failure locally and fixed it by changing the test data in one test. No product code changed. **What failed:** `tests/fm-session-start.test.sh`, in `test_orphan_status_logs_are_printed`, with "matched status log was printed 2 times". **Why:** the test writes status lines with made-up prefixes, `matched: surfaced once` and `orphan: step N`. The test only uses them as placeholder text. It checks that the session-start digest prints each task's status tail exactly once. This PR (kunchenguid#4763) deliberately makes an unrecognized one-word lowercase prefix a status event. So those lines now surface as captain-relevant events, and the wake queue's STATUS OUTCOME BACKSTOP section prints them a second time. The code under review is behaving as the issue asks. Only the test's placeholder data had become meaningful. **Rule the test depends on:** its status lines must not be captain-relevant, so the digest is the only place they are printed. Both lines in this test broke that rule. The orphan line would have failed the same count check right after the matched line did. **Fix:** in that test only, I switched both lines to the recognized, non-captain verb `working:`: `working: surfaced once` and `working: orphan step 1..6`. I updated the matching assertions and counts to use the new text. What the test checks is unchanged: orphan logs are labelled, the tail is bounded, the log path is printed, and each tail appears once. **Verification:** before the fix, the test failed locally the same way as in CI. After it, `bash tests/fm-session-start.test.sh` reports "all assertions passed

* no-mistakes(review): Detect unrecognized prefixes on unstamped lines; share verb list

---------

Co-authored-by: Kun's firstmate <[email protected]>
mehulbhagwani pushed a commit to mehulbhagwani/firstmate that referenced this pull request Sep 26, 2026
…m as silence (kunchenguid#5588)

* fix(bin): surface an unrecognized status prefix instead of dropping it

A parked or holding declaration, and a verb whose correlation token did not parse, never became an event, so the supervisor still saw the earlier line.

* no-mistakes(review): Require verb-shaped unrecognized status prefixes, add continuation tests

* no-mistakes(document): Document unrecognized status prefix escalation in afk skill

* no-mistakes(ci): I reproduced the "Behavior portable serial 6" failure locally and fixed it by changing the test data in one test. No product code changed. **What failed:** `tests/fm-session-start.test.sh`, in `test_orphan_status_logs_are_printed`, with "matched status log was printed 2 times". **Why:** the test writes status lines with made-up prefixes, `matched: surfaced once` and `orphan: step N`. The test only uses them as placeholder text. It checks that the session-start digest prints each task's status tail exactly once. This PR (kunchenguid#4763) deliberately makes an unrecognized one-word lowercase prefix a status event. So those lines now surface as captain-relevant events, and the wake queue's STATUS OUTCOME BACKSTOP section prints them a second time. The code under review is behaving as the issue asks. Only the test's placeholder data had become meaningful. **Rule the test depends on:** its status lines must not be captain-relevant, so the digest is the only place they are printed. Both lines in this test broke that rule. The orphan line would have failed the same count check right after the matched line did. **Fix:** in that test only, I switched both lines to the recognized, non-captain verb `working:`: `working: surfaced once` and `working: orphan step 1..6`. I updated the matching assertions and counts to use the new text. What the test checks is unchanged: orphan logs are labelled, the tail is bounded, the log path is printed, and each tail appears once. **Verification:** before the fix, the test failed locally the same way as in CI. After it, `bash tests/fm-session-start.test.sh` reports "all assertions passed

* no-mistakes(review): Detect unrecognized prefixes on unstamped lines; share verb list

---------

Co-authored-by: Kun's firstmate <[email protected]>
mehulbhagwani pushed a commit to mehulbhagwani/firstmate that referenced this pull request Sep 26, 2026
…m as silence (kunchenguid#5588)

* fix(bin): surface an unrecognized status prefix instead of dropping it

A parked or holding declaration, and a verb whose correlation token did not parse, never became an event, so the supervisor still saw the earlier line.

* no-mistakes(review): Require verb-shaped unrecognized status prefixes, add continuation tests

* no-mistakes(document): Document unrecognized status prefix escalation in afk skill

* no-mistakes(ci): I reproduced the "Behavior portable serial 6" failure locally and fixed it by changing the test data in one test. No product code changed. **What failed:** `tests/fm-session-start.test.sh`, in `test_orphan_status_logs_are_printed`, with "matched status log was printed 2 times". **Why:** the test writes status lines with made-up prefixes, `matched: surfaced once` and `orphan: step N`. The test only uses them as placeholder text. It checks that the session-start digest prints each task's status tail exactly once. This PR (kunchenguid#4763) deliberately makes an unrecognized one-word lowercase prefix a status event. So those lines now surface as captain-relevant events, and the wake queue's STATUS OUTCOME BACKSTOP section prints them a second time. The code under review is behaving as the issue asks. Only the test's placeholder data had become meaningful. **Rule the test depends on:** its status lines must not be captain-relevant, so the digest is the only place they are printed. Both lines in this test broke that rule. The orphan line would have failed the same count check right after the matched line did. **Fix:** in that test only, I switched both lines to the recognized, non-captain verb `working:`: `working: surfaced once` and `working: orphan step 1..6`. I updated the matching assertions and counts to use the new text. What the test checks is unchanged: orphan logs are labelled, the tail is bounded, the log path is printed, and each tail appears once. **Verification:** before the fix, the test failed locally the same way as in CI. After it, `bash tests/fm-session-start.test.sh` reports "all assertions passed

* no-mistakes(review): Detect unrecognized prefixes on unstamped lines; share verb list

---------

Co-authored-by: Kun's firstmate <[email protected]>
ashkonmousavi added a commit to ashkonmousavi/firstmate that referenced this pull request Sep 26, 2026