carlos / platform Public

console remote instances: close the Codex census escalations on d09ea830

- A provisioned local row whose record cannot be read has an unknown
  ownership start and shows no readings (RouteView.bounded); only a hand
  route with no record keeps its whole window.
- Canary-retire guard: a candidate missing from the modification-time
  listing counts as changed within the window; an unreadable retiring
  pointer fails closed (a missing one has nothing to strand); and a fresh
  tenant-named report still showing the retiring channel's build holds
  the retire whatever the record's age, so record age alone is no longer
  taken as convergence.

Tests fail first on d09ea830; 11 mutants on the new code, all killed.
Census re-proposed (approval classes only); unsettledFollowers digest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 050a3a7e55272e99ecd6792dfae0e95fdf9f94dd parent d09ea83
10 files changed, +182 −46
  • docs/superpowers/notes/census-proposal-console-remote-instances.md +2 −2
  • docs/superpowers/notes/console-remote-instances.md +22 −8
  • internal/console/remoteinstances.go +39 −20
  • internal/console/remoteinstances_round2_test.go +94 −2
  • internal/console/remoteinstances_test.go +2 −0
  • internal/console/server.go +4 −4
  • internal/console/view.go +14 −5
  • internal/provision/console_remote_instances_census_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv +3 −3

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 50c5c3f2f..b8f0b17fd 100644
--- a/docs/superpowers/notes/census-proposal-console-remote-instances.md
+++ b/docs/superpowers/notes/census-proposal-console-remote-instances.md
@@ -12,7 +12,7 @@ Ruling `census-ruling-console-remote-instances`. Every change below keeps the di
| `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/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 that changed within channelSettle (or have no modification time) unless their box report shows the new channel's build, or whose box report still shows the retiring channel's build at any age (unsettledFollowers); it notes which hosts have a local registry row (rt.Host) so only remote hosts are candidates. Fails closed, including on an unreadable retiring pointer. |
| `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`.
@@ -32,6 +32,6 @@ Recorded dispositions, which each change must still satisfy:
- `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` → `a8214d93e8e14c449c4af0a5aac394fb0170c28a73b3996daeefab2aab1a164d`.
+Seal: `0c4eabfe38e12b098285bdeb5ceb0b16e5333928f5b02e160a6b16b5fd9ce1e0` → `6fc23039029e8ec93637ea4ac7b5718e0add91c4c4595e54ce42621dc1d35ba6`.
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 fabb1d303..f92b10a40 100644
--- a/docs/superpowers/notes/console-remote-instances.md
+++ b/docs/superpowers/notes/console-remote-instances.md
@@ -56,9 +56,11 @@ being inert when the AU and UK boxes started hosting instances.
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
+ an instance record are bounded by that record too, and a provisioned
+ local row whose record cannot be read (a failed listing, an unreadable
+ record) has an unknown start and shows nothing. Only 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
@@ -218,11 +220,16 @@ Three findings, all fixed, each with a test that failed on 02edd585
"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
+ carry a host's channel, so the guard uses builds and time. A record on
+ another box is a possible follower of the retiring channel when a fresh
+ report of its box, naming this account and app, still shows the host on
+ the retiring channel's build (and its new channel points elsewhere),
+ whatever the record's age; or when the record changed within
+ `channelSettle` (15 minutes), or has no modification time, unless such a
+ report shows the host on its new channel's own build. When both channels
+ point at one build no report can tell them apart, and only the window
+ decides. An unreadable retiring pointer, a store without modification
+ times or a failed listing refuses. 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
@@ -233,3 +240,10 @@ Three findings, all fixed, each with a test that failed on 02edd585
off their registry row and are never held by the window. A store that
cannot list modification times (both real stores can) refuses.
+The Codex census review of the round 2 tip (d09ea830) escalated four
+gaps in these fixes, all closed before CI: an unknown local start fell
+back to the whole window; a record missing from the modification-time
+listing counted as settled; an unreadable retiring pointer read as "no
+build"; and record age alone was taken as convergence even while the box
+reported the retiring build.
+
diff --git a/internal/console/remoteinstances.go b/internal/console/remoteinstances.go
index 48b91fe9a..e9a654ada 100644
--- a/internal/console/remoteinstances.go
+++ b/internal/console/remoteinstances.go
@@ -304,6 +304,7 @@ func remoteRoute(rec provision.Record, rep *hostReport, complete bool, acct stri
Provisioned: true,
remote: true,
since: rec.CreatedAt,
+ bounded: true,
}
typ := "custom"
if strings.HasPrefix(ch, "canary/") {
@@ -449,35 +450,43 @@ type settleCandidate struct{ host, channel string }
// 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.
+// Whatever a record's age, a fresh tenant-named report showing its host on
+// the retiring channel's build, which its new channel does not point at, is
+// evidence it has not converged, and holds the retire too. (When the two
+// channels point at one build, no report can tell them apart; then only
+// the window decides.) Everything else is settled. 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: an unreadable retiring
+// pointer, a store that cannot list modification times (both real stores
+// can) or a failed listing is an error whenever there is a candidate, and a
+// candidate missing from the modification-time listing (deleted since it
+// was read) counts as changed within the window.
func (s *Server) unsettledFollowers(ctx context.Context, acct, app, channel string, others map[string]settleCandidate) ([]string, error) {
if len(others) == 0 {
return nil, nil
}
+ retiring, err := release.Channel(ctx, s.cfg.Releases, s.cfg.ReleasePub, acct, app, channel)
+ switch {
+ case errors.Is(err, os.ErrNotExist):
+ return nil, nil // no pointer: there is nothing to strand
+ case err != nil:
+ return nil, fmt.Errorf("the %s pointer of %s/%s: %w", channel, acct, app, err)
+ }
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{}
+ mods := map[string]time.Time{}
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
- }
+ mods[o.Key] = o.Mod
}
}
- if len(recent) == 0 {
- return nil, nil
- }
versions := map[string]string{}
version := func(ch string) string {
if ch == "" {
@@ -486,25 +495,35 @@ func (s *Server) unsettledFollowers(ctx context.Context, acct, app, channel stri
if v, ok := versions[ch]; ok {
return v
}
- v := ""
+ v := "" // unreadable: matches no report
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)
+ for key, c := range others {
+ runs := ""
+ if rep := reports.pick(c.host, acct, app); rep != nil && rep.tenantKnown {
+ runs = rep.version
+ }
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
+ mod, listed := mods[key]
+ recent := !listed || now.Sub(mod) < channelSettle
+ switch {
+ case runs != "" && runs == retiring.Version && moved != retiring.Version:
+ // Its box still runs the retiring channel's build, which its new
+ // channel does not point at: whatever the record's age, it has
+ // not converged.
+ out = append(out, c.host)
+ case recent && !(runs != "" && runs == moved && moved != retiring.Version):
+ // Changed (or of unknown age) within the window, with no report
+ // showing it on its new channel's own build yet.
+ out = append(out, c.host)
}
- out = append(out, c.host)
}
sort.Strings(out)
return out, nil
diff --git a/internal/console/remoteinstances_round2_test.go b/internal/console/remoteinstances_round2_test.go
index 4cda5f889..d4c2686d2 100644
--- a/internal/console/remoteinstances_round2_test.go
+++ b/internal/console/remoteinstances_round2_test.go
@@ -5,6 +5,7 @@ package console
import (
"context"
+ "errors"
"net/http"
"net/url"
"os"
@@ -233,14 +234,26 @@ func TestRetireCanaryWaitsForRemoteConvergence(t *testing.T) {
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.
+ // The move is older than the settle window, but B's fresh report still
+ // shows the retiring channel's build (v4, not next's v5): record age is
+ // not convergence, so the retire stays refused.
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, "still has a host ("+remoteHost+") following it") {
+ t.Fatalf("retire after the window while B still runs the retiring build:\n%s", page)
+ }
+ // B converges and reports the new build: the retire goes ahead.
+ 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()
if page := retire(); !strings.Contains(page, "Retired canary rc") {
- t.Fatalf("retire after the settle window:\n%s", page)
+ t.Fatalf("retire once B converged:\n%s", page)
}
}
@@ -322,3 +335,82 @@ func TestRetireCanaryEqualBuildsWaitForWindow(t *testing.T) {
t.Fatalf("followers of canary/rc = %v %v, want the unconverged host", hosts, err)
}
}
+
+// Codex round 2 (census review of d09ea830), P1: a provisioned local row
+// whose record cannot be read has no known ownership start, so it shows no
+// readings rather than the whole window.
+func TestLocalMetricsUnknownStartHasNoReadings(t *testing.T) {
+ tb := newTwoBoxes(t)
+ tb.create(t, tb.token, tb.sqid, "shop", localHost, "ie", "")
+ tb.reconcile(t, "v3")
+ sweepAt(t, tb.fx.rel, "box-console", time.Now(), map[string]metrics.UnitSample{"carlos-exec@" + localHost: {CPUFrac: p(0.5), MemBytes: pi64(1 << 20)}})
+ tb.fx.srv.cfg.Releases = remoteFailingRecordStore{tb.fx.rel, "/instances/"}
+ 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 && m.Reporting() {
+ t.Fatalf("a provisioned local row with no readable record showed readings: %+v", m)
+ }
+ }
+}
+
+// listModHiding drops one key from ListMod: a record deleted between its
+// read and the modification-time listing.
+type listModHiding struct {
+ *deletableStore
+ hide string
+}
+
+func (s listModHiding) ListMod(ctx context.Context, prefix string) ([]release.KeyMod, error) {
+ objs, err := s.deletableStore.ListMod(ctx, prefix)
+ var out []release.KeyMod
+ for _, o := range objs {
+ if o.Key != s.hide {
+ out = append(out, o)
+ }
+ }
+ return out, err
+}
+
+// pointerFailing fails reads of one channel pointer.
+type pointerFailing struct {
+ *deletableStore
+ key string
+}
+
+func (s pointerFailing) Get(ctx context.Context, key string) ([]byte, string, error) {
+ if key == s.key {
+ return nil, "", errors.New("boom")
+ }
+ return s.deletableStore.Get(ctx, key)
+}
+
+// Codex round 2, P2: a candidate with no modification time is not settled,
+// and an unreadable retiring pointer fails the check closed.
+func TestRetireGuardUnknownsFailClosed(t *testing.T) {
+ tb := newTwoBoxes(t)
+ ds := tb.fx.rel.(*deletableStore)
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v4", "canary/rc")
+ tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "stable")
+ tb.reconcile(t, "v3")
+ old := time.Now().Add(-channelSettle - time.Minute)
+ if err := os.Chtimes(filepath.Join(ds.root, provision.RecordKey(tb.sqid, "shop", remoteHost)), old, old); err != nil {
+ t.Fatal(err)
+ }
+ // No report of B: nothing shows the host on either build, so only the
+ // record's age speaks for it.
+ tb.fx.srv.boxReports.expire()
+ if hosts, err := tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "canary/rc"); err != nil || len(hosts) != 0 {
+ t.Fatalf("fixture: settled host = %v %v", hosts, err)
+ }
+ tb.fx.srv.cfg.Releases = listModHiding{ds, provision.RecordKey(tb.sqid, "shop", remoteHost)}
+ if hosts, err := tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "canary/rc"); err == nil && len(hosts) == 0 {
+ t.Fatal("a record missing from the modification-time listing was treated as settled")
+ }
+ tb.fx.srv.cfg.Releases = pointerFailing{ds, release.ChannelKey(tb.sqid, "shop", "canary/rc")}
+ if hosts, err := tb.fx.srv.channelHosts(context.Background(), tb.sqid, "shop", "canary/rc"); err == nil {
+ t.Fatalf("an unreadable retiring pointer = %v, nil error", hosts)
+ }
+}
diff --git a/internal/console/remoteinstances_test.go b/internal/console/remoteinstances_test.go
index 9a2fcae65..196ac5f04 100644
--- a/internal/console/remoteinstances_test.go
+++ b/internal/console/remoteinstances_test.go
@@ -552,6 +552,7 @@ func TestRetireCanaryRefusedForRemoteFollower(t *testing.T) {
// routes, instance records and sidecar records all count, once each.
func TestChannelHostsCountsRemoteFollowers(t *testing.T) {
tb := newTwoBoxes(t)
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v4", "canary/rc")
tb.create(t, tb.token, tb.sqid, "shop", remoteHost, "uk", "canary/rc")
tb.create(t, tb.token, tb.sqid, "shop", localHost, "ie", "stable")
tb.reconcile(t, "v3")
@@ -597,6 +598,7 @@ func TestChannelHostsCountsRemoteFollowers(t *testing.T) {
}
// A store that cannot list modification times cannot rule out a
// recent move off the channel: refuse rather than guess.
+ shipAndPromote(t, tb.fx, tb.sqid, "shop", "v9", "canary/zz")
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)
diff --git a/internal/console/server.go b/internal/console/server.go
index dc3c74048..bbde1cf43 100644
--- a/internal/console/server.go
+++ b/internal/console/server.go
@@ -3534,10 +3534,10 @@ func (s *Server) appResourceMetrics(ctx context.Context, view *AppView, acct *Ac
}
// 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() {
+ // remote row is always bounded (no start, no readings), and so is a
+ // local row that is provisioned or has a record (RouteView.bounded);
+ // only a hand route with no record is not.
+ if rt.remote || rt.bounded {
sinceByHost[rt.Host] = rt.since
}
// An instance on another box joins readings only from the box whose
diff --git a/internal/console/view.go b/internal/console/view.go
index a23a9baed..0bb6ae27f 100644
--- a/internal/console/view.go
+++ b/internal/console/view.go
@@ -389,6 +389,12 @@ type RouteView struct {
// record) leaves the row unbounded, as before; on a remote row it means
// no readings.
since time.Time
+ // bounded says since applies to this row's readings, zero meaning no
+ // readings at all: every remote row, and every local row that is
+ // provisioned or has a record. A provisioned local row whose record
+ // could not be read has an unknown start, so it shows nothing rather
+ // than the whole window. Only a hand route with no record is unbounded.
+ bounded bool
}
// humanizeCaps renders a registry.Route.Caps column for a person: the
@@ -692,15 +698,18 @@ 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) {
+ ownLocal := make(map[string]int, len(routes))
+ for i, rt := range routes {
+ ownLocal[rt.Host] = i
+ // A provisioned row has a record by construction: until it is
+ // read, its ownership start is unknown.
+ routes[i].bounded = rt.Provisioned
+ }
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 == "" {
@@ -712,7 +721,7 @@ func addRemoteRows(remote *remoteRows, acct, app string, localHosts map[string]b
// 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
+ routes[i].since, routes[i].bounded = rec.CreatedAt, true
}
continue
}
diff --git a/internal/provision/console_remote_instances_census_test.go b/internal/provision/console_remote_instances_census_test.go
index ba486cadf..9f3f6c332 100644
--- a/internal/provision/console_remote_instances_census_test.go
+++ b/internal/provision/console_remote_instances_census_test.go
@@ -33,7 +33,7 @@ func consoleRemoteInstancesWriteCensusInventory() []censusEntry {
replacements := []censusEntry{
{"internal/console/instancepage.go", "Server.handleAppInstance", "key-site", "lit:instances", "07f5c01659b0d453d5996abb6a6e9493f74c7df97e3cddfe0f765b6f316de4a7"},
{"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.unsettledFollowers", "key-site", "key:RecordsPrefix,key:SidecarsPrefix", "48cbc6a4c86ebb8a71842049cd97a2ac9eed42ba3beecc0a76e4cead6a7ba833"},
{"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 6cf404f84..cfa9c1c2a 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 a8214d93e8e14c449c4af0a5aac394fb0170c28a73b3996daeefab2aab1a164d
+plan14-root-reads-console-remote-instances.tsv 6fc23039029e8ec93637ea4ac7b5718e0add91c4c4595e54ce42621dc1d35ba6
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 16b014474..d68c1d38a 100644
--- a/internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv
+++ b/internal/provision/testdata/plan14-root-reads-console-remote-instances.tsv
@@ -7,7 +7,7 @@
@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 2ee564cdf6efed16dd08b8f3763e0ccd6cf2ebd5bd446394db6d0bd729541e56 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 that changed within channelSettle (or have no modification time) unless their box report shows the new channel's build, or whose box report still shows the retiring channel's build at any age (unsettledFollowers); it notes which hosts have a local registry row (rt.Host) so only remote hosts are candidates. Fails closed, including on an unreadable retiring pointer. 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, 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
@@ -17,7 +17,7 @@ internal/console/metricsview.go buildUnitRows legacy accepted-legacy accepted-le
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/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 that changed within channelSettle (or have no modification time) unless their box report shows the new channel's build, or whose box report still shows the retiring channel's build at any age (unsettledFollowers); it notes which hosts have a local registry row (rt.Host) so only remote hosts are candidates. Fails closed, including on an unreadable retiring pointer. 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 efa83979663b313cee864276db19a6df18c0224f220fa8fbc4eef400c82acfa3
@coverage internal/console/templates d953013575663fbd275b663ac3d9b46e99eb830b223b9e545ddec7580468d5db