Skip to content

fix(readiness): resolve 7 distinct issues #45-#51 - #52

Open
adiled wants to merge 1 commit into
mainfrom
fix/readiness-7-issues
Open

fix(readiness): resolve 7 distinct issues #45-#51#52
adiled wants to merge 1 commit into
mainfrom
fix/readiness-7-issues

Conversation

@adiled

@adiled adiled commented Sep 8, 2026

Copy link
Copy Markdown
Owner

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>.ready when 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_gate now runs the shared healthcheck_to_cmd(), so http(s)://... becomes curl -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 keeps BindsTo= 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's services_needing_ready_gates also gates REQUIRES deps lacking a healthcheck.

#49 — Inconsistent READINESS_TIMEOUT defaults
Unified to the spec's 90s (systemd was 120s).

#50 — parse_duration_secs accepts unitless integers
Now rejects bare integers, matching grammar duration ::= integer ( 's' | 'm' ).

#51 — unreachable unwrap_or("true") fallback
generate_ready_gate now expects 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.

- #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
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