Skip to content

feat: enrich wake context and deduplicate X-mode mentions - #6

Merged
raywest merged 11 commits into
mainfrom
fm/fm-fork-sync-u2
Jul 20, 2026
Merged

raywest merged 11 commits into
mainfrom
fm/fm-fork-sync-u2

Conversation

@raywest

@raywest raywest commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Intent

Catch-up sync of the fork (raywest/firstmate) with upstream (kunchenguid/firstmate): merge upstream/main into fork main via a true two-parent merge (never rebase or squash). The prior sync PR (#5) was landed as a squash on the fork's default branch, which flattened its merge commit and never advanced ancestry, so this merge replays all upstream history since the original pre-squash fork point (bc1a21b) rather than just new commits since the last sync. That produced the SAME 4 conflicting files as the previous sync: bin/fm-watch.sh, docs/architecture.md, tests/fm-watch-triage.test.sh, tests/fm-watcher-lock.test.sh. All 4 conflicts were deliberately resolved to the fork main side (commit 98c5724), not a naive auto-merge: I content-verified via 'git diff 68c6110 main' that fork main already contains the fully reconciled result of everything upstream through 68c6110, including a hand-repaired watcher agent-liveness/pause throttle fix (pause_state_class in bin/fm-watch.sh uses agent_alive = alive, i.e. only a CONFIRMED-alive agent breaks a declared pause/captain-held state and re-derives from scratch; upstream's unabsorbed variant used agent_alive != dead, a looser condition that also treats an unknown/unreadable liveness read as grounds to break the pause - which is the exact regression the previous naive auto-merge introduced and had to be hand-repaired). I verified neither of the two genuinely-new upstream commits (c12bdea kunchenguid#745 x-mode mention dedupe, 4ab61fa kunchenguid#747 wake-signal enrichment) touches bin/fm-watch.sh at all, so resolving that file's conflicts fully to fork main's side loses nothing new from upstream. The other 3 conflicts were the same throttle-fix comment/test content duplicated across files. Genuinely new upstream content (619 lines, mostly tests/docs: fm-wake-queue.test.sh, fm-x-mode.test.sh, docs/configuration.md, docs/scripts.md, docs/architecture.md prose elsewhere in the file) merged cleanly via git's automatic merge with no conflicts and is fully absorbed. After resolving, I verified: full test suite (84/84 tests/*.test.sh, matching CI's own loop) passes; shellcheck clean at the pinned version; both watcher test suites (fm-watch-triage.test.sh, fm-watcher-lock.test.sh) pass including the specific regression test for the misattributed-run-step throttle fix (test_nonterminal_stale_paused_survives_misattributed_run_step_across_restarts), confirming upstream's new wake-signal enrichment did not silently disable it; the two new upstream test suites (fm-wake-queue.test.sh, fm-x-mode.test.sh) pass; and each of the fork's 4 distinguishing features smoke-tested clean: kimi crewmate/scout harness adapter (fm-kimi-harness.test.sh, 12/12), watcher stale-suppression fix (covered by the two watcher suites above), flaky-test/ghost-composer stabilization (fm-composer-ghost.test.sh, fm-gate-refuse.test.sh), and the GLM harness_profile dispatch axis (fm-spawn-dispatch-profile.test.sh 27/27, fm-secondmate-harness.test.sh 27/27). This PR must be landed with a TRUE MERGE, never squash, to finally repair the fork's ancestry so future syncs only replay genuinely new upstream commits instead of full history again.

What Changed

  • Merged the upstream changes through a true two-parent merge while retaining the fork’s watcher supervision behavior.
  • Added bounded, best-effort status-event annotations to drained wake signals without delaying durable queue consumption or appends.
  • Deduplicated X-mode mention wakes with durable pending/delivered offer records, acknowledging offers only after the watcher queues their wake; updated X-mode guidance and coverage accordingly.

Risk Assessment

✅ Low: The follow-up preserves the required two-parent merge and closes the prior X-mode delivery gap by acknowledging an offer only after its wake queue append succeeds.

Testing

The supplied full-suite baseline passed; I independently ran the affected watcher, wake/X-mode, and fork-feature CLI end-to-end suites, verified merge ancestry and conflict preservation, and saved reviewer-readable transcripts—no rendered UI exists for this shell-based project.

Evidence: Merge topology and conflict-resolution evidence
Merge topology and resolution evidence
merge_commit=d8cbd52508f2c973ef6eacdcfb3404193ece5fce
parents=98c5724c11960ab2128b161a0f533d0a5a001092 4ab61fa7d453c170ee2f2d2f7eb334efa3058f78
subject=Merge remote-tracking branch 'upstream/main' into fm/fm-fork-sync-u2
pre-squash fork-point=bc1a21b2ccfcd500ae29181f82b28b6cf1075bfb
upstream_c12bdea_absorbed=yes
upstream_4ab61fa_absorbed=yes
conflict-file blob comparison (fork parent / true merge):
bin/fm-watch.sh preserved: c20024172664d9034b99099bd481ffbdb9e50e5e
tests/fm-watch-triage.test.sh preserved: 3eec0315cf62c77ead6e7836abb9a32df74bd652
tests/fm-watcher-lock.test.sh preserved: 0311bae949fff4d1ddc899b8609592b516d39655
protected watcher liveness condition:
    return
  fi
  if [ -e "$STATE/.paused-$key" ] && [ "$(age_of "$recheck_file")" -lt "$STALE_ESCALATE_SECS" ]; then
    if [ "$(window_kind "$win")" != secondmate ]; then
      agent_alive=$(fm_backend_agent_alive "$(window_backend "$win")" "$win" 2>/dev/null) || agent_alive=unknown
      if [ "$agent_alive" = alive ]; then
        rm -f "$recheck_file"
        printf 'none'
        return
cleanly merged upstream content relative to fork parent:
 docs/configuration.md       |   7 +-
 docs/scripts.md             |   4 +-
 tests/fm-wake-queue.test.sh | 205 +++++++++++++++++++++++++++++++++++++++++++-
 tests/fm-x-mode.test.sh     | 104 ++++++++++++++++++++++
 4 files changed, 313 insertions(+), 7 deletions(-)
target_contains_merge=yes

Architecture conflict region retains fork-side pause semantics:
docs/architecture.md event-supervision region preserved=yes
Evidence: Focused CLI end-to-end suite transcript
== tests/fm-watcher-lock.test.sh ==
ok - simultaneous watcher starts leave exactly one live process
ok - fm_pid_identity is locale-invariant across LC_ALL/LC_TIME
ok - killed watcher stale lock is reclaimed
ok - live watcher lock with stale heartbeat is actionable
ok - guard banner leads when down with pending wakes (repair-after-drain) and stays silent when fresh
ok - concurrent fm_lock_try_acquire yields exactly one winner
ok - dead-pid stale lock is reclaimed by a single acquirer
ok - concurrent stale-lock steal yields exactly one winner
ok - live steal mutex is not reclaimed
ok - live-held lock is not stolen
ok - empty mid-acquire lock keeps a minimum grace
ok - late original claimant cannot claim a recreated lock
ok - paused mid-acquire claimant backs off to active stealer
ok - watch restart refuses to signal a reused pid
ok - watch restart attaches to a verified healthy peer and later surfaces a successor gap
ok - watcher self-evicts when the lock pid no longer names it
ok - arm turns clean self-eviction without a successor into a typed failure
ok - arm attaches to a live fresh watcher and fails loudly when that cycle has no successor
ok - attached arm signals record a classified lifecycle entry
ok - arm starts+confirms a fresh watcher on a clean lock and self-heals a dead-pid lock (never healthy off a dead pid)
ok - arm cleans child watcher and temp output on HUP
ok - arm propagates an immediate watcher wake before confirmation
ok - arm attaches to a peer watcher after child stands down and surfaces a missing successor
watcher: lock held by live pid 61648 but heartbeat is stale for 837853127s (>300s); inspect or stop that watcher before re-arming.
ok - arm reports FAILED and exits non-zero when no fresh watcher can be confirmed
ok - cycle-exit ledger links a verified successor and remains size-capped
ok - SIGSTOP distinguishes live PID from stale beacon and termination records the exit class
RESULT tests/fm-watcher-lock.test.sh exit=0
== tests/fm-wake-queue.test.sh ==
ok - concurrent append plus drain preserves queue records
ok - signal written while no watcher runs is caught on next run
ok - stale wake is queued before suppressor state is advanced
ok - a not-provably-working stale wake is queued before its suppressor is advanced
ok - registered custom check output is queued before cadence suppression
ok - two atomic drains cannot consume the same records twice
ok - drain collapses obvious duplicate heartbeat and signal records
ok - drain asserts watcher liveness: warns on a lapse, stays silent right after a fire
ok - structural signal enrichment is separate, deduped, home-local, and tier-zero for other wakes
ok - bounded reads and per-item/global caps fail open with explicit truncation and omission markers
ok - slow annotation releases the append lock and a deleted status file fails open
ok - interruptions restore before commitment and never replay after raw commitment
RESULT tests/fm-wake-queue.test.sh exit=0
== tests/fm-x-mode.test.sh ==
ok - fm-x-poll is a hard no-op without a token (inert default)
ok - fm-x-poll treats an explicitly empty env token as configured
ok - fm-x-poll stays silent on HTTP 204 (the common case)
ok - fm-x-poll lets an explicitly empty relay env override .env
ok - fm-x-poll surfaces auth/config errors once and clears on recovery
ok - fm-x-poll diagnostic markers use private guarded publication
ok - fm-x-poll stashes the question and prints the compact marker
ok - fm-x-poll wakes once per durable request offer across inbox cleanup
ok - watcher queues an X mention before finalizing its offer marker
ok - fm-x-poll retains offer claim diagnostics until recovery
ok - fm-x-poll preserves in_reply_to conversation context in the inbox
ok - fm-x-poll reports inbox commit failures without emitting a mention wake
ok - fm-x-poll publishes inbox records only through private guarded artifacts
ok - fm-x-poll requires a non-empty question before waking
ok - fm-x-poll rejects an unsafe request_id (path-traversal guard)
ok - fm-x-reply posts a request-bound answer and echoes only the request_id
ok - fm-x-reply accepts the reply via --text-file and stdin (safe, unexpanded)
ok - fm-x-reply exits non-zero on a non-2xx relay response
ok - fm-x-reply cleans up auth header temp files on interrupted posts
ok - fm-x-reply rejects missing arguments with a usage error
ok - fm-x-reply --help makes image support discoverable
ok - fm-x-reply rejects whitespace-only reply text
ok - fm-x-reply dry-run records the would-be reply and never posts
ok - fm-x-reply dry-run works without a token
ok - fm-x-reply honors FMX_DRY_RUN from .env
ok - fm-x-reply lets an explicitly empty dry-run env override .env
ok - fm-x-reply dry-run fails when it cannot record the preview
ok - fm-x-reply dry-run publishes outbox records only through private guarded artifacts
ok - fmx_split_thread: word-boundary, fence-aware, within-limit, numbered, lossless, capped
ok - fm-x-reply keeps a concise reply as a single unnumbered tweet
ok - fm-x-reply auto-splits a long reply into a numbered thread (texts[])
ok - fm-x-reply uses the Discord inbox platform budget instead of the X tweet budget
ok - fm-x-reply keeps numeric X requests on the X tweet budget
ok - fm-x-reply prefers an explicit relay-provided reply limit
ok - fm-x-reply rejects unsafe inbox context artifacts
ok - fm-x-reply clamps a below-floor max to 50 characters
ok - fm-x-reply posts a thread payload (texts[]) to the relay
ok - fm-x-reply --image posts an image object on answer
ok - fm-x-reply streams large image payloads outside curl argv
ok - fm-x-reply dry-run records compact image metadata for threaded replies
ok - fm-x-reply cleans image and payload temp files
ok - fm-x-reply --image rejects missing and unsupported image paths clearly
ok - fm-x-reply --followup posts to /connector/followup with the same request-bound body
ok - fm-x-reply maps a followup_unavailable follow-up 409 to exit 9
ok - fm-x-reply maps every follow-up 409 to exit 9 even without the marker
ok - fm-x-reply treats answer-endpoint 409 as a generic failure
ok - fm-x-reply --followup --image posts an image object
ok - fm-x-reply --followup is accepted in any position and leaves the answer path default
ok - fm-x-reply --followup dry-run marks the endpoint without changing the answer path
ok - fm-x-reply --followup auto-splits a long follow-up into a marked thread
ok - fm-x-reply followup dry-run keeps endpoint marker and compact image metadata
ok - fm-x-poll records the durable per-request reply context from the relay payload
ok - context registry publishes records only through private guarded artifacts
ok - context registry reads only private single-link artifacts
ok - private artifact publisher is compatible with the system bash path
ok - context registry retention is bounded to the seven-day follow-up window
ok - context registry rewrites preserve the first-seen timestamp
ok - context retention starts only when a live initial answer succeeds
ok - a delayed Discord follow-up stays one message after inbox cleanup via the durable registry
ok - an X follow-up over 280 still splits correctly after inbox cleanup
ok - every unresolved follow-up is refused before posting
ok - a partial registry platform combines with the relay's authoritative budget
ok - concurrent requests each recover their own platform/budget with no cross-overwrite
ok - fm-x-dismiss clears the durable per-request context (a dismissed mention gets no follow-up)
ok - fm-x-dismiss posts a request-bound dismiss and echoes only the request_id
ok - fm-x-dismiss dry-run records the would-be body and never posts
ok - fm-x-dismiss dry-run works without a token
ok - fm-x-dismiss dry-run publishes outbox records only through private guarded artifacts
ok - fm-x-dismiss exits non-zero on a non-2xx relay response
ok - fm-x-dismiss exits non-zero on a transport failure
ok - fm-x-dismiss rejects an unsafe request_id (path-traversal guard)
ok - fm-x-dismiss rejects missing or extra arguments with a usage error
ok - fm-x-link records and refreshes the X-request link without disturbing meta
ok - fm-x-link records Discord platform context so follow-ups keep the Discord budget
ok - fm-x

... [1772 bytes truncated] ...

eports missing X-mode dependencies before arming
ok - bootstrap does not report X mode on when activation artifacts cannot be written
ok - bootstrap rejects linked X artifacts without touching their targets
ok - bootstrap is inert without a non-empty .env token (non-X users unaffected)
ok - bootstrap cleans up X artifacts on opt-out and is silent once off
ok - bootstrap reports failed X artifact cleanup on opt-out
RESULT tests/fm-x-mode.test.sh exit=0
== tests/fm-kimi-harness.test.sh ==
ok - kimi preflight refuses missing CLI and config before task resources
ok - kimi creates the state directory before writing metadata
ok - kimi global hook requires a firstmate registry token
ok - kimi config append is idempotent and the brief goes over as a bracketed paste
ok - kimi doctor failure restores config.toml and leaves recoverable state
ok - kimi teardown removes pointer and token state
ok - kimi aborts when the pasted brief cannot be verified
ok - kimi --secondmate spawn is refused loudly
ok - kimi spawn on a non-tmux backend is refused loudly
ok - raw kimi launches bypass template-only scope gates
ok - kimi config append waits for live locks and reclaims stale locks
ok - generated kimi hook script parses cleanly
RESULT tests/fm-kimi-harness.test.sh exit=0
== tests/fm-composer-ghost.test.sh ==
ok - fm_tmux_strip_ghost drops dim/faint runs, keeps normal and bold text
ok - fm_tmux_strip_ghost handles combined SGR, ESC[22m, and reset-then-dim
ok - fm_tmux_strip_ghost keeps bright colored text with 2 payloads
ok - fm_tmux_strip_ghost drops a dark/muted truecolor foreground (grok placeholder)
ok - fm_pane_input_pending: a dim ghost-only composer is NOT pending
ok - fm_pane_input_pending: dim ghost inside a bordered composer is NOT pending
ok - fm_pane_input_pending: normal-intensity typed text is still pending
ok - fm_pane_input_pending: bright colored text with 2 payloads is still pending
ok - fm_pane_input_pending: a dark truecolor ghost-only composer (grok placeholder) is NOT pending
ok - fm_tmux_composer_state: dark truecolor shell prompts read unknown
ok - fm_pane_input_pending: real text plus a trailing ghost run is still pending
ok - fm_tmux_composer_state: kimi's idle bordered '| > |' composer reads empty
ok - fm_tmux_composer_state: kimi's composer holding unsubmitted text reads pending
ok - fm_pane_is_busy: kimi 'ctrl+c: cancel' and grok 'Ctrl+c:cancel' both match; kimi idle hints do not
ok - fm-peek output is escape-free (no raw -e bytes reach firstmate context)
RESULT tests/fm-composer-ghost.test.sh exit=0
== tests/fm-gate-refuse.test.sh ==
ok - fm-gate-refuse-lib: refuses when NO_MISTAKES_GATE is set
ok - fm-gate-refuse-lib: refuses when NO_MISTAKES_GATE is set empty
ok - fm-gate-refuse-lib: refuses from a gate worktree via git-common-dir (marker unset)
ok - fm-gate-refuse-lib: no-op for a normal session (neither signal, set -eu clean)
ok - fm-spawn: refuses on marker and gate-worktree backstop; a normal crew spawn is unaffected
ok - fm-send: refuses on marker and gate-worktree backstop; a normal steer is unaffected
ok - fm-teardown: refuses on marker and gate-worktree backstop; a normal teardown is unaffected
ok - .no-mistakes.yaml parses and sets disable_project_settings: true (trusted-only gate opt-out)
RESULT tests/fm-gate-refuse.test.sh exit=0
== tests/fm-spawn-dispatch-profile.test.sh ==
ok - no --model/--effort/--harness-profile records defaults and keeps the claude launch byte-identical
ok - active crew-dispatch profile requires an explicit harness for ship spawns
ok - active crew-dispatch profile requires an explicit harness for scout spawns
ok - active crew-dispatch profile allows an explicit resolved harness
ok - active crew-dispatch profile allows the legacy positional harness form
ok - active crew-dispatch profile allows the raw launch-command escape hatch
ok - claude receives --model and --effort profile flags
ok - codex receives --model and model_reasoning_effort profile flags, harness_profile stays default
ok - codex omits unsupported max effort instead of passing a bad config value
ok - grok receives --model and --reasoning-effort profile flags
ok - grok omits unsupported max reasoning effort
ok - grok omits unsupported xhigh reasoning effort
ok - opencode receives --model and omits the unsupported effort axis
ok - pi receives --model and --thinking max profile flags
ok - batch dispatch forwards shared --harness, --model, and --effort to every pair
ok - active crew-dispatch profile does not block secondmate launches
ok - codex receives --profile and records harness_profile in meta
ok - codex propagates an explicit config home only for harness-profile launches
ok - codex canonicalizes explicit profile homes and rejects missing homes
ok - codex secondmate template also threads --harness-profile
ok - secondmate standing harness-profile token threads into the launch and meta
ok - explicit --harness-profile overrides the secondmate standing token
ok - secondmate standing harness-profile tokens use shape and fail-closed validation
ok - --harness-profile fails closed when the named config file does not exist
ok - --harness-profile is rejected loudly for a non-codex harness
ok - --harness-profile is rejected loudly for a raw launch command
ok - --harness-profile rejects a path-shaped value before ever reaching codex
ok - batch dispatch forwards a shared --harness-profile to every pair
# all fm-spawn-dispatch-profile tests passed
RESULT tests/fm-spawn-dispatch-profile.test.sh exit=0
== tests/fm-secondmate-harness.test.sh ==
ok - A1 fm-harness.sh secondmate resolves the fallback chain; crew mode unchanged
ok - C1 fm-harness.sh secondmate-model/secondmate-effort resolve the optional tokens; bare harness stays empty (backward-compat)
ok - C1b fm-harness.sh secondmate-harness-profile resolves the fourth optional token
ok - C1c fm-harness.sh preserves literal glob characters in the fourth token
ok - B1 propagate_inheritable_config: copy, idempotence, convergence, absence-mirror, exclusion, no-op, skip diagnostics
ok - B2 spawn: secondmate runs the secondmate harness; its home inherits declared config
ok - B3 spawn: an absent secondmate-harness falls back to the crew harness (backward-compat)
ok - B4 spawn: no config at all -> own harness and no propagation side effects
ok - B5 spawn: an explicit per-spawn harness arg overrides config/secondmate-harness
ok - B6 spawn: an unverified resolved secondmate harness is refused (guard intact)
ok - C2 spawn: a bare harness-only secondmate-harness file launches with no model/effort flag (backward-compat)
ok - C3 spawn: config/secondmate-harness's model token threads --model into the launch and meta
ok - C4 spawn: config/secondmate-harness's model+effort tokens thread into the launch and meta
ok - C4b spawn: config/secondmate-harness's fourth token threads codex profile into the launch and meta
ok - C5 spawn: an explicit --model overrides config/secondmate-harness's model token; the file's effort token still applies
ok - C6 spawn: an explicit --effort overrides config/secondmate-harness's effort token; the file's model token still applies
ok - C7 spawn: an explicit --harness starts with clean model/effort defaults
ok - C8 spawn: an explicit --harness still honors explicit model/effort flags
ok - C9 spawn: the harness fallback chain still resolves with no tokens; crew/scout launches are unaffected by this feature
ok - B7 bootstrap sweep pushes, re-converges, and mirrors absence; never inherits secondmate-harness
ok - B8 bootstrap sweep propagates config even when the home's tracked files are already current
ok - B9 bootstrap sweep defers new inherited config until the home ignores it
ok - B10 bootstrap sweep with no inherited config is a config no-op and still fast-forwards
ok - B11 bootstrap sweep surfaces config propagation failures
ok - B12 config-push propagates via shared live discovery, reports items, and does not fast-forward or nudge
ok - B13 config-push reports dirty, non-allowing, and invalid homes without failing warnings-only runs
ok - B14 config-push exits nonzero on real propagation errors
# all fm-secondmate-harness tests passed
RESULT tests/fm-secondmate-harness.test.sh exit=0
Evidence: Protected watcher regression result
`bash tests/fm-watch-triage.test.sh` exited 0, including: “a done-then-declared-paused crew's already-classified hash survives repeated watcher restarts without refiring, even under a misattributed run-step verdict.”

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • 🚨 bin/fm-x-poll.sh:154 - The offer marker is committed before any durable wake exists. If the poller or watcher dies after this claim but before fm-watch.sh appends its captured output to .wake-queue, later polls exit on the marker and fmx-respond is never invoked; the inbox entry can remain stranded for seven days. Finalize the marker only after durable wake enqueue, or retain/re-emit an explicitly pending delivery state until enqueue is acknowledged.

🔧 Fix: Harden X-mode offer delivery handoff
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"
  • Baseline supplied by the task harness: command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc" (reported successful)
  • bash tests/fm-watch-triage.test.sh
  • bash tests/fm-watcher-lock.test.sh
  • bash tests/fm-wake-queue.test.sh
  • bash tests/fm-x-mode.test.sh
  • bash tests/fm-kimi-harness.test.sh
  • bash tests/fm-composer-ghost.test.sh
  • bash tests/fm-gate-refuse.test.sh
  • bash tests/fm-spawn-dispatch-profile.test.sh
  • bash tests/fm-secondmate-harness.test.sh
  • git show --no-patch --format='commit=%H%nparents=%P%nsubject=%s' d8cbd52508f2c973ef6eacdcfb3404193ece5fce plus git merge-base ancestry checks
  • Conflict-resolution checks comparing merge blobs with 98c5724 and the preserved docs/architecture.md event-supervision region
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

kunchenguid and others added 11 commits July 18, 2026 17:36
…nchenguid#693)

* fix: make watcher supervision continuous

* no-mistakes(review): Bound watcher retries and log attached signals

* no-mistakes(review): Add bounded successor-recovery wake fallbacks

* no-mistakes(review): Prevent overlapping successor-arm retries

* no-mistakes(review): Resume supervision after late arm closes

* no-mistakes(review): Bind OpenCode recovery to attempted arm

* no-mistakes(test): Synchronize peer beacon regression fixture

* no-mistakes(test): Synchronize Pi and OpenCode late-close lifecycle fixtures

* no-mistakes(document): Captain: document watcher successor protocol behavior

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes
* fix: always fetch PR head for review diffs

Prefer a freshly fetched refs/pull/<n>/head over a reachable recorded
pr_head= so reviewers never hold a merge over a "missing" fix that already
landed on the remote PR. Recorded SHA is offline fallback only; local branch
is last resort with a warning. Store the tip under refs/fm-review/ so a later
base-branch fetch cannot clobber the compare tip via FETCH_HEAD.

* no-mistakes(test): Isolate session-start nudge tests from gate state

* no-mistakes(document): Correct review-diff documentation
…and skills (kunchenguid#736)

* docs: resolve five contract contradictions

* no-mistakes(test): align owner-pointer assertions with reworded docs; skip absent shellcheck
* docs(harness): reverify grok exit command

* no-mistakes(test): Correct Grok exit resume attribution
* fix(watcher): bound stale wakes for exited paused crew

* no-mistakes(review): Gate pause suppression on confirmed agent death

* no-mistakes(test): Fixed stale pause cadence

* no-mistakes(document): Document dead-agent hold cadence
…id#744)

* fix(supervision): distinguish ordinary wakes from repair

* no-mistakes(review): Make passive guard follow-ups recovery-only

* no-mistakes(document): Clarify recovery-only turn-end guard documentation
* fix(x-mode): dedupe pending mention wakes

* no-mistakes(review): fix x-poll claim error deduplication

* no-mistakes(review): separate claim diagnostics from relay recovery

* no-mistakes(document): Document X-mode once-only mention wakes
…enguid#747)

* feat(wake): enrich drained signal context

* no-mistakes(review): Bound wake enrichment reads

* no-mistakes(document): Document wake-drain annotations

* docs(wake): explain at-least-once drain boundary

* no-mistakes(review): Prevent symlink races in wake annotations

* no-mistakes(review): Exercise wake symlink race regression

* test: document intentional AFK marker subprocesses

* fix(wake): isolate annotation marker state
# Conflicts:
#	bin/fm-watch.sh
#	docs/architecture.md
#	tests/fm-watch-triage.test.sh
#	tests/fm-watcher-lock.test.sh
@raywest
raywest merged commit 47d83ca into main Jul 20, 2026
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