fix: prevent Herdr capability probe SIGPIPE#635
Open
dimajarkov wants to merge 3 commits into
Open
Conversation
dimajarkov
force-pushed
the
fm/fix-herdr-cap-pipe-q2
branch
from
July 16, 2026 10:59
5395687 to
bcee948
Compare
dimajarkov
force-pushed
the
fm/fix-herdr-cap-pipe-q2
branch
from
July 16, 2026 13:26
c71ab9a to
ae0bf10
Compare
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
Fix the repeated Pi supervision failure where fm_backend_herdr_events_capable scans the roughly 220 KB Herdr API schema through grep -Fq under pipefail, causing the upstream printf to receive SIGPIPE and making fm-watch-arm.sh exit 143 with broken-pipe noise. Preserve both required capability markers, load the schema exactly once, fail closed when either marker is missing, and add colocated large-schema regression coverage for positive and negative cases. Reproduce through the isolated named Herdr lab contract, keep the implementation minimal in the owning Herdr backend, preserve one-owner contracts, and validate focused tests, repository lint, and relevant watcher/backend/Pi suites. During validation, also repair the clean-HEAD X-mode cadence assertion if it proves to be a real repository failure; diagnosis established it was a non-hermetic test inheriting split FM_HOME, so the fixture explicitly pins FM_CONFIG_OVERRIDE without changing production behavior.
What Changed
pipefailwhile preserving fail-closed behavior.Risk Assessment
✅ Low: Captain, the change is narrowly scoped, preserves fail-closed capability detection, and adds focused regression coverage without introducing material risk.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - 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"🔧 Fix: Captain, repair fixture dependencies and suppress Node warnings
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: Captain, avoid Herdr capability probe SIGPIPE
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: Captain, prevent Herdr capability probe SIGPIPE
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"✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.