fix(readiness): resolve 7 distinct issues #45-#51 - #52
Open
adiled wants to merge 1 commit into
Open
Conversation
- #45 ONESHOT ready marker: oneshot supervisor writes <state>/ready/<label>.ready on success; REQUIRES deps poll it for the started/completion signal - #46 HTTP(S) healthcheck → curl in systemd ready gates (not raw URL to bash) - #47 AFTER proceed-on-timeout: timed-out ready gate exits 0 so AFTER dependents are not blocked (REQUIRES keeps BindsTo for hard failure) - #48 REQUIRES without HEALTHCHECK now gets a gate/enforcement (launchd/orchdi poll marker-or-up; systemd gates REQUIRES deps) while AFTER stays ordering-only - #49 READINESS_TIMEOUT default unified to spec's 90s (was 120s in systemd) - #50 parse_duration_secs rejects unitless integers (grammar requires s|m suffix) - #51 remove unreachable unwrap_or('true') fallback in generate_ready_gate
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.
Fixes the 7 distinct readiness issues (each duplicated 6x across #38-#44 and #45-#51) on branch
fix/readiness-7-issues.#45 — Readiness model (root cause): HEALTHCHECK is the only signal; ONESHOT started/completion unimplemented
The supervisor (
orchdi) now writes a ready marker at<state_dir>/ready/<label>.readywhen a oneshot service exits 0 (and removes it on failure). REQUIRES dependents poll that marker, restoring the spec's "started / completion" signal alongside healthcheck.#46 — systemd ready-gate: HTTP(S) HEALTHCHECK not converted to curl
generate_ready_gatenow runs the sharedhealthcheck_to_cmd(), sohttp(s)://...becomescurl -sf '...'instead of an invalid raw bash target.#47 — systemd: AFTER 'proceed on timeout' lost
The ready-gate poll loop now ends with
exit 0, so a timed-out gate no longer blocks AFTER dependents. REQUIRES keepsBindsTo=for hard-failure semantics.#48 — REQUIRES dep without HEALTHCHECK gets no gate/enforcement
build_dep_gates(launchd/orchdi) now always enforces REQUIRES — polling the oneshot marker, or process-up for non-oneshot — while AFTER stays ordering-only. systemd'sservices_needing_ready_gatesalso gates REQUIRES deps lacking a healthcheck.#49 — Inconsistent READINESS_TIMEOUT defaults
Unified to the spec's
90s(systemd was120s).#50 — parse_duration_secs accepts unitless integers
Now rejects bare integers, matching grammar
duration ::= integer ( 's' | 'm' ).#51 — unreachable
unwrap_or("true")fallbackgenerate_ready_gatenowexpects a healthcheck (it's only called for services that have one), removing the dead fallback.All 111 tests pass. Files:
src/orchdi.rs,src/platform/systemd/generate.rs,src/platform/launchd/generate.rs,src/platform/launchd/mod.rs,src/platform/orchdi/mod.rs,src/orchard.rs.