[shared] fix(logs): keep quiet_run green when the command kills the heartbeat #77

Merged
cjournois merged 1 commit from fix/quiet-run-lost-heartbeat into main 2026-10-28 16:32:54 +00:00
Collaborator

Since 5.3.0, ergon-device's tests pass but its "Run tests" step exits 1 with only Terminated in the log: its suite runs pkill -f 'sleep 30', which also kills the heartbeat's sleep 300, and kill "$beat" then fails under set -e. Any consumer whose tests reap stray sleeps hits the same; every repo calling unit.yml, quality.yml or release.yml uses quiet_run.

Verified: just lint test passes; the new ci-error.bats case fails without the fix.
Run: https://git.journois.com/project/ergon/actions/runs/288

Since 5.3.0, ergon-device's tests pass but its "Run tests" step exits 1 with only `Terminated` in the log: its suite runs `pkill -f 'sleep 30'`, which also kills the heartbeat's `sleep 300`, and `kill "$beat"` then fails under `set -e`. Any consumer whose tests reap stray sleeps hits the same; every repo calling unit.yml, quality.yml or release.yml uses quiet_run. Verified: `just lint test` passes; the new ci-error.bats case fails without the fix. Run: https://git.journois.com/project/ergon/actions/runs/288
fix(logs): keep quiet_run green when the command kills the heartbeat
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 5m42s
abb787c28e
ergon's suite runs `pkill -f 'sleep 30'`, which also matched the heartbeat's `sleep 300`:
the beat loop ended, `kill "$beat"` then failed under `set -e`, and run-tests.sh exited 1
after the tests had passed (ergon#53, run 288). The beat now outlives a killed sleep and
stopping it never fails the step. Confidence: high, regression test fails before the fix.
Author
Collaborator

Addressed:

  • scripts/ci-error.sh:30: the beat keeps going only when a signal killed its sleep (|| [ $? -gt 128 ] || break), so a bad CI_HEARTBEAT ends it instead of spinning.
  • scripts/ci-error.sh:32: the beat's stderr goes to /dev/null, which drops the bare Terminated line seen in ergon's log.
  • tests/ci-error.bats:78: asserts the heartbeat line after the kill, so the test cannot pass without actually killing the sleep; runs with 3>&-.
  • tests/ci-error.bats: new case, a CI_HEARTBEAT that sleep rejects prints one line.
Addressed: - scripts/ci-error.sh:30: the beat keeps going only when a signal killed its sleep (`|| [ $? -gt 128 ] || break`), so a bad CI_HEARTBEAT ends it instead of spinning. - scripts/ci-error.sh:32: the beat's stderr goes to /dev/null, which drops the bare `Terminated` line seen in ergon's log. - tests/ci-error.bats:78: asserts the heartbeat line after the kill, so the test cannot pass without actually killing the sleep; runs with `3>&-`. - tests/ci-error.bats: new case, a CI_HEARTBEAT that sleep rejects prints one line.
bot-claude force-pushed fix/quiet-run-lost-heartbeat from abb787c28e
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 5m42s
to df6460dac3
All checks were successful
ci: reusable-pipeline / CI Pipeline (pull_request) Successful in 6m35s
ci: reusable-pipeline / CI Pipeline (push) Successful in 5m55s
2026-10-28 15:55:54 +00:00
Compare
bot-claude changed title from WIP: [shared] fix(logs): keep quiet_run green when the command kills the heartbeat to [shared] fix(logs): keep quiet_run green when the command kills the heartbeat 2026-10-28 16:30:42 +00:00
cjournois deleted branch fix/quiet-run-lost-heartbeat 2026-10-28 16:32:54 +00:00
Sign in to join this conversation.
No reviewers
No labels
needs-human
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cjournois/reusable-pipeline!77
No description provided.