carlos / platform Public

console remote instances: round 2 review fixes (Astra, 02edd585)

1. P1: metrics history is bounded by the record's created_at. A unit
   name derives from the hostname, and a hostname can have had another
   tenant earlier in the 48 h window on the same box. ownerAppMetricsFrom
   redraws the graphs from the owner's samples only (memory scaled to
   their own peak), drops a current sample older than the start, and
   shows nothing for a remote row with no start. Local rows had the same
   leak and are bounded by their instance record too; hand routes with no
   record keep their whole window. carlos instances list uses the same
   bound. No registry created_at read (that would be a census decision).
2. P2: a remote host held down after a failed hold-mode build reads
   "Failed" and makes the Overview "Needs attention"; a transient one
   reads "Can't tell right now", never healthy sleep. A static-only app
   with unknown remote state is no longer "All good" / "Served", and its
   account-home row can't tell.
3. P2: canary retire waits for remote convergence. A record on another
   box that changed within channelSettle (15 min, three snapshot periods,
   the fleet's staleness rule) is a possible follower of the retiring
   channel unless its box's tenant-named report shows the new channel's
   build, different from the retiring one. Fails closed without
   modification times.

Each fix has a test that failed on 02edd585; 20 mutants, all killed.
Root-read census re-proposed (approval classes only); record-write
entries for channelHosts and unsettledFollowers (key-site).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev d09ea8308a814d9bd2c9594017099b6c4b21c697 parent 02edd58
17 files changed, +763 −66
  • docs/superpowers/notes/census-proposal-console-remote-instances.md +12 −8
  • docs/superpowers/notes/console-remote-instances.md +58 −9
  • internal/console/apiinstances.go +26 −5
  • internal/console/apiinstances_test.go +1 −1
  • internal/console/apiroutes.go +1 −1
  • internal/console/metricsview.go +101 −4
  • internal/console/overview.go +16 −8
  • internal/console/remoteinstances.go +105 −3
  • internal/console/remoteinstances_round1_test.go +1 −1
  • internal/console/remoteinstances_round2_test.go +324 −0
  • internal/console/remoteinstances_test.go +22 −3
  • internal/console/server.go +44 −2
  • internal/console/templates/app_overview.html +2 −2
  • internal/console/view.go +23 −2
  • internal/provision/console_remote_instances_census_test.go +8 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv +18 −15

CI passed — run details

diff --git a/docs/superpowers/notes/census-proposal-console-remote-instances.md b/docs/superpowers/notes/census-proposal-console-remote-instances.md
index e4c014a98..50c5c3f2f 100644
--- a/docs/superpowers/notes/census-proposal-console-remote-instances.md
+++ b/docs/superpowers/notes/census-proposal-console-remote-instances.md
@@ -5,13 +5,15 @@ Ruling `census-ruling-console-remote-instances`. Every change below keeps the di
| unit | change | read sites | what changed |
|---|---|---|---|
| `internal/console/accountfleet.go` `Server.assembleAccountFleet` | body | unchanged (9) | Fleet tab: the shared-fleet app count also reads the account's own instance records (per app of the account, under its own prefix, region not a fleet placement); the registry read is unchanged. |
-| `internal/console/apiinstances.go` `Server.healthByHost` | body | unchanged (12) | Takes an awake set (hosts whose accepted box report says awake) and a box pin per host (readings only from that box, via ownerAppMetricsFrom); registry reads unchanged. |
-| `internal/console/apiroutes.go` `Server.handleAPIRoutes` | body | unchanged (33) | Passes nil, nil for healthByHost's new awake and box-pin arguments; nothing else. |
+| `internal/console/apiinstances.go` `Server.healthByHost` | body | unchanged (12) | Takes an awake set, a box pin per host and an ownership start per host from the caller (readings only from that box and only from samples at or after the start, via ownerAppMetricsFrom); registry reads unchanged. |
+| `internal/console/apiroutes.go` `Server.handleAPIRoutes` | body | unchanged (33) | Passes nil for healthByHost's new awake, box-pin and ownership-start arguments; nothing else. |
| `internal/console/instancepage.go` `Server.handleAppInstance` | body | unchanged (6) | A remote row (no local registry row) takes its aliases from its box report; local rows read ListAliases as before. |
-| `internal/console/server.go` `Server.channelHosts` | body | unchanged (4) | Canary-retire guard also counts the account's instance records (ListRecordsStrict) and sidecar records (listed, then each read with GetSidecarRecord; any read error including not-found refuses) from the bucket, failing closed; the registry read is unchanged. |
-| `internal/console/templates/app_overview.html` `external` | body | unchanged (1) | Running tile: when every instance's state is unknown (instances on other boxes no report vouches for) the detail reads the existing 'no data right now'; display only. |
-| `internal/console/apiinstances.go` `Server.instanceHealth` | sites | +whole:Route ×2 | Records with no local registry row get health only from a box report naming the record's own account and app, with readings pinned to that box; otherwise Setting up (complete read, no report) or Can't tell right now. Builds registry.Route literals from the record; reads no registry for them. |
-| `internal/console/view.go` `Assemble` | sites | +registry:Host, +whole:Route | Collects the set of local registry hosts (rt.Host) so a record host the registry has gets no remote row and is not read; adds rows from the account's records and box reports when given a remote source. |
+| `internal/console/metricsview.go` `buildUnitRows` | body | unchanged (2) | Each unit row also keeps its raw per-sample readings (float32 CPU, int64 memory) so an owner's graph can be redrawn from only their samples; reads nothing new. |
+| `internal/console/metricsview.go` `type UnitRow` | body | unchanged (1) | Two unexported fields carrying those raw per-sample readings; schema only. |
+| `internal/console/templates/app_overview.html` `external` | body | unchanged (1) | Running tile: does not claim Served when a static route's state is unknown, and reads the existing 'no data right now' when every instance's state is unknown; display only. |
+| `internal/console/apiinstances.go` `Server.instanceHealth` | sites | +whole:Route ×4 | Records with no local registry row get health only from a box report naming the record's own account and app (held down: Failed; transient or no tenant: Can't tell right now), readings pinned to that box and bounded by each record's created_at. Builds registry.Route literals from the record; reads no registry for them. |
+| `internal/console/server.go` `Server.channelHosts` | sites | +registry:Host, +whole:Route | Canary-retire guard also counts the account's instance records (ListRecordsStrict) and sidecar records (listed, then each read with GetSidecarRecord; any read error refuses), and records on other boxes changed within channelSettle unless their box report shows the new channel's build (unsettledFollowers); it notes which hosts have a local registry row (rt.Host) so only remote hosts are candidates. Fails closed. |
+| `internal/console/view.go` `Assemble` | sites | +registry:Host, +whole:Route | Collects the set of local registry hosts (rt.Host) so a record host the registry has gets no remote row (its record's created_at bounds the local row's metrics history); adds rows from the account's records and box reports when given a remote source. |
Envelopes re-pinned: `internal/console`, `internal/console/templates`.
@@ -23,11 +25,13 @@ Recorded dispositions, which each change must still satisfy:
- `internal/console/apiinstances.go` `Server.healthByHost`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
- `internal/console/apiroutes.go` `Server.handleAPIRoutes`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
- `internal/console/instancepage.go` `Server.handleAppInstance`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=merge-ruling-2;basis=Instance page adds updates view from rollout join; browser rendering remains legacy.
-- `internal/console/server.go` `Server.channelHosts`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
+- `internal/console/metricsview.go` `buildUnitRows`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
+- `internal/console/metricsview.go` `type UnitRow`: diagnostic, task H3. Basis: schema-only
- `internal/console/templates/app_overview.html` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
- `internal/console/apiinstances.go` `Server.instanceHealth`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
+- `internal/console/server.go` `Server.channelHosts`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
- `internal/console/view.go` `Assemble`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
-Seal: `0c4eabfe38e12b098285bdeb5ceb0b16e5333928f5b02e160a6b16b5fd9ce1e0` → `dfdf49f3de3e612a21a29c24addc123c18a6cd68355dc134409b8743e6f596b4`.
+Seal: `0c4eabfe38e12b098285bdeb5ceb0b16e5333928f5b02e160a6b16b5fd9ce1e0` → `a8214d93e8e14c449c4af0a5aac394fb0170c28a73b3996daeefab2aab1a164d`.
Overlay: `internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/notes/console-remote-instances.md b/docs/superpowers/notes/console-remote-instances.md
index ddadb7846..fabb1d303 100644
--- a/docs/superpowers/notes/console-remote-instances.md
+++ b/docs/superpowers/notes/console-remote-instances.md
@@ -34,7 +34,12 @@ being inert when the AU and UK boxes started hosting instances.
Without one (an incomplete read, a record on a customer fleet, or an
older box's report that names no tenant) the row's health is "Can't tell
right now", the console's existing wording, and the Overview verdict
- says the same. It is never guessed as Asleep, Not responding or Serving.
+ says the same. It is never guessed as Asleep, Not responding or Serving,
+ and a static-only app is not "Served" or "All good" on no evidence. A
+ host the box reports held down after a failed hold-mode build
+ (`AttemptDown`) is "Failed", the local rows' word, and makes the
+ Overview "Needs attention"; a host mid-start or mid-stop (`Transient`)
+ is "Can't tell right now", never healthy sleep.
3. **Metrics.** A remote row joins readings only from the one box whose
report was accepted for it and names this account and app
(`RouteView.metricsBox`, enforced in `ownerAppMetricsFrom`). A row with
@@ -42,7 +47,19 @@ being inert when the AU and UK boxes started hosting instances.
another box may serve the same name for someone else, and its samples
must not land here. A remote row carries no `Unit`, so the allowlist
gains the host and nothing a record can name. `carlos instances list`
- applies the same rule. The metrics box label and the status box label
+ applies the same rule.
+
+ Readings are also bounded in time by the record's `created_at`. A unit
+ name derives from the hostname, and a hostname can have had another
+ tenant earlier in the 48-hour window, on the same box. Graphs are redrawn
+ from the owner's samples only (the memory graph scaled to the owner's own
+ peak), a current sample older than `created_at` is not shown, and a
+ remote row with no `created_at` shows nothing. The same leak existed for
+ local rows (a reused hostname on the console's box), so local rows with
+ an instance record are bounded by that record too. A hand route with no
+ record keeps its whole window, as before: no record says when its tenancy
+ began. The bound reads only the record, never the registry's
+ `created_at` column. The metrics box label and the status box label
are the same (`status.Label(machineID)` on platform boxes); if they ever
differed, remote rows would lose their readings, not gain someone
else's.
@@ -73,7 +90,7 @@ being inert when the AU and UK boxes started hosting instances.
| Deployments, Releases | Counts and canary followers include remote rows. |
| Settings, Domains | Remote hosts are listed with the box's DNS status and certificate date. |
| Fleet tab | "Apps on the shared fleet" also counts apps with a record not placed on a customer fleet. |
-| `channelHosts` | The canary-retire guard also counts instance and sidecar records whose channel matches. They are read strictly and live from the bucket, never through the record view, because this is the reader whose "nobody" deletes a pointer. A failed listing, a listed record that will not read (even one deleted between the listing and the read), or more records than the cap refuses the retire. |
+| `channelHosts` | The canary-retire guard also counts instance and sidecar records whose channel matches, and records on other boxes that may have been moved off the channel moments ago (below). They are read strictly and live from the bucket, never through the record view, because this is the reader whose "nobody" deletes a pointer. A failed listing, a listed record that will not read (even one deleted between the listing and the read), or more records than the cap refuses the retire. |
| `carlos instances list` | A record with no local row takes its health from its box report and the sweep, instead of always "Setting up". Same cause, same fix. |
## What stays local, on purpose
@@ -115,11 +132,10 @@ is filed as an amadan discussion.
- Records: 0 when the change-index record view is armed and its latest
snapshot is Complete (the flagship console). The page reads the
snapshot without refreshing it; the run and seed sweeps keep it within a
- pass. Unarmed: 1 LIST per app plus 1 GET per record whose host is not
- already a local row. There is no cap: every record is read, so no
- instance is ever dropped from the pages, and records for local hosts
- are listed but never fetched. The Fleet tab fetches every record of an
- app that has no local route, when unarmed.
+ pass. Unarmed: 1 LIST plus 1 GET per record of the app (local rows read
+ their record too, for the metrics bound), the read the Logs tab always
+ made. There is no cap: every record is read, so no instance is ever
+ dropped from the pages.
- Box reports: 1 LIST plus 1 GET per box, held console-wide for 60 seconds
(10 seconds after a failed or incomplete read), timed from when the load
finished. One load at a time; a view waiting behind a slow load stops
@@ -131,7 +147,10 @@ is filed as an amadan discussion.
the Overview costs less than before.
- Metrics: unchanged (shared in-process cache).
- `channelHosts`: 1 LIST plus 1 GET per instance record, plus the same for
- sidecar records, per canary create or retire. Write doors only.
+ sidecar records, per canary create or retire, plus 2 modification-time
+ LISTs when the app has records on other boxes, and the channel pointer
+ GETs and the shared box-report read when one of those changed within
+ the settle window. Write doors only.
- **Pinned by `TestRemoteInstanceRequestBudget`:** an armed Overview view
makes 1 LIST and 2 GETs of box reports (two boxes) and no record reads; a
second Overview, Deployments and the account app list within the minute
@@ -184,3 +203,33 @@ Four findings, all fixed, each with a test that failed on f2b993c3
4. The 500-record cap silently dropped instances. The page reader now
reads every record, and only the records it shows.
+## Round 2 review (Astra, 02edd585)
+
+Three findings, all fixed, each with a test that failed on 02edd585
+(`internal/console/remoteinstances_round2_test.go`):
+
+1. A previous tenant's metrics history under the same hostname reached the
+ new owner's graphs. Readings are bounded by the record's `created_at`
+ (Metrics, above), local rows included.
+2. A remote instance held down after a failed hold-mode build read as
+ healthy "Asleep". It now reads "Failed" and counts as needing attention;
+ a transient one reads "Can't tell right now". Astra's note that a
+ static-only app with unknown remote state still read "All good" and
+ "Served" is fixed with it.
+3. Canary retire missed a remote follower whose record had moved to
+ another channel but whose box had not converged. Box reports do not
+ carry a host's channel, so the guard uses time and builds: a record on
+ another box that changed within `channelSettle` (15 minutes) counts as a
+ possible follower of the retiring channel, unless a fresh report of its
+ box, naming this account and app, shows the host on its new channel's
+ build and that build differs from the retiring channel's. Fifteen
+ minutes is three status snapshot periods, the fleet's own staleness
+ rule (`status.BoxStale`): boxes converge record changes within seconds
+ of the serial bump, and one that has not done so in that time is one the
+ fleet already treats as dark. The guard is deliberately conservative: a
+ remote record created or edited in the last 15 minutes, with no fresh
+ report yet, also holds a retire back, and the refusal names it with the
+ existing "still has a host following it" wording. Local hosts are read
+ off their registry row and are never held by the window. A store that
+ cannot list modification times (both real stores can) refuses.
+
diff --git a/internal/console/apiinstances.go b/internal/console/apiinstances.go
index 5632173ab..85c79f176 100644
--- a/internal/console/apiinstances.go
+++ b/internal/console/apiinstances.go
@@ -309,11 +309,22 @@ func (s *Server) instanceHealth(ctx context.Context, recs []provision.Record) ma
}
continue
}
+ if rep.transient {
+ // Starting or stopping on its box: not asleep, not up.
+ out[rec.Host] = healthUnknown
+ continue
+ }
kind := rec.Kind
if kind == "" {
kind = "instance"
}
- routeFor[rec.Host] = registry.Route{Host: rec.Host, Kind: kind, Status: "ready",
+ status := "ready"
+ if rep.down {
+ // Held down after a failed hold-mode build: "Failed", as the
+ // page says.
+ status = "failed"
+ }
+ routeFor[rec.Host] = registry.Route{Host: rec.Host, Kind: kind, Status: status,
Hibernate: rec.HibernateOrDefault(), Provisioned: true}
boxByHost[rec.Host] = rep.box
if rep.awake {
@@ -324,7 +335,15 @@ func (s *Server) instanceHealth(ctx context.Context, recs []provision.Record) ma
}
}
}
- for h, word := range s.healthByHost(ctx, routeFor, awake, boxByHost) {
+ // Readings start with each record's created_at, as on the app pages: a
+ // previous tenant's samples of the same hostname are not this one's.
+ sinceByHost := make(map[string]time.Time, len(routeFor))
+ for _, rec := range recs {
+ if _, ok := routeFor[rec.Host]; ok {
+ sinceByHost[rec.Host] = rec.CreatedAt
+ }
+ }
+ for h, word := range s.healthByHost(ctx, routeFor, awake, boxByHost, sinceByHost) {
out[h] = word
}
return out
@@ -347,8 +366,10 @@ func (s *Server) instanceHealth(ctx context.Context, recs []provision.Record) ma
// another box, joined from its box report by instanceHealth): those read as
// reporting even when the sweep has no sample yet, as the Running tab reads
// them. boxByHost pins such a host's readings to the box whose report was
-// accepted for it (ownerAppMetricsFrom). Both nil for routes on this box.
-func (s *Server) healthByHost(ctx context.Context, routeFor map[string]registry.Route, awake map[string]bool, boxByHost map[string]string) map[string]string {
+// accepted for it, and sinceByHost bounds a host's readings by when its
+// owner came to have it (ownerAppMetricsFrom). All nil for routes the
+// caller has no record for.
+func (s *Server) healthByHost(ctx context.Context, routeFor map[string]registry.Route, awake map[string]bool, boxByHost map[string]string, sinceByHost map[string]time.Time) map[string]string {
out := make(map[string]string, len(routeFor))
hosts := make([]string, 0, len(routeFor))
unitByHost := map[string]string{}
@@ -358,7 +379,7 @@ func (s *Server) healthByHost(ctx context.Context, routeFor map[string]registry.
unitByHost[h] = rt.Unit
}
}
- am, err := s.ownerAppMetricsFrom(ctx, hosts, unitByHost, boxByHost)
+ am, err := s.ownerAppMetricsFrom(ctx, hosts, unitByHost, boxByHost, sinceByHost)
if err != nil {
// An unreadable sweep is not knowledge that these instances are
// down: every host reads as not-reporting below, which healthWord
diff --git a/internal/console/apiinstances_test.go b/internal/console/apiinstances_test.go
index 7bd168219..88523c1e9 100644
--- a/internal/console/apiinstances_test.go
+++ b/internal/console/apiinstances_test.go
@@ -726,7 +726,7 @@ func TestAPIInstanceListHealthAndFilters(t *testing.T) {
// rather than every word coming from the registry alone.
fx.addRoute(t, registry.Route{Host: "run.go.tito.io", Kind: "instance", Status: "ready",
App: "titogo", Account: fx.sqid, Channel: "stable", Provisioned: true})
- at := time.Now().UTC().Add(-time.Minute)
+ at := time.Now().UTC() // after the records: earlier samples are a previous owner's
if err := metrics.WriteRaw(context.Background(), fx.rel, metrics.RawChunk{
V: 1, Box: "box-health", Hour: metrics.HourOf(at),
Samples: []metrics.Sample{{At: at, Units: map[string]metrics.UnitSample{
diff --git a/internal/console/apiroutes.go b/internal/console/apiroutes.go
index 56c265151..9c0a3079b 100644
--- a/internal/console/apiroutes.go
+++ b/internal/console/apiroutes.go
@@ -153,7 +153,7 @@ func (s *Server) handleAPIRoutes(w http.ResponseWriter, r *http.Request) {
}
ctx, cancel := context.WithTimeout(r.Context(), routeListTimeout)
defer cancel()
- health := s.healthByHost(ctx, routeFor, nil, nil)
+ health := s.healthByHost(ctx, routeFor, nil, nil, nil)
join := loadBoxJoin(ctx, s.cfg.Releases, time.Now())
rows := make([]apiRoute, 0, len(routeFor))
for _, rt := range routeFor {
diff --git a/internal/console/metricsview.go b/internal/console/metricsview.go
index 24609b6e2..47156bf9d 100644
--- a/internal/console/metricsview.go
+++ b/internal/console/metricsview.go
@@ -14,6 +14,7 @@ import (
"errors"
"fmt"
"log"
+ "math"
"os"
"sort"
"strconv"
@@ -42,6 +43,14 @@ type UnitRow struct {
MemBytes *int64
ReadBytes, WriteBytes *int64
SparkCPU, SparkMem string // SVG polyline points, "" when no data
+
+ // cpu and mem are the unit's raw readings at each of the box's swept
+ // samples (BoxMetricsView.times), NaN and -1 where absent, kept so an
+ // owner's graph can be redrawn from only the samples that are theirs
+ // (ownerAppMetricsFrom's ownership start). Compact on purpose: one
+ // float32 and one int64 per sample per running unit.
+ cpu []float32
+ mem []int64
}
// BoxMetricsView is one box's assembled dashboard row: latest host readings
@@ -52,6 +61,10 @@ type BoxMetricsView struct {
CPU, Mem, Disk *float64
SparkCPU, SparkMem, SparkDisk string // SVG polyline points, "" when no data
Units []UnitRow // sorted by CPUFrac desc, nil-CPU rows last
+
+ // times is each swept sample's time, oldest first: the x axis of every
+ // unit's cpu and mem series.
+ times []time.Time
}
// AlertRow is one currently-firing rule on one box. LoadMetrics only ever
@@ -576,6 +589,10 @@ func buildBoxView(box string, samples []metrics.Sample) BoxMetricsView {
view.SparkDisk = sparkPoints(disk, 240, 40)
view.Units = buildUnitRows(samples)
+ view.times = make([]time.Time, len(samples))
+ for i, sm := range samples {
+ view.times[i] = sm.At
+ }
return view
}
@@ -601,6 +618,8 @@ func buildUnitRows(samples []metrics.Sample) []UnitRow {
WriteBytes: u.WriteBytes,
SparkCPU: sparkPoints(unitCPUSeries(samples, name), 240, 40),
SparkMem: sparkPoints(unitMemSeries(samples, name), 240, 40),
+ cpu: unitRawCPU(samples, name),
+ mem: unitRawMem(samples, name),
})
}
// Name order first so the CPU-desc sort below, being stable, ties out
@@ -619,6 +638,66 @@ func buildUnitRows(samples []metrics.Sample) []UnitRow {
return rows
}
+// unitRawCPU and unitRawMem are one unit's raw readings at each swept
+// sample, NaN and -1 where the unit or the reading is absent.
+func unitRawCPU(samples []metrics.Sample, unit string) []float32 {
+ out := make([]float32, len(samples))
+ for i, sm := range samples {
+ out[i] = float32(math.NaN())
+ if u, ok := sm.Units[unit]; ok && u.CPUFrac != nil {
+ out[i] = float32(*u.CPUFrac)
+ }
+ }
+ return out
+}
+
+func unitRawMem(samples []metrics.Sample, unit string) []int64 {
+ out := make([]int64, len(samples))
+ for i, sm := range samples {
+ out[i] = -1
+ if u, ok := sm.Units[unit]; ok && u.MemBytes != nil {
+ out[i] = *u.MemBytes
+ }
+ }
+ return out
+}
+
+// sparksSince redraws a unit's two graphs from only the samples at or after
+// since, the memory one scaled to the peak within them. ok is false when
+// the unit has no sample there at all.
+func sparksSince(times []time.Time, u UnitRow, since time.Time) (cpu, mem string, ok bool) {
+ if len(times) != len(u.cpu) || len(times) != len(u.mem) {
+ return "", "", false
+ }
+ k := sort.Search(len(times), func(i int) bool { return !times[i].Before(since) })
+ if k >= len(times) {
+ return "", "", false
+ }
+ n := len(times) - k
+ cs := make([]*float64, n)
+ var peak int64
+ for i := k; i < len(times); i++ {
+ if c := u.cpu[i]; !math.IsNaN(float64(c)) {
+ f := float64(c)
+ cs[i-k] = &f
+ }
+ if u.mem[i] > peak {
+ peak = u.mem[i]
+ }
+ }
+ var ms []*float64
+ if peak > 0 {
+ ms = make([]*float64, n)
+ for i := k; i < len(times); i++ {
+ if u.mem[i] >= 0 {
+ f := float64(u.mem[i]) / float64(peak)
+ ms[i-k] = &f
+ }
+ }
+ }
+ return sparkPoints(cs, 240, 40), sparkPoints(ms, 240, 40), true
+}
+
// unitCPUSeries is one unit's CPU fraction at each swept sample index. A
// sample where the unit is absent, or present without a CPU reading, stays
// nil — sparkPoints draws a gap, never a zero.
@@ -712,17 +791,20 @@ func (m InstanceMetrics) Reporting() bool { return m.Box != "" }
// readings, Reporting false), never zeros and never silently dropped — an
// owner whose instance is asleep must still see it listed.
func (s *Server) OwnerAppMetrics(ctx context.Context, hosts []string, unitByHost map[string]string) ([]InstanceMetrics, error) {
- return s.ownerAppMetricsFrom(ctx, hosts, unitByHost, nil)
+ return s.ownerAppMetricsFrom(ctx, hosts, unitByHost, nil, nil)
}
-// ownerAppMetricsFrom is OwnerAppMetrics where boxByHost pins a host's
+// ownerAppMetricsFrom is OwnerAppMetrics where sinceByHost bounds a host's
+// readings by when its current owner's route or record came to exist
+// (graphs redrawn from later samples only; a zero time is no readings), and
+// where boxByHost pins a host's
// readings to one box: a host named there takes samples from that box only
// and ignores every other box's samples of its units. The app pages pin an
// instance on another box to the box whose report was accepted for this
// account (remoteinstances.go), so a box serving the same host name for
// another tenant cannot put its readings on this page. A host not named
// there reads as before: the freshest box's sample.
-func (s *Server) ownerAppMetricsFrom(ctx context.Context, hosts []string, unitByHost, boxByHost map[string]string) ([]InstanceMetrics, error) {
+func (s *Server) ownerAppMetricsFrom(ctx context.Context, hosts []string, unitByHost, boxByHost map[string]string, sinceByHost map[string]time.Time) ([]InstanceMetrics, error) {
// The allowlist, keyed by the unit names each host can legally match.
// Matching is exact-string on this map: a unit the caller did not ask
// for cannot be reached by any path below.
@@ -775,13 +857,22 @@ func (s *Server) ownerAppMetricsFrom(ctx context.Context, hosts []string, unitBy
if pinned, ok := boxByHost[host]; ok && pinned != box.Box {
continue // another box's reading of a host pinned to one box
}
+ // Ownership start: a unit name derives from the hostname, and a
+ // hostname can have had another owner earlier in the window.
+ // Nothing before since is this owner's: with no start known, no
+ // readings at all; with a newest sample older than the start,
+ // not even the current one.
+ since, bounded := sinceByHost[host]
+ if bounded && (since.IsZero() || box.At.Before(since)) {
+ continue
+ }
// A host that reports on two boxes at once (a move in flight)
// shows the freshest box's reading, not whichever sorted first.
if prev, taken := at[host]; taken && !box.At.After(prev) {
continue
}
at[host] = box.At
- found[host] = InstanceMetrics{
+ row := InstanceMetrics{
Host: host,
ObservedAt: box.At,
Box: box.Box,
@@ -790,6 +881,12 @@ func (s *Server) ownerAppMetricsFrom(ctx context.Context, hosts []string, unitBy
SparkCPU: u.SparkCPU,
SparkMem: u.SparkMem,
}
+ if bounded && (len(box.times) == 0 || box.times[0].Before(since)) {
+ // Part of the window predates the owner: redraw from only
+ // their samples, or draw nothing when that cannot be done.
+ row.SparkCPU, row.SparkMem, _ = sparksSince(box.times, u, since)
+ }
+ found[host] = row
}
}
diff --git a/internal/console/overview.go b/internal/console/overview.go
index 4d9d00bcb..f482f7ea1 100644
--- a/internal/console/overview.go
+++ b/internal/console/overview.go
@@ -31,9 +31,10 @@ type OverviewStats struct {
// unknowns — the tile names them separately and the verdict must not
// treat them as down (the 2026-08-10 tito false alarm).
InstanceNoReadings int
- // InstanceUnknown counts instances on other boxes whose state no box
- // report vouches for (RouteView.unknown). Left out of the denominator
- // like InstanceNoReadings, and the verdict says it can't tell.
+ // InstanceUnknown counts routes on other boxes, of any kind, whose state
+ // no box report vouches for (RouteView.unknown). The instance-kind ones
+ // are left out of the denominator like InstanceNoReadings; the verdict
+ // says it can't tell, and the tile does not claim "Served".
InstanceUnknown int
// InstanceCounted is the Running tile's denominator: InstanceExpected
// minus the unknowable. Templates render facts, never compute them.
@@ -107,6 +108,7 @@ type OverviewStats struct {
// wave its failed cert on it.
func assembleOverview(view *AppView, acct string, metrics []InstanceMetrics, versions []VersionView, dbJoin boxJoin) OverviewStats {
st := OverviewStats{MetricsUnavailable: metrics == nil}
+ unknownInstances := 0
st.Deployment = observedDeployment(view.Routes, acct)
reporting := make(map[string]bool, len(metrics))
for _, m := range metrics {
@@ -149,22 +151,28 @@ func assembleOverview(view *AppView, acct string, metrics []InstanceMetrics, ver
continue
}
st.InstanceTotal++
+ if rt.unknown {
+ // A route on another box whose state no report vouches for,
+ // whatever its kind: neither up, down nor asleep, and a static
+ // one is not "served" on no evidence (remoteinstances.go).
+ st.InstanceUnknown++
+ }
if rt.Kind == "instance" {
st.InstanceExpected++
if rt.unknown {
- // An instance on another box whose state no report vouches
- // for: neither up, down nor asleep (remoteinstances.go).
- st.InstanceUnknown++
+ unknownInstances++
} else if reporting[rt.Host] || rt.boxAwake {
st.InstanceReporting++
- } else if rt.Hibernate {
+ } else if rt.Hibernate && rt.Status != "failed" {
+ // A failed instance (one held down after a failed build) is
+ // not sleeping: it will not wake, so it is not counted here.
st.InstanceAsleep++
} else if !expectsReadings(rt.Provisioned, rt.Unit, rt.Backing) {
st.InstanceNoReadings++
}
}
}
- st.InstanceCounted = st.InstanceExpected - st.InstanceNoReadings - st.InstanceUnknown
+ st.InstanceCounted = st.InstanceExpected - st.InstanceNoReadings - unknownInstances
// Routes and Domains are parallel slices — Assemble appends one of each
// per registry route, in the same loop — which is what lets the domain
// rows be account-filtered here at all (DomainView carries no account of
diff --git a/internal/console/remoteinstances.go b/internal/console/remoteinstances.go
index 52a8e9abb..48b91fe9a 100644
--- a/internal/console/remoteinstances.go
+++ b/internal/console/remoteinstances.go
@@ -27,6 +27,7 @@ package console
import (
"context"
"errors"
+ "fmt"
"log"
"os"
"sort"
@@ -36,6 +37,7 @@ import (
"github.com/carlosframework/platform/internal/provision"
"github.com/carlosframework/platform/internal/registry"
+ "github.com/carlosframework/platform/internal/release"
"github.com/carlosframework/platform/internal/status"
)
@@ -147,6 +149,10 @@ type hostReport struct {
tenantKnown bool
account, app string
awake bool
+ // down is a failed hold-mode build that left the host with nothing
+ // serving it (status.AttemptDown): its wakes are refused. transient is
+ // a process mid-start or mid-stop: neither awake nor asleep.
+ down, transient bool
}
// fleetReports is every fresh box's word about every host, folded once per
@@ -191,6 +197,8 @@ func foldFleetReports(boxes []status.Box, complete bool, now time.Time) fleetRep
r := get(host)
r.tenantKnown, r.account, r.app = true, hr.Account, hr.App
r.awake = hr.Awake && !hr.Transient
+ r.down = hr.Attempt == status.AttemptDown
+ r.transient = hr.Transient
}
}
for name, reading := range m.Aliases {
@@ -295,6 +303,7 @@ func remoteRoute(rec provision.Record, rep *hostReport, complete bool, acct stri
Environment: rec.Environment,
Provisioned: true,
remote: true,
+ since: rec.CreatedAt,
}
typ := "custom"
if strings.HasPrefix(ch, "canary/") {
@@ -308,11 +317,21 @@ func remoteRoute(rec provision.Record, rep *hostReport, complete bool, acct stri
rv.box = rep.box
rv.dbBytes = rep.dbBytes
rv.aliases = rep.aliases
- if rep.tenantKnown {
+ switch {
+ case !rep.tenantKnown:
+ rv.unknown = true
+ case rep.down:
+ // Held down after a failed hold-mode build: the local rows'
+ // word for an instance that will not start, "Failed".
+ rv.Status = "failed"
rv.metricsBox = rep.box
- rv.boxAwake = rep.awake
- } else {
+ case rep.transient:
+ // Starting or stopping: not healthy sleep, and not up either.
rv.unknown = true
+ rv.metricsBox = rep.box
+ default:
+ rv.metricsBox = rep.box
+ rv.boxAwake = rep.awake
}
if rd := rep.reading; rd != nil {
dv.DNS = rd.DNSStatus
@@ -407,3 +426,86 @@ func (s *Server) remoteSource(ctx context.Context, acct string) *remoteRows {
func (s *Server) assembleApps(ctx context.Context, acct string, apps []string) ([]AppView, error) {
return Assemble(s.cfg.Registry, s.cfg.Releases, s.cfg.ReleasePub, acct, apps, s.dnsTargets(), s.remoteSource(ctx, acct))
}
+
+// settleCandidate is a record (instance or sidecar) of the app that is on
+// another channel than the one being retired: the host it names and the
+// channel its record says now.
+type settleCandidate struct{ host, channel string }
+
+// unsettledFollowers is the canary-retire guard's answer for records that
+// are on another channel now but may have been moved off the retiring one
+// moments ago. A channel move writes the record and bumps the serial; the
+// box converges its route a few seconds later, and until then it still
+// follows the old channel. Box reports do not carry a host's channel, so
+// the evidence is time and builds:
+//
+// - a record last modified more than channelSettle ago is settled: boxes
+// converge record changes within seconds of the serial bump, and a box
+// that has not done so in channelSettle (three status snapshot periods,
+// the fleet's staleness rule, status.BoxStale) is one the fleet already
+// treats as dark;
+// - a record modified within it is settled only when a fresh report of its
+// box, naming this account and app, shows the host on its new channel's
+// build, and that build differs from the retiring channel's (otherwise
+// the report cannot tell the two channels apart).
+//
+// Everything else is a possible follower, and the retire is refused. Only
+// hosts on other boxes are candidates: a host with a row in the console
+// box's registry has its channel read off that row. Fails closed: a store
+// that cannot list modification times (both real stores can) or a listing
+// that fails is an error whenever there is a candidate.
+func (s *Server) unsettledFollowers(ctx context.Context, acct, app, channel string, others map[string]settleCandidate) ([]string, error) {
+ if len(others) == 0 {
+ return nil, nil
+ }
+ ml, ok := s.cfg.Releases.(release.ModLister)
+ if !ok {
+ return nil, errors.New("the deployment store cannot list modification times, so a recent channel move cannot be ruled out")
+ }
+ now := time.Now()
+ recent := map[string]bool{}
+ for _, prefix := range []string{provision.RecordsPrefix(acct, app), provision.SidecarsPrefix(acct, app)} {
+ objs, err := ml.ListMod(ctx, prefix)
+ if err != nil {
+ return nil, fmt.Errorf("record modification times of %s/%s: %w", acct, app, err)
+ }
+ for _, o := range objs {
+ if _, ok := others[o.Key]; ok && now.Sub(o.Mod) < channelSettle {
+ recent[o.Key] = true
+ }
+ }
+ }
+ if len(recent) == 0 {
+ return nil, nil
+ }
+ versions := map[string]string{}
+ version := func(ch string) string {
+ if ch == "" {
+ ch = "stable"
+ }
+ if v, ok := versions[ch]; ok {
+ return v
+ }
+ v := ""
+ if p, err := release.Channel(ctx, s.cfg.Releases, s.cfg.ReleasePub, acct, app, ch); err == nil && p != nil {
+ v = p.Version
+ }
+ versions[ch] = v
+ return v
+ }
+ retiring := version(channel)
+ boxes, complete := s.pageBoxReports(ctx)
+ reports := foldFleetReports(boxes, complete, now)
+ var out []string
+ for key := range recent {
+ c := others[key]
+ rep := reports.pick(c.host, acct, app)
+ moved := version(c.channel)
+ if rep != nil && rep.tenantKnown && rep.version != "" && rep.version == moved && moved != retiring {
+ continue // its box already runs the new channel's build
+ }
+ out = append(out, c.host)
+ }
+ sort.Strings(out)
+ return out, nil
+}
diff --git a/internal/console/remoteinstances_round1_test.go b/internal/console/remoteinstances_round1_test.go
index 3ba030db5..0beef31a1 100644
--- a/internal/console/remoteinstances_round1_test.go
+++ b/internal/console/remoteinstances_round1_test.go
@@ -70,7 +70,7 @@ func TestRemoteMetricsRefuseRejectedReport(t *testing.T) {
func TestRemoteMetricsOnlyFromAcceptedBox(t *testing.T) {
tb := newTwoBoxes(t)
tb.setUp(t, false)
- sweepAt(t, tb.fx.rel, status.Label("box-c"), time.Now().Add(-10*time.Second), map[string]metrics.UnitSample{
+ sweepAt(t, tb.fx.rel, status.Label("box-c"), time.Now().Add(2*time.Second), map[string]metrics.UnitSample{
"carlos-exec@" + remoteHost: {CPUFrac: p(0.66), MemBytes: pi64(7 << 20)},
})
ov := tb.page(t, "/apps/shop")
diff --git a/internal/console/remoteinstances_round2_test.go b/internal/console/remoteinstances_round2_test.go
new file mode 100644
index 000000000..4cda5f889
--- /dev/null
+++ b/internal/console/remoteinstances_round2_test.go
@@ -0,0 +1,324 @@
+package console
+
+// Round 2 review fixes (Astra, 02edd585): each test here failed against
+// that tip.
+
+import (
+ "context"
+ "net/http"
+ "net/url"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/carlosframework/platform/internal/metrics"
+ "github.com/carlosframework/platform/internal/provision"
+ "github.com/carlosframework/platform/internal/release"
+ "github.com/carlosframework/platform/internal/status"
+)
+
+// twoSamples writes box's chunk with an old sample of unit (another
+// tenant's, before the current owner existed) and a current one.
+func twoSamples(t *testing.T, rel release.Store, box, unit string, old, cur time.Time) {
+ t.Helper()
+ ctx := context.Background()
+ // Separate hours keep each sample in its own chunk, as a real sweep would.
+ for _, s := range []struct {
+ at time.Time
+ cpu float64
+ mem int64
+ }{{old, 0.90, 64 << 20}, {cur, 0.27, 3 << 20}} {
+ at := s.at.UTC()
+ if err := metrics.WriteRaw(ctx, rel, metrics.RawChunk{V: 1, Box: box, Hour: metrics.HourOf(at),
+ Samples: []metrics.Sample{{At: at, Units: map[string]metrics.UnitSample{unit: {CPUFrac: p(s.cpu), MemBytes: pi64(s.mem)}}}}}); err != nil {
+ t.Fatal(err)
+ }
+ }
+}
+
+func points(spark string) int {
+ if spark == "" {
+ return 0
+ }
+ return len(strings.Fields(spark))
+}
+
+// P1: the hostname had a previous tenant on the same box. Its samples from
+// before this account's record existed must not be in this account's
+// graphs: only the current sample, scaled to its own peak.
+func TestRemoteMetricsHistoryBoundedByRecord(t *testing.T) {
+ tb := newTwoBoxes(t)
+ tb.setUp(t, false)
+ label := status.Label("box-b")
+ twoSamples(t, tb.fx.rel, label, "carlos-exec@"+remoteHost, time.Now().Add(-3*time.Hour), time.Now())
+ views, err := tb.fx.srv.assembleApps(context.Background(), tb.sqid, []string{"shop"})
+ if err != nil {
+ t.Fatal(err)
+ }
+ am := tb.fx.srv.appResourceMetrics(context.Background(), &views[0], tb.account(t))
+ if len(am) != 1 || !am[0].Reporting() {
+ t.Fatalf("metrics = %+v", am)
+ }
+ if n := points(am[0].SparkCPU); n != 1 || strings.Contains(am[0].SparkCPU, ",4.00") {
+ t.Fatalf("CPU graph carries samples from before the record (%d points): %q", n, am[0].SparkCPU)
+ }
+ if n := points(am[0].SparkMem); n != 1 || !strings.HasSuffix(am[0].SparkMem, ",0.00") {
+ t.Fatalf("memory graph carries samples or a peak from before the record (%d points): %q", n, am[0].SparkMem)
+ }
+}
+
+// P1, the same leak on the console's own box: an instance created now
+// whose hostname another tenant's unit used earlier in the window. Its
+// record's created_at bounds the local row's history too. (A hand route
+// with no record has no such start and stays unbounded, as before.)
+func TestLocalMetricsHistoryBoundedByRecord(t *testing.T) {
+ tb := newTwoBoxes(t)
+ tb.create(t, tb.token, tb.sqid, "shop", localHost, "ie", "")
+ tb.reconcile(t, "v3")
+ twoSamples(t, tb.fx.rel, "box-console", "carlos-exec@"+localHost, time.Now().Add(-3*time.Hour), time.Now())
+ views, err := tb.fx.srv.assembleApps(context.Background(), tb.sqid, []string{"shop"})
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, m := range tb.fx.srv.appResourceMetrics(context.Background(), &views[0], tb.account(t)) {
+ if m.Host != localHost {
+ continue
+ }
+ if n := points(m.SparkCPU); n != 1 || strings.Contains(m.SparkCPU, ",4.00") {
+ t.Fatalf("local CPU graph carries samples from before the record (%d points): %q", n, m.SparkCPU)
+ }
+ return
+ }
+ t.Fatal("no metrics row for the local instance")
+}
+
+// P1: with no ownership start, no readings; a current sample older than the
+// ownership start is not this owner's either.
+func TestOwnerMetricsSinceRules(t *testing.T) {
+ fx := newConsoleFixture(t)
+ const host = "h.example.com"
+ twoSamples(t, fx.rel, "box-x", "carlos-exec@"+host, time.Now().Add(-3*time.Hour), time.Now().Add(-90*time.Second))
+ for name, since := range map[string]time.Time{"unknown start": {}, "start after the newest sample": time.Now().Add(-time.Minute)} {
+ fx.srv.metricsCache = metricsCache{}
+ am, err := fx.srv.ownerAppMetricsFrom(context.Background(), []string{host}, nil, nil, map[string]time.Time{host: since})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if len(am) != 1 || am[0].Reporting() || am[0].SparkCPU != "" || am[0].SparkMem != "" {
+ t.Fatalf("%s: metrics = %+v, want none", name, am)
+ }
+ }
+}
+
+// heldReport writes box B's report with one host's rollout entry shaped by
+// edit.
+func heldReport(t *testing.T, tb *twoBoxes, edit func(*status.HostRollout)) {
+ t.Helper()
+ routes, err := tb.regB.List()
+ if err != nil {
+ t.Fatal(err)
+ }
+ ro := &status.RolloutReport{Hosts: map[string]status.HostRollout{}}
+ for _, rt := range routes {
+ hr := status.HostRollout{Account: rt.Account, App: rt.App, Installed: rt.Version, Good: rt.Version}
+ edit(&hr)
+ ro.Hosts[rt.Host] = hr
+ }
+ b := status.CollectBox(routes, status.Probes{MachineID: "box-b", Region: "uk", Rollout: ro}, time.Now())
+ if err := status.WriteBox(context.Background(), tb.fx.rel, b); err != nil {
+ t.Fatal(err)
+ }
+}
+
+// P2: a hibernating remote instance held down by a failed hold-mode build
+// is not asleep and not all good.
+func TestRemoteHeldDownIsUnhealthy(t *testing.T) {
+ tb := newTwoBoxes(t)
+ tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "")
+ tb.reconcile(t, "v3")
+ heldReport(t, tb, func(hr *status.HostRollout) {
+ hr.Attempt, hr.AttemptBuild, hr.HeldBy, hr.Reason = status.AttemptDown, "v4", "v4", status.ReasonExit
+ })
+ row := instanceRow(t, tb.page(t, "/apps/shop/instances"), remoteHost)
+ if !strings.Contains(row, ">Failed<") || strings.Contains(row, "Asleep") {
+ t.Fatalf("Running row for a held-down remote instance = %s", row)
+ }
+ inst := tb.page(t, "/apps/shop/instances/"+remoteHost)
+ if strings.Contains(inst, "wakes on the next request") || !strings.Contains(inst, "<dt>Health</dt><dd>Failed</dd>") {
+ t.Fatalf("instance page for a held-down remote instance:\n%s", inst)
+ }
+ if ov := tb.page(t, "/apps/shop"); strings.Contains(ov, "All good") || !strings.Contains(ov, "Needs attention") {
+ t.Fatalf("overview for a held-down remote instance:\n%s", ov)
+ }
+ if status, _, out := rawReq(t, http.MethodGet, instancesURL(tb.fx, tb.sqid, "shop"), tb.token, ""); status != http.StatusOK || !strings.Contains(out, `"health":"Failed"`) {
+ t.Fatalf("instances list = %d %s", status, out)
+ }
+}
+
+// P2: a remote instance mid-start or mid-stop (transient) is not healthy
+// sleep.
+func TestRemoteTransientIsNotAsleep(t *testing.T) {
+ tb := newTwoBoxes(t)
+ tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "")
+ tb.reconcile(t, "v3")
+ heldReport(t, tb, func(hr *status.HostRollout) { hr.Transient = true })
+ row := instanceRow(t, tb.page(t, "/apps/shop/instances"), remoteHost)
+ if strings.Contains(row, "Asleep") || !strings.Contains(row, "Can&#39;t tell right now") {
+ t.Fatalf("Running row for a transient remote instance = %s", row)
+ }
+ if ov := tb.page(t, "/apps/shop"); strings.Contains(ov, "All good") {
+ t.Fatalf("overview calls a transient remote instance all good:\n%s", ov)
+ }
+ if status, _, out := rawReq(t, http.MethodGet, instancesURL(tb.fx, tb.sqid, "shop"), tb.token, ""); status != http.StatusOK || strings.Contains(out, `"health":"Asleep"`) {
+ t.Fatalf("instances list = %d %s", status, out)
+ }
+}
+
+// Round 1 P2, completed: a static-only app whose remote state is unknown is
+// neither "All good" nor "Served", and its account-home row can't tell.
+func TestRemoteUnknownStaticIsNotServed(t *testing.T) {
+ f := foldFleetReports(nil, false, time.Now())
+ rv, dv := remoteRoute(provision.Record{Host: "s.example.com", App: "shop", Account: "a", Kind: "static"}, nil, f.complete, "a", DNSTargets{})
+ view := &AppView{App: "shop", Routes: []RouteView{rv}, Domains: []DomainView{dv}}
+ if st := assembleOverview(view, "a", []InstanceMetrics{}, nil, boxJoin{}); st.VerdictLabel != "Can't tell right now" || st.InstanceUnknown != 1 {
+ t.Fatalf("static unknown overview = %q (unknown %d)", st.VerdictLabel, st.InstanceUnknown)
+ }
+ if row := summarize(*view, "a"); row.VerdictLabel != "Can't tell right now" {
+ t.Fatalf("account home row = %q", row.VerdictLabel)
+ }
+}
+
+// P2: retiring canary/rc while a remote follower has been moved to another
+// channel in its record but its box has not converged yet (B's reconcile is
+// paused). The retire is refused until B's report shows the host on its new
+// channel's build, and, separately, once the move is older than the settle
+// window.
+func TestRetireCanaryWaitsForRemoteConvergence(t *testing.T) {
+ tb := newTwoBoxes(t)
+ ds := tb.fx.rel.(*deletableStore)
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v4", "canary/rc")
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v5", "canary/next")
+ tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "canary/rc")
+ tb.reconcile(t, "v4")
+ report(t, tb.fx.rel, tb.regB, "box-b", "uk", time.Now(), nil, 4096)
+ // Move the record; B does not reconcile.
+ if status, _, out := rawReq(t, http.MethodPost, instancesURL(tb.fx, tb.sqid, "shop")+"/"+remoteHost+"/channel", tb.token,
+ `{"channel":"canary/next"}`); status != http.StatusOK {
+ t.Fatalf("channel move = %d %s", status, out)
+ }
+ if rt, _ := tb.regB.Get(remoteHost); rt == nil || rt.Channel != "canary/rc" {
+ t.Fatalf("fixture: B's route = %+v, want still on canary/rc", rt)
+ }
+ csrf := sessionToken(t, tb.fx, tb.browser)
+ retire := func() string {
+ status, loc, body := postForm(t, tb.browser, tb.fx.ts.URL+"/a/"+tb.sqid+"/apps/shop/canary/retire",
+ url.Values{"csrf": {csrf}, "name": {"rc"}, "confirmed": {"1"}})
+ if status != http.StatusSeeOther {
+ t.Fatalf("retire = %d %s", status, body)
+ }
+ _, _, page := get(t, tb.browser, tb.fx.ts.URL+loc)
+ return page
+ }
+ pointer := func() error {
+ _, _, err := tb.fx.rel.Get(context.Background(), release.ChannelKey(tb.sqid, "shop", "canary/rc"))
+ return err
+ }
+ tb.fx.srv.boxReports.expire()
+ if page := retire(); !strings.Contains(page, "still has a host ("+remoteHost+") following it") {
+ t.Fatalf("retire was not refused for an unconverged remote follower:\n%s", page)
+ }
+ if err := pointer(); err != nil {
+ t.Fatalf("canary/rc was retired while B still followed it: %v", err)
+ }
+
+ // The move is older than the settle window: the guard lets go.
+ path := filepath.Join(ds.root, provision.RecordKey(tb.sqid, "shop", remoteHost))
+ old := time.Now().Add(-channelSettle - time.Minute)
+ if err := os.Chtimes(path, old, old); err != nil {
+ t.Fatal(err)
+ }
+ if page := retire(); !strings.Contains(page, "Retired canary rc") {
+ t.Fatalf("retire after the settle window:\n%s", page)
+ }
+}
+
+// P2: the same unconverged follower, then B converges (reconcile, adopt the
+// new build, report): the report's build is the evidence, and the retire
+// goes ahead inside the window.
+func TestRetireCanaryAfterRemoteConvergence(t *testing.T) {
+ tb := newTwoBoxes(t)
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v4", "canary/rc")
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v5", "canary/next")
+ tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "canary/rc")
+ tb.reconcile(t, "v4")
+ if status, _, out := rawReq(t, http.MethodPost, instancesURL(tb.fx, tb.sqid, "shop")+"/"+remoteHost+"/channel", tb.token,
+ `{"channel":"canary/next"}`); status != http.StatusOK {
+ t.Fatalf("channel move = %d %s", status, out)
+ }
+ tb.reconcile(t, "")
+ if err := tb.regB.SetVersions(remoteHost, "v5", "v4"); err != nil {
+ t.Fatal(err)
+ }
+ report(t, tb.fx.rel, tb.regB, "box-b", "uk", time.Now(), nil, 4096)
+ tb.fx.srv.boxReports.expire()
+ hosts, err := tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "canary/rc")
+ if err != nil || len(hosts) != 0 {
+ t.Fatalf("followers of canary/rc after B converged = %v %v, want none", hosts, err)
+ }
+}
+
+// P1: a remote row with no ownership start (a record without created_at)
+// joins no readings, even from its accepted box.
+func TestRemoteRowWithoutStartHasNoReadings(t *testing.T) {
+ fx := newConsoleFixture(t)
+ const host = "nostart.example.com"
+ sweepAt(t, fx.rel, "box-x", time.Now(), map[string]metrics.UnitSample{"carlos-exec@" + host: {CPUFrac: p(0.5), MemBytes: pi64(1 << 20)}})
+ view := &AppView{Routes: []RouteView{{Host: host, Kind: "instance", Account: fx.sqid, Provisioned: true, remote: true, metricsBox: "box-x"}}}
+ am := fx.srv.appResourceMetrics(context.Background(), view, &Account{ID: OpsAccountID, Sqid: fx.sqid})
+ if len(am) != 1 || am[0].Reporting() {
+ t.Fatalf("metrics for a remote row with no start = %+v, want none", am)
+ }
+}
+
+// P1, `carlos instances list`: the box's newest sample of the hostname is
+// from before this account's record existed (a previous tenant's process).
+// It must not make this record Running.
+func TestRemoteInstancesListIgnoresPreviousTenantSample(t *testing.T) {
+ tb := newTwoBoxes(t)
+ before := time.Now().Add(-30 * time.Second)
+ sweepAt(t, tb.fx.rel, status.Label("box-b"), before, map[string]metrics.UnitSample{
+ "carlos-exec@" + remoteHost: {CPUFrac: p(0.66), MemBytes: pi64(7 << 20)},
+ })
+ time.Sleep(1100 * time.Millisecond) // created_at is whole seconds
+ tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "")
+ tb.reconcile(t, "v3")
+ report(t, tb.fx.rel, tb.regB, "box-b", "uk", time.Now(), nil, 4096)
+ if status, _, out := rawReq(t, http.MethodGet, instancesURL(tb.fx, tb.sqid, "shop"), tb.token, ""); status != http.StatusOK || strings.Contains(out, `"health":"Running"`) {
+ t.Fatalf("instances list = %d %s: a sample from before the record made it Running", status, out)
+ }
+}
+
+// P2: when the retiring channel and the new one point at the same build, a
+// report showing that build cannot tell them apart; only the settle window
+// lets the retire through.
+func TestRetireCanaryEqualBuildsWaitForWindow(t *testing.T) {
+ tb := newTwoBoxes(t)
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v4", "canary/rc")
+ if err := release.Promote(context.Background(), tb.fx.rel, tb.fx.priv, tb.sqid, "shop", "canary/next", "v4"); err != nil {
+ t.Fatal(err)
+ }
+ tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "canary/rc")
+ tb.reconcile(t, "v4")
+ if status, _, out := rawReq(t, http.MethodPost, instancesURL(tb.fx, tb.sqid, "shop")+"/"+remoteHost+"/channel", tb.token,
+ `{"channel":"canary/next"}`); status != http.StatusOK {
+ t.Fatalf("channel move = %d %s", status, out)
+ }
+ report(t, tb.fx.rel, tb.regB, "box-b", "uk", time.Now(), nil, 4096) // B still on rc, at v4
+ tb.fx.srv.boxReports.expire()
+ hosts, err := tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "canary/rc")
+ if err != nil || len(hosts) != 1 || hosts[0] != remoteHost {
+ t.Fatalf("followers of canary/rc = %v %v, want the unconverged host", hosts, err)
+ }
+}
diff --git a/internal/console/remoteinstances_test.go b/internal/console/remoteinstances_test.go
index 173101ab7..9a2fcae65 100644
--- a/internal/console/remoteinstances_test.go
+++ b/internal/console/remoteinstances_test.go
@@ -175,10 +175,12 @@ func report(t *testing.T, rel release.Store, reg *registry.Registry, machine, re
return b.Label
}
-// sweep writes box's metrics chunk: one exec-child unit per host given.
+// sweep writes box's metrics chunk: one exec-child unit per host given,
+// sampled now (after the instances it reads were created: earlier samples
+// of a hostname are not its current owner's, ownerAppMetricsFrom).
func sweep(t *testing.T, rel release.Store, box string, units map[string]metrics.UnitSample) {
t.Helper()
- at := time.Now().UTC().Add(-time.Minute)
+ at := time.Now().UTC()
if err := metrics.WriteRaw(context.Background(), rel, metrics.RawChunk{
V: 1, Box: box, Hour: metrics.HourOf(at),
Samples: []metrics.Sample{{At: at, Units: units}},
@@ -557,9 +559,20 @@ func TestChannelHostsCountsRemoteFollowers(t *testing.T) {
if err != nil || len(hosts) != 1 || hosts[0] != remoteHost {
t.Fatalf("canary/rc followers = %v %v, want [%s]", hosts, err, remoteHost)
}
+ // The remote record was written seconds ago and no report of its box
+ // shows it on its own channel's build yet, so it may have been moved
+ // off stable: a possible follower until it settles (unsettledFollowers).
+ hosts, err = tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "stable")
+ if err != nil || strings.Join(hosts, ",") != localHost+","+remoteHost {
+ t.Fatalf("stable followers = %v %v, want the local follower and the unsettled remote record", hosts, err)
+ }
+ old := time.Now().Add(-channelSettle - time.Minute)
+ if err := os.Chtimes(filepath.Join(tb.fx.rel.(*deletableStore).root, provision.RecordKey(tb.sqid, "shop", remoteHost)), old, old); err != nil {
+ t.Fatal(err)
+ }
hosts, err = tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "stable")
if err != nil || len(hosts) != 1 || hosts[0] != localHost {
- t.Fatalf("stable followers = %v %v, want [%s] once", hosts, err, localHost)
+ t.Fatalf("stable followers once settled = %v %v, want [%s] once", hosts, err, localHost)
}
// A sidecar following a canary from another region counts too.
if err := provision.PutSidecarManifest(context.Background(), tb.fx.rel, tb.sqid, "shop", provision.SidecarManifest{
@@ -582,6 +595,12 @@ func TestChannelHostsCountsRemoteFollowers(t *testing.T) {
t.Fatalf("channelHosts with %s failing = %v, nil error", family, hosts)
}
}
+ // A store that cannot list modification times cannot rule out a
+ // recent move off the channel: refuse rather than guess.
+ tb.fx.srv.cfg.Releases = struct{ release.Store }{live}
+ if hosts, err := tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "canary/zz"); err == nil {
+ t.Fatalf("channelHosts without modification times = %v, nil error", hosts)
+ }
// A listed sidecar record that will not read, even one deleted between
// the listing and the read, could still be running: refuse.
tb.fx.srv.cfg.Releases = vanishingStore{live, provision.SidecarRecordKey(tb.sqid, "shop", "bot")}
diff --git a/internal/console/server.go b/internal/console/server.go
index ea5ce8c1b..dc3c74048 100644
--- a/internal/console/server.go
+++ b/internal/console/server.go
@@ -3527,10 +3527,19 @@ func (s *Server) appResourceMetrics(ctx context.Context, view *AppView, acct *Ac
hib := make(map[string]bool, len(view.Routes))
unitByHost := make(map[string]string, len(view.Routes))
boxByHost := map[string]string{}
+ sinceByHost := map[string]time.Time{}
for _, rt := range view.Routes {
if rt.Account != acct.Sqid {
continue
}
+ // History starts when this owner came to have the host: samples
+ // from a previous tenant of the same hostname are not theirs. A
+ // remote row is always bounded (no start, no readings); a local row
+ // is bounded by its record's created_at, and a hand route with no
+ // record stays unbounded.
+ if rt.remote || !rt.since.IsZero() {
+ sinceByHost[rt.Host] = rt.since
+ }
// An instance on another box joins readings only from the box whose
// report was accepted for this account and app (remoteinstances.go),
// and none at all without one: the host name alone is not this
@@ -3547,7 +3556,7 @@ func (s *Server) appResourceMetrics(ctx context.Context, view *AppView, acct *Ac
unitByHost[rt.Host] = rt.Unit
}
}
- am, err := s.ownerAppMetricsFrom(ctx, hosts, unitByHost, boxByHost)
+ am, err := s.ownerAppMetricsFrom(ctx, hosts, unitByHost, boxByHost, sinceByHost)
if err != nil {
log.Printf("console: app metrics %s: %v", view.App, err)
return nil
@@ -5143,6 +5152,12 @@ func (s *Server) handleFastTrack(w http.ResponseWriter, r *http.Request) {
// name becomes a channel path segment and an on-box state file name.
var canaryNameRe = regexp.MustCompile(`^[a-z][a-z0-9-]{0,31}$`)
+// channelSettle is how long after an instance or sidecar record last changed
+// the canary-retire guard keeps treating it as a possible follower of the
+// channel being retired, unless its box's report shows it already on its
+// new channel's build.
+const channelSettle = 15 * time.Minute
+
// channelHosts lists the hosts that follow app's channel, and reports
// whether that could be checked at all. Two sources, because a follower can
// live on any box:
@@ -5174,6 +5189,7 @@ func (s *Server) channelHosts(ctx context.Context, acct, app, channel string) ([
}
var out []string
seen := map[string]bool{}
+ local := make(map[string]bool, len(routes))
add := func(host string) {
if !seen[host] {
seen[host] = true
@@ -5181,6 +5197,7 @@ func (s *Server) channelHosts(ctx context.Context, acct, app, channel string) ([
}
}
for _, rt := range routes {
+ local[rt.Host] = true
if rt.App == app && rt.Channel == channel {
add(rt.Host)
}
@@ -5197,9 +5214,18 @@ func (s *Server) channelHosts(ctx context.Context, acct, app, channel string) ([
if len(unreadable) > 0 {
return nil, fmt.Errorf("instance records of %s/%s: %d will not read", acct, app, len(unreadable))
}
+ // Records on another channel now may have been moved off this one
+ // moments ago, with their box not converged yet (unsettledFollowers).
+ others := map[string]settleCandidate{}
for _, rec := range recs {
if rec.Channel == channel {
add(rec.Host)
+ continue
+ }
+ if !local[rec.Host] {
+ // A host with a row here has its channel read off that row
+ // above; only a host on another box needs the settle rule.
+ others[provision.RecordKey(acct, app, rec.Host)] = settleCandidate{host: rec.Host, channel: rec.Channel}
}
}
// Sidecar records are read here rather than through
@@ -5227,8 +5253,19 @@ func (s *Server) channelHosts(ctx context.Context, acct, app, channel string) ([
}
if rec.Channel == channel {
add(rec.Host)
+ continue
+ }
+ if !local[rec.Host] {
+ others[key] = settleCandidate{host: rec.Host, channel: rec.Channel}
}
}
+ unsettled, err := s.unsettledFollowers(ctx, acct, app, channel, others)
+ if err != nil {
+ return nil, err
+ }
+ for _, host := range unsettled {
+ add(host)
+ }
return out, nil
}
@@ -5512,11 +5549,14 @@ func summarize(v AppView, acct string) appRow {
}
deployment := observedDeployment(v.Routes, acct)
row := appRow{App: v.App, URL: apexHost(mine), Deployment: deployment}
- attention := false
+ attention, unknown := false, false
for _, rt := range mine {
if !rt.Platform && rt.Status == "failed" {
attention = true
}
+ // An instance on another box whose state no report vouches for
+ // (remoteinstances.go): the row can't tell, not "Deployed".
+ unknown = unknown || rt.unknown
}
for _, ch := range v.Channels {
if ch.Err == "" && strings.HasPrefix(ch.Name, "canary/") {
@@ -5528,6 +5568,8 @@ func summarize(v AppView, acct string) appRow {
row.Verdict, row.VerdictLabel = "notdeployed", "Not deployed yet"
case attention:
row.Verdict, row.VerdictLabel = "attention", "Needs attention"
+ case unknown:
+ row.Verdict, row.VerdictLabel = "unknown", "Can't tell right now"
case deployment.ReportableCount == 0:
row.Verdict, row.VerdictLabel = "ok", "Deployed"
case !deployment.HasReportedVersion():
diff --git a/internal/console/templates/app_overview.html b/internal/console/templates/app_overview.html
index ff4f5ea46..05508285b 100644
--- a/internal/console/templates/app_overview.html
+++ b/internal/console/templates/app_overview.html
@@ -29,8 +29,8 @@
routinely share a box. */}}
<a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/instances">
<h2>Running</h2>
- <p class="tile-value">{{if eq .InstanceTotal 0}}—{{else if eq .InstanceExpected 0}}Served{{else if .MetricsUnavailable}}?{{else if eq .InstanceCounted 0}}?{{else}}{{.InstanceReporting}} of {{.InstanceCounted}}{{end}}</p>
- <p class="tile-detail">{{if eq .InstanceTotal 0}}nothing running yet{{else if eq .InstanceExpected 0}}static — the platform serves it, nothing to run{{else if or .MetricsUnavailable (and (eq .InstanceCounted 0) .InstanceUnknown)}}no data right now{{else if eq .InstanceCounted 0}}no readings for {{.InstanceNoReadings}} copies — stamp their units to see health{{else}}copies reporting{{if .InstanceAsleep}} · {{.InstanceAsleep}} asleep{{end}}{{if .InstanceNoReadings}} · {{.InstanceNoReadings}} no readings{{end}}{{end}}</p>
+ <p class="tile-value">{{if eq .InstanceTotal 0}}—{{else if and (eq .InstanceExpected 0) (eq .InstanceUnknown 0)}}Served{{else if .MetricsUnavailable}}?{{else if eq .InstanceCounted 0}}?{{else}}{{.InstanceReporting}} of {{.InstanceCounted}}{{end}}</p>
+ <p class="tile-detail">{{if eq .InstanceTotal 0}}nothing running yet{{else if and (eq .InstanceExpected 0) (eq .InstanceUnknown 0)}}static — the platform serves it, nothing to run{{else if or .MetricsUnavailable (and (eq .InstanceCounted 0) .InstanceUnknown)}}no data right now{{else if eq .InstanceCounted 0}}no readings for {{.InstanceNoReadings}} copies — stamp their units to see health{{else}}copies reporting{{if .InstanceAsleep}} · {{.InstanceAsleep}} asleep{{end}}{{if .InstanceNoReadings}} · {{.InstanceNoReadings}} no readings{{end}}{{end}}</p>
</a>
<a class="tile" href="{{$.Nav}}/apps/{{$.AppName}}/instances">
<h2>Resources</h2>
diff --git a/internal/console/view.go b/internal/console/view.go
index 80e697204..a23a9baed 100644
--- a/internal/console/view.go
+++ b/internal/console/view.go
@@ -382,6 +382,13 @@ type RouteView struct {
// (remoteRoute): its health reads "Can't tell right now".
metricsBox string
unknown bool
+ // since is when this row's owner came to have the host: its instance
+ // record's created_at (addRemoteRows sets it on local rows that have a
+ // record too). Metrics samples before it are not this owner's
+ // (ownerAppMetricsFrom). Zero on a local row (a hand route with no
+ // record) leaves the row unbounded, as before; on a remote row it means
+ // no readings.
+ since time.Time
}
// humanizeCaps renders a registry.Route.Caps column for a person: the
@@ -685,14 +692,28 @@ func Assemble(regPath string, s release.Store, pub ed25519.PublicKey, acct strin
// disagrees with its own path; this refuses one a reader handed over from
// anywhere else).
func addRemoteRows(remote *remoteRows, acct, app string, localHosts map[string]bool, routes []RouteView, domains []DomainView, dns DNSTargets) ([]RouteView, []DomainView) {
- recs, err := remote.records(app, localHosts)
+ recs, err := remote.records(app, nil)
if err != nil {
log.Printf("console: instance records %s/%s: %v", acct, app, err)
return routes, domains
}
+ ownLocal := make(map[string]int, len(routes))
+ for i, rt := range routes {
+ ownLocal[rt.Host] = i
+ }
added := false
for _, rec := range recs {
- if rec.Account != acct || rec.App != app || rec.Host == "" || localHosts[rec.Host] {
+ if rec.Account != acct || rec.App != app || rec.Host == "" {
+ continue
+ }
+ if localHosts[rec.Host] {
+ // The host's row is the console box's own. Its record still
+ // says when this owner came to have the hostname, which bounds
+ // the row's metrics history: an earlier tenant of the same
+ // hostname left samples under the same unit name.
+ if i, ok := ownLocal[rec.Host]; ok {
+ routes[i].since = rec.CreatedAt
+ }
continue
}
rv, dv := remoteRoute(rec, remote.reports.pick(rec.Host, acct, app), remote.reports.complete, acct, dns)
diff --git a/internal/provision/console_remote_instances_census_test.go b/internal/provision/console_remote_instances_census_test.go
index c872ea274..ba486cadf 100644
--- a/internal/provision/console_remote_instances_census_test.go
+++ b/internal/provision/console_remote_instances_census_test.go
@@ -17,6 +17,12 @@ package provision
// GetSidecarRecord, refusing on any read error, to count followers on
// other boxes; it reads, never writes: key-site, like
// Server.checkSidecars.
+// - Round 2 review: Server.channelHosts also builds RecordKey for the
+// app's records on other boxes, to match them against their listed
+// modification times; Server.unsettledFollowers is new and lists
+// RecordsPrefix and SidecarsPrefix with modification times (ListMod)
+// and reads channel pointers and box reports. Neither writes anything:
+// key-site.
// - Server.pageRecords is new (round 1 review): the app pages' record
// reader. It lists RecordsPrefix for the viewed account's app and reads
// each record not already a local row with GetRecord, through the
@@ -26,7 +32,8 @@ func consoleRemoteInstancesWriteCensusInventory() []censusEntry {
entries := append([]censusEntry(nil), edgeRateLimitWriteCensusInventory()...)
replacements := []censusEntry{
{"internal/console/instancepage.go", "Server.handleAppInstance", "key-site", "lit:instances", "07f5c01659b0d453d5996abb6a6e9493f74c7df97e3cddfe0f765b6f316de4a7"},
- {"internal/console/server.go", "Server.channelHosts", "key-site", "key:SidecarsPrefix", "0bfd742f32f4173619a9e0031c8c56cf47142762d60ec8e67a3ca1549a1028ef"},
+ {"internal/console/server.go", "Server.channelHosts", "key-site", "key:RecordKey,key:SidecarsPrefix", "56baa86331ca8e5e19b7a765bcca5fbd9250319a4eaf25b1ee4d71c5bca0fbed"},
+ {"internal/console/remoteinstances.go", "Server.unsettledFollowers", "key-site", "key:RecordsPrefix,key:SidecarsPrefix", "65d01bb2fcf25de6ed0a4577270b756bc3622a3b87e8c236b130872bf4f357ab"},
{"internal/console/remoteinstances.go", "Server.pageRecords", "key-site", "key:RecordsPrefix", "b03ec08af6e2eedc5b2fa269751b5fa3465c2e728c93a6c97964ebabb15362a4"},
}
for _, r := range replacements {
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index d1f7df03c..6cf404f84 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -23,4 +23,4 @@ plan14-root-reads-plans-4a-store.tsv 72dc835c04caf5b2b49cc6ecbfd865bb3123b997ee9
plan14-root-reads-plans-4-notices-grace.tsv 43e430a3b3edf9333bfe2c64f24ca9e4c04475dc45ae4983d4e8bcab6a9c0bc4
plan14-root-reads-design-edge-rate-limit-358-decisions.tsv a067dcd9e32e6be2b7dd9c6a8256d1252ac4c737fd058c430823e382add340c4
plan14-root-reads-design-edge-rate-limit-358.tsv 0c4eabfe38e12b098285bdeb5ceb0b16e5333928f5b02e160a6b16b5fd9ce1e0
-plan14-root-reads-console-remote-instances.tsv dfdf49f3de3e612a21a29c24addc123c18a6cd68355dc134409b8743e6f596b4
+plan14-root-reads-console-remote-instances.tsv a8214d93e8e14c449c4af0a5aac394fb0170c28a73b3996daeefab2aab1a164d
diff --git a/internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv b/internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv
index e7b54670c..16b014474 100644
--- a/internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv
+++ b/internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv
@@ -1,20 +1,23 @@
# Census overlay console-remote-instances, written by census-propose (#369). census-ruling-console-remote-instances, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-console-remote-instances.md.
-# 6 body, 2 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 7 body, 3 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
@legacy d0a3ae6c1eb6795c3810264874e4f1363432cbdd3aae6398e30422c7169a3726 internal/console/accountfleet.go Server.assembleAccountFleet legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Fleet tab: the shared-fleet app count also reads the account's own instance records (per app of the account, under its own prefix, region not a fleet placement); the registry read is unchanged. registry:Account@2350,registry:Account@4421,registry:App@2476,registry:Name@4814,registry:Region@2437,whole:Fleet@4006,whole:Fleet@4408,whole:Fleet@4522,whole:Route@2335 1b5ecf4066d067d721683d273e768d834df0bb9cb3cf5ff90648b1e6842bacc8
-@legacy 58a7d414fbb215c8294d5ff71b9223c0dddc230fe7b083c195bdf4f8e3bcb19d internal/console/apiinstances.go Server.healthByHost legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Takes an awake set (hosts whose accepted box report says awake) and a box pin per host (readings only from that box, via ownerAppMetricsFrom); registry reads unchanged. registry:Backing@1206,registry:Hibernate@1128,registry:Kind@1111,registry:Provisioned@1181,registry:Status@988,registry:Unit@1197,registry:Unit@347,registry:Unit@382,whole:Route@195,whole:Route@238,whole:Route@304,whole:Route@965 2cc7789d2acb4af7864927bb9a85409d70b8b39d3a5f22862660fa59cd916489
-@legacy 2bfa72171179fc26108bd6eb6b2308245cba25d3f82c41652b98637529a7ef76 internal/console/apiroutes.go Server.handleAPIRoutes legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Passes nil, nil for healthByHost's new awake and box-pin arguments; nothing else. registry:Account@4609,registry:App@1646,registry:App@2109,registry:App@4548,registry:Backing@2269,registry:Canary@2407,registry:Channel@2129,registry:Environment@2154,registry:Hibernate@2228,registry:Host@1730,registry:Host@2051,registry:Host@2207,registry:Host@2363,registry:Host@4681,registry:Host@4761,registry:Kind@2066,registry:Platform@2392,registry:Prefix@4777,registry:Provisioned@2294,registry:Replication@2326,registry:Status@2178,registry:Target@4795,registry:Unit@2248,whole:Route@1635,whole:Route@1684,whole:Route@1721,whole:Route@1741,whole:Route@1861,whole:Route@1968,whole:Route@1999,whole:Route@2099,whole:Route@4672,whole:RoutePath@3614 ff28ee87238241e58e970f653409afd8d62b2e463ef9743fda24bb72fc841eef
+@legacy ab2c0cc1b9d16b0522527bc6b8cbf9927f78d0621057469bbc98bccd254fb40e internal/console/apiinstances.go Server.healthByHost legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Takes an awake set, a box pin per host and an ownership start per host from the caller (readings only from that box and only from samples at or after the start, via ownerAppMetricsFrom); registry reads unchanged. registry:Backing@1253,registry:Hibernate@1175,registry:Kind@1158,registry:Provisioned@1228,registry:Status@1035,registry:Unit@1244,registry:Unit@381,registry:Unit@416,whole:Route@1012,whole:Route@229,whole:Route@272,whole:Route@338 b6d1d75b2228a97cba475d87730c7cae3f48774ed973083dff0ef798263e613d
+@legacy a7ae52378a61d71162c98d6bfe643f3090fab3eb6bbb5ceb4092516fb7b59912 internal/console/apiroutes.go Server.handleAPIRoutes legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Passes nil for healthByHost's new awake, box-pin and ownership-start arguments; nothing else. registry:Account@4614,registry:App@1646,registry:App@2114,registry:App@4553,registry:Backing@2274,registry:Canary@2412,registry:Channel@2134,registry:Environment@2159,registry:Hibernate@2233,registry:Host@1730,registry:Host@2056,registry:Host@2212,registry:Host@2368,registry:Host@4686,registry:Host@4766,registry:Kind@2071,registry:Platform@2397,registry:Prefix@4782,registry:Provisioned@2299,registry:Replication@2331,registry:Status@2183,registry:Target@4800,registry:Unit@2253,whole:Route@1635,whole:Route@1684,whole:Route@1721,whole:Route@1741,whole:Route@1861,whole:Route@1973,whole:Route@2004,whole:Route@2104,whole:Route@4677,whole:RoutePath@3619 2b37acd8b5b5ddf6dcebaac0588bf44ed750b9fad749eb8cc46bd69875d774a4
@legacy 68455015fbe9d2db598f2616aa59f01bda880869dbee9d7b61b65506624f6e42 internal/console/instancepage.go Server.handleAppInstance legacy accepted-legacy accepted-legacy;rev3=merge-ruling-2;basis=Instance page adds updates view from rollout join; browser rendering remains legacy.;rev3=census-ruling-console-remote-instances;basis=A remote row (no local registry row) takes its aliases from its box report; local rows read ListAliases as before. file:Query@2672,registry:Account@2444,registry:Alias@2544,registry:App@2474,registry:Host@2422,whole:RouteAlias@2405 07f5c01659b0d453d5996abb6a6e9493f74c7df97e3cddfe0f765b6f316de4a7
-@legacy cc2a59e85603c31a16603b604500150850115905d8a4c7f5112d7f425bde8878 internal/console/server.go Server.channelHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Canary-retire guard also counts the account's instance records (ListRecordsStrict) and sidecar records (listed, then each read with GetSidecarRecord; any read error including not-found refuses) from the bucket, failing closed; the registry read is unchanged. registry:App@424,registry:Channel@441,registry:Host@472,whole:Route@410 0bfd742f32f4173619a9e0031c8c56cf47142762d60ec8e67a3ca1549a1028ef
-@legacy df95584ebc6921096d1081ae045d37253f93dfeefdface01cef61b78bbb96dba internal/console/templates/app_overview.html external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-console-remote-instances;basis=Running tile: when every instance's state is unknown (instances on other boxes no report vouches for) the detail reads the existing 'no data right now'; display only. file:external@0 db64e6c62c55a50f43ace2b0b47cf89fe31a4f78bacc5bc89df8ba19b8e43ee4
-@legacy bca792d24a010eb4e1deb8a64fe38a0dcadfe48cfd61044cc31b5339318e2480 internal/console/apiinstances.go Server.instanceHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Records with no local registry row get health only from a box report naming the record's own account and app, with readings pinned to that box; otherwise Setting up (complete read, no report) or Can't tell right now. Builds registry.Route literals from the record; reads no registry for them. registry:Account@1987,registry:Account@2007,registry:App@1948,registry:App@1964,registry:Host@839,registry:Unit@2117,registry:Unit@2159,whole:Route@1151,whole:Route@2054,whole:Route@2075,whole:Route@2854,whole:Route@3371,whole:Route@3703,whole:Route@792,whole:Route@821,whole:Route@832,whole:Route@850 25fea385596f376e01e1755ac0fc7225cd2541c8bd2744ff5dd0b232fca21ab6
-@legacy 46ce2361d69f3ea4f20a8654f43d3f8d4c42d089d9dab8a6f946855cbdd378d9 internal/console/view.go Assemble legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Collects the set of local registry hosts (rt.Host) so a record host the registry has gets no remote row and is not read; adds rows from the account's records and box reports when given a remote source. registry:App@1716,registry:App@1739,registry:App@2117,registry:App@2147,registry:Backing@2017,registry:Caps@1385,registry:Channel@960,registry:Environment@1942,registry:Hibernate@1859,registry:Host@1768,registry:Host@861,registry:Kind@1783,registry:Platform@1889,registry:Provisioned@2042,registry:Status@1800,registry:Unit@1999,registry:Version@1823,whole:Route@2092,whole:Route@2167,whole:Route@810,whole:Route@839,whole:Route@910 120ae8c042523f872fd1c19357b8bb830e4afe9da1e38ad202df2ada3ad52ada
+@legacy aa852aec334f46af0b4bb16f7f81afa3d4690f0f12c6c80b2ab5cff4837367aa internal/console/metricsview.go buildUnitRows legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-console-remote-instances;basis=Each unit row also keeps its raw per-sample readings (float32 CPU, int64 memory) so an owner's graph can be redrawn from only their samples; reads nothing new. file:ReadBytes@315,file:ReadBytes@327 e7f942ea8d32626b6ead3313deec26c458a7d7c296e7120c7384dfc5f416c378
+@legacy 6942f141db3bdd170160d0f7fbb9416bdf417ee5944c3becfb580b1646f52064 internal/console/templates/app_overview.html external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-console-remote-instances;basis=Running tile: does not claim Served when a static route's state is unknown, and reads the existing 'no data right now' when every instance's state is unknown; display only. file:external@0 e853a6756a7b2fc841ccb7d290f39e8bda12d3869f4b215531004126ab49efe7
+@legacy dd950cb96d11e4f21b83d9e4b1f590f2bbee9bb9c3bc7d27974a085fcee3bda9 internal/console/apiinstances.go Server.instanceHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Records with no local registry row get health only from a box report naming the record's own account and app (held down: Failed; transient or no tenant: Can't tell right now), readings pinned to that box and bounded by each record's created_at. Builds registry.Route literals from the record; reads no registry for them. registry:Account@1987,registry:Account@2007,registry:App@1948,registry:App@1964,registry:Host@839,registry:Unit@2117,registry:Unit@2159,whole:Route@1151,whole:Route@2054,whole:Route@2075,whole:Route@2854,whole:Route@3654,whole:Route@4134,whole:Route@4187,whole:Route@4302,whole:Route@792,whole:Route@821,whole:Route@832,whole:Route@850 e69364d7fdaa2f8606a32c5587b4f31293695dba9d920ae75246556b8d281941
+@legacy 8504e95be3d9c6b75629c402fb7a8c37fda9ce404e4a9d3a2716851d2356ed88 internal/console/server.go Server.channelHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Canary-retire guard also counts the account's instance records (ListRecordsStrict) and sidecar records (listed, then each read with GetSidecarRecord; any read error refuses), and records on other boxes changed within channelSettle unless their box report shows the new channel's build (unsettledFollowers); it notes which hosts have a local registry row (rt.Host) so only remote hosts are candidates. Fails closed. registry:App@493,registry:Channel@510,registry:Host@472,registry:Host@541,whole:Route@324,whole:Route@455 56baa86331ca8e5e19b7a765bcca5fbd9250319a4eaf25b1ee4d71c5bca0fbed
+@legacy d0891ad263e0efcbdd5b9c670366ba3c31e676d0838ce99f61221e8872c327e6 internal/console/view.go Assemble legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Collects the set of local registry hosts (rt.Host) so a record host the registry has gets no remote row (its record's created_at bounds the local row's metrics history); adds rows from the account's records and box reports when given a remote source. registry:App@1716,registry:App@1739,registry:App@2117,registry:App@2147,registry:Backing@2017,registry:Caps@1385,registry:Channel@960,registry:Environment@1942,registry:Hibernate@1859,registry:Host@1768,registry:Host@861,registry:Kind@1783,registry:Platform@1889,registry:Provisioned@2042,registry:Status@1800,registry:Unit@1999,registry:Version@1823,whole:Route@2092,whole:Route@2167,whole:Route@810,whole:Route@839,whole:Route@910 120ae8c042523f872fd1c19357b8bb830e4afe9da1e38ad202df2ada3ad52ada
internal/console/accountfleet.go Server.assembleAccountFleet legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Fleet tab: the shared-fleet app count also reads the account's own instance records (per app of the account, under its own prefix, region not a fleet placement); the registry read is unchanged. registry:Account@2350,registry:Account@4421,registry:App@2476,registry:Name@4814,registry:Region@2437,whole:Fleet@4006,whole:Fleet@4408,whole:Fleet@4522,whole:Route@2335 1b5ecf4066d067d721683d273e768d834df0bb9cb3cf5ff90648b1e6842bacc8
-internal/console/apiinstances.go Server.healthByHost legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Takes an awake set (hosts whose accepted box report says awake) and a box pin per host (readings only from that box, via ownerAppMetricsFrom); registry reads unchanged. registry:Backing@1206,registry:Hibernate@1128,registry:Kind@1111,registry:Provisioned@1181,registry:Status@988,registry:Unit@1197,registry:Unit@347,registry:Unit@382,whole:Route@195,whole:Route@238,whole:Route@304,whole:Route@965 2cc7789d2acb4af7864927bb9a85409d70b8b39d3a5f22862660fa59cd916489
-internal/console/apiroutes.go Server.handleAPIRoutes legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Passes nil, nil for healthByHost's new awake and box-pin arguments; nothing else. registry:Account@4609,registry:App@1646,registry:App@2109,registry:App@4548,registry:Backing@2269,registry:Canary@2407,registry:Channel@2129,registry:Environment@2154,registry:Hibernate@2228,registry:Host@1730,registry:Host@2051,registry:Host@2207,registry:Host@2363,registry:Host@4681,registry:Host@4761,registry:Kind@2066,registry:Platform@2392,registry:Prefix@4777,registry:Provisioned@2294,registry:Replication@2326,registry:Status@2178,registry:Target@4795,registry:Unit@2248,whole:Route@1635,whole:Route@1684,whole:Route@1721,whole:Route@1741,whole:Route@1861,whole:Route@1968,whole:Route@1999,whole:Route@2099,whole:Route@4672,whole:RoutePath@3614 ff28ee87238241e58e970f653409afd8d62b2e463ef9743fda24bb72fc841eef
+internal/console/apiinstances.go Server.healthByHost legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Takes an awake set, a box pin per host and an ownership start per host from the caller (readings only from that box and only from samples at or after the start, via ownerAppMetricsFrom); registry reads unchanged. registry:Backing@1253,registry:Hibernate@1175,registry:Kind@1158,registry:Provisioned@1228,registry:Status@1035,registry:Unit@1244,registry:Unit@381,registry:Unit@416,whole:Route@1012,whole:Route@229,whole:Route@272,whole:Route@338 b6d1d75b2228a97cba475d87730c7cae3f48774ed973083dff0ef798263e613d
+internal/console/apiroutes.go Server.handleAPIRoutes legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Passes nil for healthByHost's new awake, box-pin and ownership-start arguments; nothing else. registry:Account@4614,registry:App@1646,registry:App@2114,registry:App@4553,registry:Backing@2274,registry:Canary@2412,registry:Channel@2134,registry:Environment@2159,registry:Hibernate@2233,registry:Host@1730,registry:Host@2056,registry:Host@2212,registry:Host@2368,registry:Host@4686,registry:Host@4766,registry:Kind@2071,registry:Platform@2397,registry:Prefix@4782,registry:Provisioned@2299,registry:Replication@2331,registry:Status@2183,registry:Target@4800,registry:Unit@2253,whole:Route@1635,whole:Route@1684,whole:Route@1721,whole:Route@1741,whole:Route@1861,whole:Route@1973,whole:Route@2004,whole:Route@2104,whole:Route@4677,whole:RoutePath@3619 2b37acd8b5b5ddf6dcebaac0588bf44ed750b9fad749eb8cc46bd69875d774a4
internal/console/instancepage.go Server.handleAppInstance legacy accepted-legacy accepted-legacy;rev3=merge-ruling-2;basis=Instance page adds updates view from rollout join; browser rendering remains legacy.;rev3=census-ruling-console-remote-instances;basis=A remote row (no local registry row) takes its aliases from its box report; local rows read ListAliases as before. file:Query@2672,registry:Account@2444,registry:Alias@2544,registry:App@2474,registry:Host@2422,whole:RouteAlias@2405 07f5c01659b0d453d5996abb6a6e9493f74c7df97e3cddfe0f765b6f316de4a7
-internal/console/server.go Server.channelHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Canary-retire guard also counts the account's instance records (ListRecordsStrict) and sidecar records (listed, then each read with GetSidecarRecord; any read error including not-found refuses) from the bucket, failing closed; the registry read is unchanged. registry:App@424,registry:Channel@441,registry:Host@472,whole:Route@410 0bfd742f32f4173619a9e0031c8c56cf47142762d60ec8e67a3ca1549a1028ef
-internal/console/templates/app_overview.html external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-console-remote-instances;basis=Running tile: when every instance's state is unknown (instances on other boxes no report vouches for) the detail reads the existing 'no data right now'; display only. file:external@0 db64e6c62c55a50f43ace2b0b47cf89fe31a4f78bacc5bc89df8ba19b8e43ee4
-internal/console/apiinstances.go Server.instanceHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Records with no local registry row get health only from a box report naming the record's own account and app, with readings pinned to that box; otherwise Setting up (complete read, no report) or Can't tell right now. Builds registry.Route literals from the record; reads no registry for them. registry:Account@1987,registry:Account@2007,registry:App@1948,registry:App@1964,registry:Host@839,registry:Unit@2117,registry:Unit@2159,whole:Route@1151,whole:Route@2054,whole:Route@2075,whole:Route@2854,whole:Route@3371,whole:Route@3703,whole:Route@792,whole:Route@821,whole:Route@832,whole:Route@850 25fea385596f376e01e1755ac0fc7225cd2541c8bd2744ff5dd0b232fca21ab6
-internal/console/view.go Assemble legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Collects the set of local registry hosts (rt.Host) so a record host the registry has gets no remote row and is not read; adds rows from the account's records and box reports when given a remote source. registry:App@1716,registry:App@1739,registry:App@2117,registry:App@2147,registry:Backing@2017,registry:Caps@1385,registry:Channel@960,registry:Environment@1942,registry:Hibernate@1859,registry:Host@1768,registry:Host@861,registry:Kind@1783,registry:Platform@1889,registry:Provisioned@2042,registry:Status@1800,registry:Unit@1999,registry:Version@1823,whole:Route@2092,whole:Route@2167,whole:Route@810,whole:Route@839,whole:Route@910 120ae8c042523f872fd1c19357b8bb830e4afe9da1e38ad202df2ada3ad52ada
-@coverage internal/console 7774e036ab1ece335abc7757cc5076c6a32f981dda650f1ac2b03a73ec1fc687
-@coverage internal/console/templates 1dfd2d48f0caf03649430aeab692dee79c3dc3496345f6311346fae773929832
+internal/console/metricsview.go buildUnitRows legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-console-remote-instances;basis=Each unit row also keeps its raw per-sample readings (float32 CPU, int64 memory) so an owner's graph can be redrawn from only their samples; reads nothing new. file:ReadBytes@315,file:ReadBytes@327 e7f942ea8d32626b6ead3313deec26c458a7d7c296e7120c7384dfc5f416c378
+internal/console/metricsview.go type UnitRow diagnostic H3 schema-only;rev3=census-ruling-console-remote-instances;basis=Two unexported fields carrying those raw per-sample readings; schema only. file:ReadBytes@133 db66030c5353fee88e0826786a424e0fee88d3191004deff380d00086bef5d62
+internal/console/templates/app_overview.html external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-console-remote-instances;basis=Running tile: does not claim Served when a static route's state is unknown, and reads the existing 'no data right now' when every instance's state is unknown; display only. file:external@0 e853a6756a7b2fc841ccb7d290f39e8bda12d3869f4b215531004126ab49efe7
+internal/console/apiinstances.go Server.instanceHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Records with no local registry row get health only from a box report naming the record's own account and app (held down: Failed; transient or no tenant: Can't tell right now), readings pinned to that box and bounded by each record's created_at. Builds registry.Route literals from the record; reads no registry for them. registry:Account@1987,registry:Account@2007,registry:App@1948,registry:App@1964,registry:Host@839,registry:Unit@2117,registry:Unit@2159,whole:Route@1151,whole:Route@2054,whole:Route@2075,whole:Route@2854,whole:Route@3654,whole:Route@4134,whole:Route@4187,whole:Route@4302,whole:Route@792,whole:Route@821,whole:Route@832,whole:Route@850 e69364d7fdaa2f8606a32c5587b4f31293695dba9d920ae75246556b8d281941
+internal/console/server.go Server.channelHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Canary-retire guard also counts the account's instance records (ListRecordsStrict) and sidecar records (listed, then each read with GetSidecarRecord; any read error refuses), and records on other boxes changed within channelSettle unless their box report shows the new channel's build (unsettledFollowers); it notes which hosts have a local registry row (rt.Host) so only remote hosts are candidates. Fails closed. registry:App@493,registry:Channel@510,registry:Host@472,registry:Host@541,whole:Route@324,whole:Route@455 56baa86331ca8e5e19b7a765bcca5fbd9250319a4eaf25b1ee4d71c5bca0fbed
+internal/console/view.go Assemble legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Collects the set of local registry hosts (rt.Host) so a record host the registry has gets no remote row (its record's created_at bounds the local row's metrics history); adds rows from the account's records and box reports when given a remote source. registry:App@1716,registry:App@1739,registry:App@2117,registry:App@2147,registry:Backing@2017,registry:Caps@1385,registry:Channel@960,registry:Environment@1942,registry:Hibernate@1859,registry:Host@1768,registry:Host@861,registry:Kind@1783,registry:Platform@1889,registry:Provisioned@2042,registry:Status@1800,registry:Unit@1999,registry:Version@1823,whole:Route@2092,whole:Route@2167,whole:Route@810,whole:Route@839,whole:Route@910 120ae8c042523f872fd1c19357b8bb830e4afe9da1e38ad202df2ada3ad52ada
+@coverage internal/console 41f425dc01d59b523bb2f69c6c3e721f064e54cdfbe38673eb619df2d2647dfe
+@coverage internal/console/templates d953013575663fbd275b663ac3d9b46e99eb830b223b9e545ddec7580468d5db