Skip to content

fix: prevent Herdr capability probe SIGPIPE#635

Open
dimajarkov wants to merge 3 commits into
kunchenguid:mainfrom
dimajarkov:fm/fix-herdr-cap-pipe-q2
Open

fix: prevent Herdr capability probe SIGPIPE#635
dimajarkov wants to merge 3 commits into
kunchenguid:mainfrom
dimajarkov:fm/fix-herdr-cap-pipe-q2

Conversation

@dimajarkov

Copy link
Copy Markdown

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

  • Capture the Herdr API schema once and check both required event markers without an early-closing pipeline, preventing SIGPIPE failures under pipefail while preserving fail-closed behavior.
  • Add large-schema regression coverage for both present and missing capability markers, including verification that the schema is loaded exactly once, and repair backend test fixture dependencies.
  • Document the capability-probe behavior and stabilize related guard tests with explicit config isolation and suppressed Node warnings.

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.

  • Outcome: ⚠️ 1 error across 4 runs (1h8m56s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 error
  • 🚨 tests failed with exit code 1
  • 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:

  • 🚨 tests failed with exit code 1
  • 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:

  • 🚨 tests failed with exit code 1
  • 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:

  • 🚨 tests failed with exit code 1
  • 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.

@dimajarkov
dimajarkov force-pushed the fm/fix-herdr-cap-pipe-q2 branch from 5395687 to bcee948 Compare July 16, 2026 10:59
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.

1 participant