This repository was archived by the owner on Aug 25, 2026. It is now read-only.
test(backend): add opt-in Herdr real-lab E2E coverage - #74
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
Add opt-in real Herdr lab e2e: workspace-per-home, respawn-idem, prune-safety, secondmate marker. Never touch default session. Hermetic suite green without live e2e.
What Changed
fm-lab-*sessions and added assertions that the livedefaultsession remains untouched.FM_HERDR_E2E=1coverage and the standalone marker-test opt-in; the no-mistakes pipeline completed successfully after review and lint auto-fixes.Risk Assessment
✅ Low: The follow-up hardens cleanup status propagation, explicit lab-session version checks, duplicate-submit detection, and exact workspace inventories while preserving opt-in execution and default-session isolation.
Testing
The hermetic suite passed, and the normal-clone live run demonstrated workspace-per-home isolation, respawn idempotency, prune safety, and exactly-once marked/unmarked secondmate messaging. Evidence is stored under
/tmp/no-mistakes-evidence/01KXXH5VFD15RHKF9KS74JM8CE/.Evidence: Acceptance summary
Evidence: Full live Herdr suite transcript
Evidence: Post-test Herdr session inventory
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 5 issues found → auto-fixed ✅
tests/fm-backend-herdr-prune-safety-e2e.test.sh:45- The cleanup ignores a failedherdr_safe_stop_and_delete; the followingrm -rfreturns success, so a tripwire failure can leave the lab session behind while the test still passes. Propagate the teardown status and fail the test when cleanup safety verification fails. The same pattern exists in the respawn and workspace-per-home suites.tests/fm-send-secondmate-marker-herdr-e2e.test.sh:45-failprints an error before callingcleanup_all, butcleanup_allcaptures that successful print status and exits with 0, so any assertion failure in this suite is reported as a passing process. Capture the failure status before cleanup or pass it explicitly.tests/fm-backend-herdr-prune-safety-e2e.test.sh:55- The required criterion is “Never touch default session.” This no-argument call invokesfm_backend_herdr_version_check, whose no-session branch runsherdr status --jsonagainst the default session; the respawn suite has the same call. Confirm that read-only default-session access is allowed, or pass the isolated$SESSIONexplicitly.tests/fm-send-secondmate-marker-herdr-e2e.test.sh:130- The marker assertion checks only the first matching log line, so a regression that submits the same marked request multiple times still passes. Assert that exactly one matching submission exists and that no additional submissions were recorded.tests/fm-backend-herdr-workspace-per-home-e2e.test.sh:196- The workspace-isolation checks only require expected labels and exclude three known labels; they do not reject duplicate or unrelated tabs. A leaked or misrouted task could remain while the test passes. Compare the complete tab-label sets/counts for both workspaces.🔧 Fix: Hardened Herdr E2E cleanup, isolation, and inventory assertions
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash bin/fm-run-behavior-tests.shFM_TEST_JOBS=1 bash bin/fm-run-behavior-tests.shenv -u NO_MISTAKES_GATE FM_HERDR_E2E=1 FM_TEST_JOBS=1 bash bin/fm-run-behavior-tests.shRead-onlyherdr session list --jsonbefore and after testinggit status --short✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix: Captain: quote Herdr lab ID to clear SC2100
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.