feat: show active Firstmate supervision in Herdr#729
Open
jjames27th-eng wants to merge 9 commits into
Open
Conversation
5 tasks
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
Make Firstmate's active supervision truthfully visible in Herdr as 'idle · supervised' while preserving the real idle agent state, exactly one live supervision cycle, and Pi/OpenCode wake continuity. Use display-only Herdr metadata published by the singleton supervision owner with safe bounded refresh and cleanup; never alter or test against Herdr's default session, and use the named non-default fm-herdr-lab helper. Include documentation, deterministic regressions, and isolated real-Herdr 0.7.3 smoke coverage. Preserve all pipeline-applied safety and test-fixture fixes already on this branch, open a PR through the approved public fork, drive CI green, and do not merge.
What Changed
idle · supervisedwithout changing the agent's real idle state, with periodic refresh, clean-exit cleanup, and TTL expiry.Risk Assessment
✅ Low: Captain, the change is well-bounded, preserves truthful idle state and singleton supervision ownership, and satisfies the required Herdr isolation and cleanup constraints.
Testing
The reported baseline and post-fix full suite passed; ten repeated watcher-lock runs disconfirmed both synchronization races, while deterministic tests plus isolated Herdr 0.7.3 smoke and manual state reads proved idle to
idle · supervisedto idle with clean exit and crash-TTL cleanup; no screenshot was captured because the isolated test does not launch Herdr's interactive dashboard, so the exact backing state was recorded from realherdr agent getresponses instead.Evidence: Real Herdr state transition
Herdr version: 0.7.3 Session: fm-lab-visible-evidence-28594-19797 (named non-default lab) Baseline: {"agent_status":"idle","custom_status":null,"state_labels":null} Supervised: {"agent_status":"idle","custom_status":"supervised","state_labels":{"idle":"idle · supervised"}} Cleared: {"agent_status":"idle","custom_status":null,"state_labels":null}Evidence: Ten repeated watcher-lock passes
Evidence: Isolated real-Herdr smoke
ok - real Herdr 0.7.3 keeps Pi idle with clean clearing and crash TTL cleanupPipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 1 issue found → auto-fixed (2) ✅
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"🔧 Fix: Stabilize watcher and terminal readiness tests
1 error still open:
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"🔧 Fix: Stabilize watcher peer stand-down synchronization
✅ Re-checked - no issues remain.
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"Configured baseline command was already reported successful: `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"for i in {1..10}; do bash tests/fm-watcher-lock.test.sh; donebash tests/fm-supervision-visibility.test.shFM_SUPERVISION_VISIBILITY_HERDR_SMOKE=1 HERDR_LAB_HELPER="$PWD/bin/fm-herdr-lab.sh" bash tests/fm-supervision-visibility-herdr-smoke.test.shGuardedfm-herdr-lab.shmanual lifecycle: provision named non-default lab, report idle Pi, publish supervision metadata, read state, clear metadata, read state, and teardownPost-fix full suite: `command -v tmux >/dev/null; tmux -V; rc=0; for t in tests/*.test.sh; do bash "$t" || rc=1; done; exit "$rc"Cleanup checks:git status --short,git rev-parse HEAD, andherdr session list --jsonfiltered for the default and remainingfm-lab-*sessions✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.