This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Repository navigation
feat: support Herdr AFK supervisor injection - #72
Merged
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Make AFK/supervisor injection and supervisor target resolution work when firstmate or its supervisor pane runs on Herdr, while keeping tmux as the default path unchanged. Adapt the Herdr owner patterns onto the JT HEAD without wholesale-merging owner main; support only tmux|herdr supervisor backends, use Herdr pane send primitives when selected, preserve the secondmate marker path, refuse unsupported backends, and include unit tests, a guarded fm-lab-* Herdr e2e, and brief configuration/Herdr/AFK documentation. Never touch the captain's default Herdr session.
What Changed
tmux|herdrsupervisor backend selection with backend-aware target discovery, endpoint resolution, busy/composer checks, and Herdr-native send primitives while preserving tmux defaults.fm-lab-*Herdr end-to-end coverage, plus focused AFK, configuration, backend, architecture, and protocol documentation.Risk Assessment
Testing
The supplied baseline and a fresh full behavior run passed; focused tmux/Herdr unit tests, backend refusal checks, marker coverage in the cloned harness, and the guarded real Herdr AFK injection all passed, with default-session safety verified and no UI screenshot applicable to this CLI/backend change.
Evidence: Herdr lab safety evidence
default_status_before_rc=0 herdr_afk_e2e_rc=0 default_status_after_rc=0 default_session_status_unchanged=true ok - Herdr AFK injection uses the selected lab supervisor pane and send primitivesEvidence: Full behavior test transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
bin/fm-supervisor-target-lib.sh:22- Required: “Make AFK/supervisor injection and supervisor target resolution work when firstmate or its supervisor pane runs on Herdr.” WithFM_SUPERVISOR_BACKEND=herdrand inheritedTMUX_PANE, the resolver still selects the tmux target, producing an invalid Herdr target. Make target discovery backend-aware or fail clearly on the mismatch.bin/fm-supervise-daemon.sh:472- Herdr reportsidleas a conclusive non-busy state, but this wrapper only returns early forbusyand then scans captured output for stale busy-footer text. That can defer every AFK injection after a completed turn. Return immediately foridle; use capture fallback only forunknown.bin/fm-supervise-daemon.sh:136- Required Herdr AFK supervision is incomplete: the new supported-backend path still uses tmux-onlywindow_for_task/pane checks during stale and paused rechecks, so Herdr worker panes can have their persistence markers discarded without wedge or pause escalation. Resolve task endpoints through recorded backend metadata.🔧 Fix: Fixed Herdr target resolution and backend-aware AFK rechecks
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash bin/fm-run-behavior-tests.shbash bin/fm-run-behavior-tests.shbash tests/fm-supervisor-target.test.shbash tests/fm-afk-launch.test.shbash tests/fm-daemon.test.shbash tests/fm-backend-herdr.test.shbash tests/fm-herdr-lab.test.shbash tests/fm-afk-inject-herdr-e2e.test.shherdr status --json --session defaultbefore and after the guarded e2e, with byte-for-byte comparisongit status --short --branchand untracked-file check✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.