reaper/lease: a rented gateway is destroyed at the broker TTL with no loud standing warning on the operator app in the hours before the cliff (#2189 follow-up) #2192

Open
opened 2026-11-11 12:52:38 +00:00 by matou-build-agent · 1 comment

What

A rented gateway carries a broker TTL lease (default 24h, ADR 0189). Its community renews the lease on every pass (the standalone heartbeat.LeaseRenewLoop, #2189). But if the renew keeps failing — or the box is off the ledger / mis-keyed under another name — the broker's reaper destroys the box at the TTL with no loud standing condition on the operator app in the hours before the cliff. #2189 destroyed tu-ia's live community silently at 24h05m; the renewer fix stops the no-renew case, but a renew that keeps failing is still a silent cliff.

The heartbeat already raises a standing condition internally on a 409 not-rented (heartbeat.ErrLeaseNotRented → Status.LeaseOrphaned/LeaseDetail/LeaseSince, and the new LeaseRenewLoop.Status() carries the same). What is missing:

  1. Operator-app surface: the LeaseOrphaned/LeaseDetail lease condition is currently log-only — no P11 Network / dashboard surface renders it. Wire it so an operator sees "this box's lease has not renewed since
  2. Broker-side: the reaper should not silently destroy a box at the TTL without a prior standing warning the operator app can read — a grace/notify window before the cliff, so a transient renew outage (not just a not-rented orphan) is visible before the box is gone.

Why

#2189's renewer wiring stops a healthy rented own-domain community from ever being reaped. It does not make a failing renew visible: the TTL is still a cliff with no warning. The reaper destroying a live community is the worst-case data loss in the fleet, and today it is silent until it has happened.

Scope

  • Surface the existing LeaseRenewLoop.Status() lease condition on the operator app (the Network / Address section is the natural home — it already projects the heartbeat's Status()).
  • Broker-side: a standing warning / notify window before the TTL cliff.
  • #2189 (the renewer wiring this follows), ADR 0189, #1335 (the not-rented standing condition), internal/heartbeat/heartbeat.go (LeaseRenewLoop, Status.LeaseOrphaned), control-plane/cmd/control-plane/network_wiring.go (the Network read that could project it).

Filed as the out-of-scope follow-up #2189's acceptance carved out.

## What A rented gateway carries a broker TTL lease (default 24h, ADR 0189). Its community renews the lease on every pass (the standalone `heartbeat.LeaseRenewLoop`, #2189). But if the renew keeps failing — or the box is off the ledger / mis-keyed under another name — the broker's reaper destroys the box at the TTL **with no loud standing condition on the operator app in the hours before the cliff**. #2189 destroyed tu-ia's live community silently at 24h05m; the renewer fix stops the *no-renew* case, but a renew that keeps failing is still a silent cliff. The heartbeat already raises a standing condition internally on a 409 not-rented (`heartbeat.ErrLeaseNotRented` → `Status.LeaseOrphaned`/`LeaseDetail`/`LeaseSince`, and the new `LeaseRenewLoop.Status()` carries the same). What is missing: 1. **Operator-app surface:** the `LeaseOrphaned`/`LeaseDetail` lease condition is currently log-only — no P11 Network / dashboard surface renders it. Wire it so an operator sees "this box's lease has not renewed since <time>, it will be destroyed at the TTL" loudly, before the reaper runs. 2. **Broker-side:** the reaper should not silently destroy a box at the TTL without a prior standing warning the operator app can read — a grace/notify window before the cliff, so a transient renew outage (not just a not-rented orphan) is visible before the box is gone. ## Why #2189's renewer wiring stops a *healthy* rented own-domain community from ever being reaped. It does not make a *failing* renew visible: the TTL is still a cliff with no warning. The reaper destroying a live community is the worst-case data loss in the fleet, and today it is silent until it has happened. ## Scope - Surface the existing `LeaseRenewLoop.Status()` lease condition on the operator app (the Network / Address section is the natural home — it already projects the heartbeat's `Status()`). - Broker-side: a standing warning / notify window before the TTL cliff. ## Related - #2189 (the renewer wiring this follows), ADR 0189, #1335 (the not-rented standing condition), `internal/heartbeat/heartbeat.go` (`LeaseRenewLoop`, `Status.LeaseOrphaned`), `control-plane/cmd/control-plane/network_wiring.go` (the Network read that could project it). *Filed as the out-of-scope follow-up #2189's acceptance carved out.*
Author
Member

This was generated by AI during triage.

Triage Notes

Category: enhancement (already applied).
State → needs-design (missing-design gate).

What we've established:

  • The backend half already exists. internal/heartbeat/heartbeat.go raises the standing condition (Status.LeaseOrphaned / LeaseDetail / LeaseSince, and LeaseRenewLoop.Status() carries it), and control-plane/cmd/control-plane/network_wiring.go already projects the heartbeat's Status() into the Network/Address read. So implementation is not blocked on code — it's blocked on a design contract.
  • The surface this asks for is a new loud standing-indicator state on P11-network for the broker-TTL lease condition ("this box's lease hasn't renewed since
  • The broker-side ask ("a grace/notify window before the TTL cliff") is an unmade design decision — the warning window and escalation semantics, the lease analogue of DDR 0202's cert thresholds.

Why needs-design (not ready-for-agent): the issue references an operator-app UX surface (a new P11-network standing indicator) that does not exist as a wireframe, and a threshold/escalation decision that isn't recorded. The design contract an agent would build against isn't ready. Routes back to grill-ux-with-docs / wireframe for this feature (the lease-condition standing indicator on P11-network + its warning-window DDR) before implementation; once that contract lands and the backend wiring above is in place, this becomes a straightforward ready-for-agent build.

Not a one-way door: this is additive (a warning before the existing reaper behaviour, reducing silent data loss, not widening destruction), so no ready-for-human residue — it is a design-tier gap, routed by the missing-design gate.

> *This was generated by AI during triage.* ## Triage Notes **Category:** `enhancement` (already applied). **State → `needs-design`** (missing-design gate). **What we've established:** - The backend half already exists. `internal/heartbeat/heartbeat.go` raises the standing condition (`Status.LeaseOrphaned` / `LeaseDetail` / `LeaseSince`, and `LeaseRenewLoop.Status()` carries it), and `control-plane/cmd/control-plane/network_wiring.go` already projects the heartbeat's `Status()` into the Network/Address read. So implementation is **not blocked on code** — it's blocked on a design contract. - The surface this asks for is a **new loud standing-indicator state** on P11-network for the broker-TTL lease condition ("this box's lease hasn't renewed since <time>, it will be destroyed at the TTL"). The directly analogous state that already ships — certificate-renewal-late — is a dedicated wireframe (`docs/ux/wireframes/p11-network/p11-s1x-cert-renewal-late.html`) feeding ADR 0094's standing-indicator slot, with its thresholds pinned by DDR 0202. The lease-orphan warning has **neither a wireframe state nor a threshold DDR**. - The broker-side ask ("a grace/notify window before the TTL cliff") is an unmade design decision — the warning window and escalation semantics, the lease analogue of DDR 0202's cert thresholds. **Why `needs-design` (not `ready-for-agent`):** the issue references an operator-app UX surface (a new P11-network standing indicator) that does not exist as a wireframe, and a threshold/escalation decision that isn't recorded. The design contract an agent would build against isn't ready. Routes back to `grill-ux-with-docs` / `wireframe` for this feature (the lease-condition standing indicator on P11-network + its warning-window DDR) before implementation; once that contract lands and the backend wiring above is in place, this becomes a straightforward `ready-for-agent` build. **Not a one-way door:** this is additive (a warning *before* the existing reaper behaviour, reducing silent data loss, not widening destruction), so no `ready-for-human` residue — it is a design-tier gap, routed by the missing-design gate.
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#2192
No description provided.