provision: health-gate-honesty — a service with no declared check never activates on nothing #217

Closed
opened 2026-07-31 02:38:38 +00:00 by ben · 2 comments
Owner

Parent

Provisioning spec #17. Contract-gap sweep 2026-07-30 (provisioning / brand / URL walkthrough), filed on Ben's request.

What's true today

  • runCheck (internal/provision/health.go) treats a service that declares no health check as a vacuous pass: the service goes active, Healthy() reads true for it, and PortalLinks.ServiceUp publishes it — on nothing. The code's own caveat says "every v1 catalogue port ships one (ADR 0062)", but only files actually registers a check (#204); the other catalogue services would today activate unverified.
  • This violates ADR 0061's binding invariant — "a service that has not passed its health check contributes no coverage, anywhere" — through the back door: a check that never ran is not a pass. It is the same shape ADR 0100 banned (a fabricated success), and the same family as ADR 0071 (absence of signal is never silently healthy).

What to build

The no-check outcome goes honest. A service with no registered check must not read as a real health pass: no portal publication, no Healthy() == true, and a named state on the deploy surface. Whether that means withholding activation entirely (fail-loud, ADR 0100) or a first-class "active — unverified" state is a ruling; ask before building. files with its real check is unchanged; the resting composition is unchanged.

Acceptance criteria

  • Given a selected service with no registered check, When its deploy completes, Then it does not read as a passed health check — Healthy() stays false, ServiceUp is never called, and the state is named on the surface
  • Given files with its registered check (#204), When the deploy completes, Then behaviour is unchanged — a real pass activates, a real failure lands P4-S5x
  • Given the resting composition, Then unchanged honest resting (ADR 0100)

Task manifest

task: provision:health-gate-honesty
implements_seam: "the per-service health gate (ADR 0061/0062) — no vacuous pass"
interface: "activation and coverage never rest on a check that did not run"
seam: "provision health tests grown over the no-check path; the composition seam test extended"
acceptance:
  - given: a service with no declared check; when: deploy completes; then: it never reads as a health pass — coverage, portal and state all say so
depends_on: []
out_of_scope: [writing the missing per-service checks themselves (the port tickets), monitoring's re-run behaviour]
needs_human_decision: ["whether no-check withholds activation entirely or lands a named 'active — unverified' state (ADR 0061/0100)"]

Blocks

Nothing directly — but every future catalogue-port ticket lands against whichever ruling this ticket fixes.

## Parent Provisioning spec #17. Contract-gap sweep 2026-07-30 (provisioning / brand / URL walkthrough), filed on Ben's request. ## What's true today - `runCheck` (`internal/provision/health.go`) treats a service that declares **no** health check as a **vacuous pass**: the service goes `active`, `Healthy()` reads true for it, and `PortalLinks.ServiceUp` publishes it — on nothing. The code's own caveat says "every v1 catalogue port ships one (ADR 0062)", but only `files` actually registers a check (#204); the other catalogue services would today activate unverified. - This violates ADR 0061's binding invariant — "a service that has not passed its health check contributes no coverage, anywhere" — through the back door: a check that never ran is not a pass. It is the same shape ADR 0100 banned (a fabricated success), and the same family as ADR 0071 (absence of signal is never silently healthy). ## What to build The no-check outcome goes honest. A service with no registered check must not read as a real health pass: no portal publication, no `Healthy() == true`, and a named state on the deploy surface. Whether that means withholding activation entirely (fail-loud, ADR 0100) or a first-class "active — unverified" state is a ruling; ask before building. `files` with its real check is unchanged; the resting composition is unchanged. ## Acceptance criteria - [ ] Given a selected service with no registered check, When its deploy completes, Then it does not read as a passed health check — `Healthy()` stays false, `ServiceUp` is never called, and the state is named on the surface - [ ] Given `files` with its registered check (#204), When the deploy completes, Then behaviour is unchanged — a real pass activates, a real failure lands P4-S5x - [ ] Given the resting composition, Then unchanged honest resting (ADR 0100) ## Task manifest ```yaml task: provision:health-gate-honesty implements_seam: "the per-service health gate (ADR 0061/0062) — no vacuous pass" interface: "activation and coverage never rest on a check that did not run" seam: "provision health tests grown over the no-check path; the composition seam test extended" acceptance: - given: a service with no declared check; when: deploy completes; then: it never reads as a health pass — coverage, portal and state all say so depends_on: [] out_of_scope: [writing the missing per-service checks themselves (the port tickets), monitoring's re-run behaviour] needs_human_decision: ["whether no-check withholds activation entirely or lands a named 'active — unverified' state (ADR 0061/0100)"] ``` ## Blocks Nothing directly — but every future catalogue-port ticket lands against whichever ruling this ticket fixes.
Author
Owner

Ruled by Ben, 2026-07-30 — withhold activation. A service with no declared check does not go active: the deploy lands it in the named-fault resting state (P4-S5x family, summary "no health check declared"), Healthy() stays false, ServiceUp is never called. Retry re-reads the registry so a later-registered check can pass it without redeploying. Recorded as ADR 0112 (docs/adr/0112-design-no-declared-check-no-activation.md). The needs_human_decision is resolved — build against the ADR.

**Ruled by Ben, 2026-07-30 — withhold activation.** A service with no declared check does not go active: the deploy lands it in the named-fault resting state (P4-S5x family, summary "no health check declared"), `Healthy()` stays false, `ServiceUp` is never called. Retry re-reads the registry so a later-registered check can pass it without redeploying. Recorded as **ADR 0112** (`docs/adr/0112-design-no-declared-check-no-activation.md`). The `needs_human_decision` is resolved — build against the ADR.
Author
Owner

Done — landed on main as a070812. Built against Ben's ruling (ADR 0112: withhold activation).

The fix: runCheck's no-check branch (internal/provision/health.go) no longer sets Healthy = true. A service whose port declares no check now lands the named fault "no health check declared", Healthy() stays false, ServiceUp is never called, and the device rests in the existing named-fault state (P4-S5x). Retry re-reads the registry, so a later-registered catalogue-port check (ADR 0062) passes the service without a redeploy.

AC coverage:

  • AC1 (no-check → not a pass, named on the surface): internal/provision/health_test.go TestDeploy_AServiceWithNoDeclaredCheckDoesNotActivateOnNothing — state = active — a service failed, Healthy() false, portal published only the really-passed service, Retry offered; a late-registered check + Retry then activates it.
  • AC2 (files #204 unchanged): the #204 seam (provision_brand_health_test.go) is green — a real pass activates, a maintenance probe withholds; and its composition seam is extended with a no-check service (chat) withholding in the whole composition.
  • AC3 (resting unchanged): resting composition test unchanged.

Also corrected the stale cross-references that cited "provisioning's vacuous pass": monitor's reRunCheck comment (behaviour unchanged, ADR 0071), and the controlapi P4 API seam (now runs real passing checks rather than leaning on the vacuous pass). Note: ADR 0112 was landed by the rulings commit 2f9b93c (identical ruling) — the rebase took that authoritative copy.

No Go toolchain in the sandbox (#198); verified by close review over the whole affected set (the provision deploy/health path + its two composition seams).

Done — landed on `main` as `a070812`. Built against Ben's ruling (ADR 0112: withhold activation). **The fix:** `runCheck`'s no-check branch (`internal/provision/health.go`) no longer sets `Healthy = true`. A service whose port declares no check now lands the named fault `"no health check declared"`, `Healthy()` stays false, `ServiceUp` is never called, and the device rests in the existing named-fault state (P4-S5x). Retry re-reads the registry, so a later-registered catalogue-port check (ADR 0062) passes the service without a redeploy. **AC coverage:** - AC1 (no-check → not a pass, named on the surface): `internal/provision/health_test.go` `TestDeploy_AServiceWithNoDeclaredCheckDoesNotActivateOnNothing` — state = `active — a service failed`, `Healthy()` false, portal published only the really-passed service, Retry offered; a late-registered check + Retry then activates it. - AC2 (`files` #204 unchanged): the #204 seam (`provision_brand_health_test.go`) is green — a real pass activates, a maintenance probe withholds; and its composition seam is extended with a no-check service (chat) withholding in the whole composition. - AC3 (resting unchanged): resting composition test unchanged. **Also corrected** the stale cross-references that cited "provisioning's vacuous pass": monitor's `reRunCheck` comment (behaviour unchanged, ADR 0071), and the controlapi P4 API seam (now runs real passing checks rather than leaning on the vacuous pass). Note: ADR 0112 was landed by the rulings commit `2f9b93c` (identical ruling) — the rebase took that authoritative copy. No Go toolchain in the sandbox (#198); verified by close review over the whole affected set (the provision deploy/health path + its two composition seams).
ben closed this issue 2026-07-31 03:37:13 +00:00
Sign in to join this conversation.
No milestone
No project
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
Matou/idss#217
No description provided.