Repository navigation
feat: enrich wake context and deduplicate X-mode mentions - #6
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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
Evidence: Focused CLI end-to-end suite transcript
Evidence: Protected watcher regression result
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 beforefm-watch.shappends its captured output to.wake-queue, later polls exit on the marker andfmx-respondis 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.shbash tests/fm-watcher-lock.test.shbash tests/fm-wake-queue.test.shbash tests/fm-x-mode.test.shbash tests/fm-kimi-harness.test.shbash tests/fm-composer-ghost.test.shbash tests/fm-gate-refuse.test.shbash tests/fm-spawn-dispatch-profile.test.shbash tests/fm-secondmate-harness.test.shgit show --no-patch --format='commit=%H%nparents=%P%nsubject=%s' d8cbd52508f2c973ef6eacdcfb3404193ece5fceplusgit merge-baseancestry checksConflict-resolution checks comparing merge blobs with98c5724and the preserveddocs/architecture.mdevent-supervision region✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.