Repository navigation
Run the command health check in restart, rollback and health (S-009-10) - #185
Merged
shipmill-romamo[bot] merged 2 commits intoOct 30, 2026
Merged
Conversation
health_gate.yml, which restart, rollback and health already end on, now includes the deploy's own command_health_check.yml for a type: command check, so all three run it with the same transient unit, user, working directory, EnvironmentFile=, timeout, attempts and no_log redaction as the deploy gate. The include applies become: true, since systemd-run --uid needs root and the health play does not take it for http and none checks. health reports unhealthy when the check exits non-zero or times out; none of the three writes a receipt, and a failed check after restart or rollback restores nothing, as the spec says. http and none run the same tasks as before. The refusals added in #161 are gone, and spec 009 is built. Fixes #166 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shipmill-romamo
Bot
deleted the
feat/166-command-check-restart-rollback-health
branch
October 30, 2026 16:41
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.
Summary
restart,rollbackandhealthnow run a component'stype: commandhealth check instead of refusing it.health_gate.yml, which all three already end on, includes deploy's owncommand_health_check.yml, so the check runs with the same transient unitcloudfall-health-<component>, user, working directory,EnvironmentFile=-line,RuntimeMaxSec=, attempts, relative-path resolution andno_logredaction as ondeploy(S-009-2/3/7/8/9). The three "Refuse a command health check this engine does not run yet" tasks are gone.healthreportsunhealthy(exit 1) when the check exits non-zero or times out; itsdetailcarries the role's failure line (command, exit code or timeout, attempts, thejournalctlhint), never the command's output. Output schema unchangedrelease_receipt.ymlis reached only from the deploy'smain.ymlrestartorrollbackwithout restoring anything, as the spec's Behaviour says ("A rollback still does not restore anything when its gate fails") and as anhttpcheck does todaybecome: true:systemd-run --uidneeds root, andhealth.yml's play isbecome: false(itshttpandnoneprobes don't need it).restartandrollbackplays already become root, so nothing changes therehttpandnonecomponents run the same tasks as before in all three commands (S-009-12)lifecycle.pyor the rollback plan, so open Pause migrate for a release approval and let rollback run without one (S-008-13, S-008-14) #182 rebases cleanlychangelog.d/161-command-health-check-schema.mdandchangelog.d/164-command-health-gate.mddrop only their note thatrestart,rollbackandhealthrefuse a command check, so the three fragments read consistently in one releaseThis is S-009's last build issue: the spec is set to
status: builtwith a Verification line per criterion.Plan
healthtasks run the command check for real and fail on a non-zero exit,healthreportsunhealthy, restart and rollback reach the same check, no entry point writes a receipt); thenhealth_gate.ymlincludescommand_health_check.ymlfor a command check outside check mode, and the three refusals go; then the docs, the spec's Verification andstatus: builttest_s009_10_*in engine/tests/test_command_health_gate.py and engine/tests/test_deploy_role.py (S-009-10);test_s009_12_restart_rollback_and_health_keep_their_http_and_none_gateswith the existing S-009-12 tests;specs.py coverage --spec 009lists every criterionTest notes
test_s009_10_*tests run the role'shealthandhealth_gatetask files for real underansible-playbookon the controller with the existingsystemd-runstand-in (which, unlike the real one, passes output on, so a leaked marker would show): pass, exit 3 over 2 attempts, timeout; the argv matches deploy's; no receipt directory appears; the marker stays out of the output. Two more runcloudfall.lifecycle.healthwith its playbook step running those tasks and checkstatus: unhealthy/ok. Before the change the real-run andhealthtests fail (the refusal fires, orhealth_gateruns no check)test_the_engine_refuses_a_command_check_it_does_not_run_yetis replaced bytest_s009_10_no_entry_point_refuses_a_command_checkuv run ruff check .,uv run mypy,ANSIBLE_CONFIG=engine/ansible/ansible.cfg uv run ansible-lint engine/ansible(as CI sets it),uv run pytest engine/tests sdk/tests/test_lifecycle.py sdk/tests/test_command_health_check.py(395 passed, 1 skipped),specs.py checkandspecs.py coverage --spec 009. The full suite is left to CIsystemd-run,becomeon thehealthplay)Fixes #166
🤖 Generated with Claude Code