mail: the operator readiness gate — S1/S1x in the P4 deploy gate (#318 split, Part 1) #321

Closed
opened 2026-08-07 14:08:16 +00:00 by ben · 2 comments
Owner

Parent

Part 1 of the #318 split — Ben ruled 2026-08-07 on the agent's split question (option a): #318 lands the member portal (Part 2); this ticket carries the operator readiness gate on its own.

Design contract: wireframes docs/ux/wireframes/mail/mail-s1-mail-readiness.html + mail-s1x-degraded-named-standing.html, ADRs 0112 family / 0115, ADR 0015 (advice never veto), ADR 0071 (no silently-healthy absence).

What to build

MAIL-S1 / S1x (operator). Wire internal/mailreadiness into the P4 SetupSurface deploy gate:

  • the readiness step pauses the deploy until the health gate resolves (a new gate step, distinct from the functional mailHealthCheck Stalwart /healthz probe already wired at b13fb81);
  • S1 renders the records + preflight poll; S1x renders the named standing state;
  • degraded legs land the named standing state in the dashboard chrome's standing-indicator stack and the Services tab, self-clearing the moment a re-run goes green;
  • monitoring carries the red leg as a standing fault like any other (ADR 0071).

Seam test per provision_brand_health_test.go.

Gate-model shape — RULED (Ben, 2026-08-07): option (ii)

Healthy stays THE gate bit — no change to gate semantics, no new DDR. provision.ServiceHealth (internal/provision/health.go:84-123) gains one optional state string field, empty for every non-mail service, carrying the slug straight from mailreadiness.Readiness.State.

Rationale, as ruled:

  • The three named states (active / records-not-verified / can-receive-cant-send) are already built, tested and JSON-tagged on Readiness.State, with preflight_test.go covering the fold and the records-red-beats-sending-red precedence. Nothing to re-derive.
  • The S1x wireframe keys its rendering off data-status tokens; without a slug the frontend would string-match on prose copy to choose an indicator.
  • Bool-only would put mail on StateServiceFailed, whose contract claims the service "claim[s] no coverage" — untrue in can-receive-cant-send, where receiving genuinely still works. That is exactly the silent misreport ADR 0115 warns against.
  • ServiceHealth already carries operator-facing strings (Failure / NoCoverage / Retry) beside the bool, and StateServiceFailed is already "a first-class state, not a degradation" — the partial-success shape exists; it simply has no name slot. This adds the slot and nothing else.

Additive only: no other service's behaviour changes, and StandingFaults() keeps its current meaning.

Acceptance

The Given/When/Then criteria for S1/S1x live in #229's spec body — they transfer verbatim.

## Parent **Part 1 of the #318 split** — Ben ruled 2026-08-07 on the agent's split question (option **a**): #318 lands the member portal (Part 2); this ticket carries the operator readiness gate on its own. Design contract: wireframes `docs/ux/wireframes/mail/mail-s1-mail-readiness.html` + `mail-s1x-degraded-named-standing.html`, ADRs 0112 family / 0115, ADR 0015 (advice never veto), ADR 0071 (no silently-healthy absence). ## What to build **MAIL-S1 / S1x (operator).** Wire `internal/mailreadiness` into the P4 `SetupSurface` deploy gate: - the readiness step pauses the deploy until the health gate resolves (a **new gate step**, distinct from the functional `mailHealthCheck` Stalwart `/healthz` probe already wired at `b13fb81`); - S1 renders the records + preflight poll; S1x renders the named standing state; - degraded legs land the named standing state in the dashboard chrome's standing-indicator stack **and** the Services tab, self-clearing the moment a re-run goes green; - monitoring carries the red leg as a standing fault like any other (ADR 0071). Seam test per `provision_brand_health_test.go`. ## Gate-model shape — RULED (Ben, 2026-08-07): option (ii) `Healthy` stays **THE gate bit** — no change to gate semantics, no new DDR. `provision.ServiceHealth` (`internal/provision/health.go:84-123`) gains **one optional `state` string field**, empty for every non-mail service, carrying the slug straight from `mailreadiness.Readiness.State`. Rationale, as ruled: - The three named states (`active` / `records-not-verified` / `can-receive-cant-send`) are **already built, tested and JSON-tagged** on `Readiness.State`, with `preflight_test.go` covering the fold and the records-red-beats-sending-red precedence. Nothing to re-derive. - The S1x wireframe keys its rendering off **data-status tokens**; without a slug the frontend would string-match on prose copy to choose an indicator. - Bool-only would put mail on `StateServiceFailed`, whose contract claims the service *"claim[s] no coverage"* — untrue in `can-receive-cant-send`, where receiving genuinely still works. That is exactly the silent misreport ADR 0115 warns against. - `ServiceHealth` already carries operator-facing strings (`Failure` / `NoCoverage` / `Retry`) beside the bool, and `StateServiceFailed` is already *"a first-class state, not a degradation"* — the partial-success shape exists; it simply has no name slot. This adds the slot and nothing else. Additive only: no other service's behaviour changes, and `StandingFaults()` keeps its current meaning. ## Acceptance The Given/When/Then criteria for S1/S1x live in #229's spec body — they transfer verbatim.
Author
Owner

Ben ruled the gate-model shape 2026-08-07: option (ii) — Healthy stays the gate bit, ServiceHealth gains one optional state slug carried from mailreadiness.Readiness.State. Recorded in the body above; no DDR needed (additive field, no gate semantics change).

ready-for-human → ready-for-agent. Nothing else blocks this slice.

Ben ruled the gate-model shape 2026-08-07: **option (ii)** — `Healthy` stays the gate bit, `ServiceHealth` gains one optional `state` slug carried from `mailreadiness.Readiness.State`. Recorded in the body above; **no DDR needed** (additive field, no gate semantics change). `ready-for-human` → `ready-for-agent`. Nothing else blocks this slice.
Author
Owner

Landed in 7e19afc (on origin/main).

Operator mail-readiness gate — MAIL-S1/S1x wired into the P4 deploy gate.

  • Gate model (ruled option ii): provision.ServiceHealth gains one optional state slug carried straight from mailreadiness.Readiness.State (active/records-not-verified/can-receive-cant-send), empty for non-mail services. Healthy stays THE gate bit — no gate-semantics change, no DDR. A degraded readiness never demotes the device (a receiving-but-not-sending mail is not a no-coverage failure); the named state stands and a re-run clears it by itself (RetryService).
  • New distinct gate step (StepMailReadiness) in internal/provision/health.go, run after — never replacing — the functional Stalwart /healthz check (b13fb81). The whole readiness rides Outcome.MailReadiness for the surface.
  • Monitoring (ADR 0071): a degraded leg rides Handoff.MailReadiness and monitoring raises it as a standing warning fault like any other (originMailReadiness, diagnosis-only), self-clearing on a green re-run.
  • Compose: production mailReadinessAdapter runs the real internal/mailreadiness over apex-derived records + the apex address (ADR 0100 — no fake in a shipped path); composeDeps.mailReadiness injects a scripted fold at the seam.
  • Screens (rule 2b): MAIL-S1 (MailReadinessScreen.vue — records + preflight poll) and MAIL-S1x (MailStandingState.vue — named standing state + evidence in the active view) ship as real mounted components on the wireframes' data-field/data-action/data-status contract; SetupSurface routes records-not-verified → S1, otherwise Active (with the S1x block); re-run maps to retryService('mail').

Evidence: control-plane/cmd/control-plane/provision_mail_readiness_test.go (composition seam, extended per provision_brand_health_test.go) proves the fold stands the named state, the device stays active, RetryService clears it, and monitoring raises+clears it. dashboard/tests/unit/provisionMailReadiness.test.ts pins the S1/S1x element contract + re-run routing. go build/vet/test (incl. smoke-mail) + dashboard vitest (980) + eslint + dashboard build all green. Acceptance stories 1/4/5/6/7/8/9 satisfied.

Follow-on note: the chrome standing-indicator-stack + a dedicated Services-tab pill are surfaced via the monitoring standing alert (story 9); a dedicated recovery-style indicator-source entry in NavChrome is a possible follow-on.

Landed in `7e19afc` (on `origin/main`). **Operator mail-readiness gate — MAIL-S1/S1x wired into the P4 deploy gate.** - **Gate model (ruled option ii):** `provision.ServiceHealth` gains one optional `state` slug carried straight from `mailreadiness.Readiness.State` (`active`/`records-not-verified`/`can-receive-cant-send`), empty for non-mail services. `Healthy` stays THE gate bit — no gate-semantics change, no DDR. A degraded readiness never demotes the device (a receiving-but-not-sending mail is not a no-coverage failure); the named state stands and a re-run clears it by itself (`RetryService`). - **New distinct gate step** (`StepMailReadiness`) in `internal/provision/health.go`, run after — never replacing — the functional Stalwart `/healthz` check (`b13fb81`). The whole readiness rides `Outcome.MailReadiness` for the surface. - **Monitoring (ADR 0071):** a degraded leg rides `Handoff.MailReadiness` and monitoring raises it as a standing warning fault like any other (`originMailReadiness`, diagnosis-only), self-clearing on a green re-run. - **Compose:** production `mailReadinessAdapter` runs the real `internal/mailreadiness` over apex-derived records + the apex address (ADR 0100 — no fake in a shipped path); `composeDeps.mailReadiness` injects a scripted fold at the seam. - **Screens (rule 2b):** MAIL-S1 (`MailReadinessScreen.vue` — records + preflight poll) and MAIL-S1x (`MailStandingState.vue` — named standing state + evidence in the active view) ship as real mounted components on the wireframes' `data-field`/`data-action`/`data-status` contract; `SetupSurface` routes records-not-verified → S1, otherwise Active (with the S1x block); re-run maps to `retryService('mail')`. **Evidence:** `control-plane/cmd/control-plane/provision_mail_readiness_test.go` (composition seam, extended per `provision_brand_health_test.go`) proves the fold stands the named state, the device stays active, `RetryService` clears it, and monitoring raises+clears it. `dashboard/tests/unit/provisionMailReadiness.test.ts` pins the S1/S1x element contract + re-run routing. `go build/vet/test` (incl. smoke-mail) + dashboard vitest (980) + eslint + dashboard build all green. Acceptance stories 1/4/5/6/7/8/9 satisfied. **Follow-on note:** the chrome standing-indicator-stack + a dedicated Services-tab pill are surfaced via the monitoring standing alert (story 9); a dedicated recovery-style indicator-source entry in `NavChrome` is a possible follow-on.
ben closed this issue 2026-08-07 15:08:10 +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#321
No description provided.