Skip to content

Upstream catch-up: merge kunchenguid/firstmate main (7 commits) - #10

Merged
Bre77 merged 8 commits into
mainfrom
fm/fm-upstream-integrate-r8
Jul 9, 2026
Merged

Bre77 merged 8 commits into
mainfrom
fm/fm-upstream-integrate-r8

Conversation

@Bre77

@Bre77 Bre77 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Intent

  • Upstream integration merge: brings kunchenguid/firstmate main (7 commits) into the fork's integration line.
    • fix(watcher): wait when arm attaches to a healthy watcher (#375)
    • fix: make stow memory writes inspect before update (#372)
    • fix: split X-mode replies by platform (#369)
    • feat: add harness-aware supervision (#367)
    • fix: deliver AFK escalations through herdr supervisors (#353)
    • fix(fm-send): fail loudly on unresolvable send targets (#254)
    • feat: add fleet snapshot and view commands (#343)
    • All of the above merged cleanly with no conflicts.
  • Two files conflicted because both the fork and upstream had edited them independently: CONTRIBUTING.md and docs/configuration.md.
    • CONTRIBUTING.md: the conflict was two adjacent test-description comment lines inside the "Development" toolbelt-check block (tests/fm-watch-triage.test.sh and tests/fm-daemon.test.sh).
      Both sides' descriptions were accurate for the merged test files (the fork's herdr-semantic-stale-dedup coverage and upstream's fm-afk-start daemon-lock-lifecycle coverage both live in the auto-merged test files), so both clauses were combined into one line each rather than picking a side.
    • docs/configuration.md: the conflict was in the ## Environment variables reference block.
      Upstream's fix: split X-mode replies by platform (#369) renamed/retermed the X reply-splitting env vars to be platform-generic (FMX_X_REPLY_MAX_CHARS comment updated from "per-tweet" to "per-message", added FMX_DISCORD_REPLY_MAX_CHARS, FMX_X_THREAD_MAX reworded from "tweets" to "messages") while the fork's block also carried its own fork-only CLICKSTACK_WEBHOOK_* and FM_CLICKSTACK_CONFIRM_TIMEOUT env var entries.
      Resolved by taking upstream's platform-generic env var set in full and keeping the fork's ClickStack entries appended immediately after, matching the platform-aware reply-splitting doc text already merged in cleanly a few paragraphs above (which already referenced FMX_DISCORD_REPLY_MAX_CHARS).
  • Everything else in the merge (harness-aware supervision, fm-send strict-resolution, stow inspect-then-update, AFK-via-herdr-supervisors, fleet snapshot/view commands) auto-merged cleanly with no fork-side edits to reconcile.

Testing

  • shellcheck bin/*.sh bin/backends/*.sh tests/*.sh - clean.
  • Full tests/*.test.sh suite (56 files) - all green.
    One test (tests/fm-session-start.test.sh's new pi-harness-detection assertions from upstream's harness-aware-supervision feature) needed CLAUDECODE unset in the shell to pass; that assertion's harness auto-detection (bin/fm-harness.sh's detect_own) short-circuits to claude whenever CLAUDECODE=1 is ambient, which is true in this validating agent's own session but not in a normal user/CI shell.
    Confirmed this is pre-existing on pristine, unmerged origin/main too (identical failure, same root cause) - not a regression from this merge.
Full narrative / original brief

Catch the Bre77 fork up with its upstream (kunchenguid/firstmate) again.
Seven upstream commits landed after the previous catch-up (PR #9).
Merging upstream into the fork main conflicted on CONTRIBUTING.md and docs/configuration.md; both were resolved by integrating both sides rather than picking one, preserving all fork-only content (ClickStack webhook docs, fork-specific backend/config wiring) alongside upstream's changes.
Delivered as a fork-only PR into Bre77/firstmate:main.

kunchenguid and others added 8 commits July 8, 2026 09:27
* Add fleet snapshot and view

* no-mistakes(review): Fix fleet snapshot parsing and overrides

* no-mistakes(review): Fix secondmate fleet rendering

* no-mistakes(review): Fix backlog title and completion parsing

* no-mistakes(review): Include durable scout reports

* no-mistakes(review): Fix fleet snapshot edge cases

* no-mistakes(review): Captain: gate fleet hints on current state

* no-mistakes(review): Captain: parse bracketed Done PR artifacts

* no-mistakes(document): Sync fleet snapshot docs
* Make fm-send fail loudly on unresolved targets

* no-mistakes(review): Document fm-send FM_HOME contract

* Fix fm-send readiness docs and backend send path

* Fix fm-send docs for cmux and X skill metadata

* Make gotmp teardown test home-explicit

* Scope watcher warning wording to fm-send

* Fix fm-send review findings

* Verify explicit tmux targets before sending

* Isolate turnend guard test home

* no-mistakes(document): Documented fm-send FM_HOME/backend guard additions missing from doc inventories

---------

Co-authored-by: mielyemitchell <249051873+mielyemitchell@users.noreply.github.com>
* fix afk codex ghost composer delivery

* no-mistakes(review): Harden AFK startup flag writes

* no-mistakes(review): Harden AFK daemon liveness checks

* no-mistakes(document): Sync AFK herdr docs

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes
* Add harness-aware supervision

* no-mistakes(review): Captain, harden watcher supervision regressions

* no-mistakes(review): Captain, harden watcher supervision cadence

* no-mistakes(review): Harden watcher supervision ownership

* no-mistakes(review): Captain, harden Pi extension marker

* no-mistakes(review): Captain, harden Pi supervision restart checks

* no-mistakes(review): Harden watcher ownership checks

* no-mistakes(review): Captain, harden Pi supervision loading

* no-mistakes(review): Captain, require Pi guard extension loading

* no-mistakes(review): Captain, harden watcher supervision recovery

* no-mistakes(test): Fix fm-send baseline log filtering

* no-mistakes(document): Sync harness supervision docs

* no-mistakes: apply CI fixes
* fix: make x replies split by platform

* no-mistakes(review): Captain: preserve Discord recovery relink context

* no-mistakes(test): Captain: keep split markers outside fences

* no-mistakes(document): Sync X-mode reply docs
* docs: make stow inspect-then-update

* no-mistakes(review): Remove unsupported archive-body guidance

* no-mistakes(review): Clarify stow read-before-write exception

* no-mistakes(test): Require archive-body for stow task notes

* no-mistakes(document): Sync stow memory docs

* no-mistakes(lint): Silence ShellCheck source warning
…d#375)

* fix: attach-and-wait when arm finds a healthy watcher

Grok and Claude re-arm after every turn with work in flight. When a
watcher was already healthy, fm-watch-arm exited immediately with
watcher: healthy, which completed the harness background task and
injected an empty false wake.

Attach to the live identity-matched holder instead, stay until that
cycle ends, then exit 0 so notify fires for a real end-of-cycle. The
peer-startup-race path uses the same contract. --restart and the
started path are unchanged.

* no-mistakes(review): Gate restart watcher peer attach

* no-mistakes(document): Sync watcher arm docs
…ate-r8

# Conflicts:
#	CONTRIBUTING.md
#	docs/configuration.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12ae379d38

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const combined = `${stdout}\n${stderr}`;
const reason = combined.split(/\r?\n/).find((line) => /^(signal:|stale:|check:|heartbeat($|:))/.test(line));
if (reason) return reason;
if (/^watcher: healthy/m.test(combined)) return "";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Surface healthy restart peers instead of dropping them

When the captain is using an OpenCode primary and fm-watch-arm.sh --restart finds a TERM-resistant or otherwise unowned watcher still healthy, this branch discards the watcher: healthy result and the plugin sends no prompt. The turn-end guard then sees the same fresh watcher lock and exits, even though that watcher is not attached to the OpenCode plugin and may not wake the TUI when it completes, leaving supervision silently dependent on an orphaned peer; treat this as a failure/external-owner prompt like the Pi path instead of returning an empty reason.

Useful? React with 👍 / 👎.

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