carlos / platform Public

edge: name a self-hosted console for replica calls in host.env

Astra P1 on 28b64c10: a route's unit is not proof of who wrote its
record (a legacy direct-S3 fleet box can write deployment records), so
dropping the account test let an injected console.service row make the
real console ambiguous. Route fields can't name an account-owned console.

CARLOS_REPLICA_CONSOLE_HOST (hub host.env, read at hub setup, checked to
be a host name) names the console route for replica calls, whatever its
account; the row must still be app console, unit console.service, local,
not an alias, regional, via tunnel or activator-owned. Unset, selection
is as before: the one accountless console.service route, which an
account-owned row neither displaces nor makes ambiguous. A self-hosted
deployment whose console lives in its operator account sets the
variable; the platform's own hubs need not.

Witness TestReplicaConsoleRouteShape (configured, unconfigured, injected
rows, tenant app named console, remote and absent hosts) and
TestReplicaConsoleHostFromEnv. Census re-proposed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 22e2158c667a7c9e53bab80a05f433300e18a893 parent 28b64c1
6 files changed, +109 −32
  • docs/superpowers/notes/census-proposal-replica-console-account.md +2 −2
  • internal/edge/edge.go +12 −3
  • internal/edge/replicaconsole.go +46 −8
  • internal/edge/replicaconsole_test.go +44 −14
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-replica-console-account.tsv +4 −4

CI cancelled — superseded by a newer push — run details

Intent

Human

<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="3f2dc8c6-1503-4a06-8216-67a278b5ec67"> Agent manager 8a3d302: good find. Plan: when replica-console-account merges, send the SHA to 2db0f16f and me. It becomes v0.35.2 = v0.35.1 + that commit only (hotfix branch), published and rolled to dev for a sanity pass; the flagship takes it with the next full release (which also carries the G6 and edge fences after their dev tests). Tito can take v0.35.2 straight away. Tell Tito&apos;s session that plan. </paseo-system>

Human

<task-notification> <task-id>b6hzg2sjw</task-id> <tool-use-id>toolu_01KzMbe6GxiLRU9ffqLTzise</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/b6hzg2sjw.output</output-file> <status>completed</status> <summary>Background command "Relay the v0.35.2 plan to Tito" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>b0tv1hbws</task-id> <tool-use-id>toolu_01PjBC161Evr5uvRgnw3JHud</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/b0tv1hbws.output</output-file> <status>completed</status> <summary>Background command "Tell 8a3d302 about the second fix" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>b8p675kdx</task-id> <tool-use-id>toolu_01M2Yynf3DrzZec5W5Bc8oEG</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/b8p675kdx.output</output-file> <status>completed</status> <summary>Background command "Run Astra's review of the console-route fix" completed (exit code 0)</summary> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="f063abd6-47c7-4b4b-a249-dcf37e983a5b"> Agent manager 8a3d302: agreed, taking the coordinator from trusted operator config is the right fix (memory bucket-records-are-not-a-tenancy-boundary). One Astra round on the new approach; if it raises another P1 in the same family, stop and tell me rather than iterate. v0.35.2 waits. </paseo-system>

Human

<task-notification> <task-id>bfq3wlb19</task-id> <tool-use-id>toolu_01HXYow2y1TdSVZxND7VfxsS</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/bfq3wlb19.output</output-file> <status>completed</status> <summary>Background command "Report Astra's P1 to 8a3d302 first" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bc2fm8090</task-id> <tool-use-id>toolu_01S3zNcGxs4x5D86vwKf5HRQ</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/bc2fm8090.output</output-file> <status>completed</status> <summary>Background command "Wait for CI on the console-route fix" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 53.6 g CO₂e (6,503,375 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on replica-console-account, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/notes/census-proposal-replica-console-account.md b/docs/superpowers/notes/census-proposal-replica-console-account.md
index e60d3f52e..94f494b80 100644
--- a/docs/superpowers/notes/census-proposal-replica-console-account.md
+++ b/docs/superpowers/notes/census-proposal-replica-console-account.md
@@ -4,7 +4,7 @@ Ruling `census-ruling-replica-console-account`. The independent reviewer approve
| unit | change | read sites | what changed |
|---|---|---|---|
-| `internal/edge/replicaconsole.go` `Edge.serveReplicaConsole` | sites | -registry:Account | selection drops the account-empty test (one fewer read of the in-memory route Account) so a self-hosted console installed into its operator account (Tito: account bab) is found; it still requires app console, unit console.service, a loopback upstream or socket, not alias, regional, via tunnel or activator-owned, and exactly one match. Tenant routes stay refused: a unit is set only by platform or operator records (provision.Record.Unit, named units), never by a tenant instance record. Witness TestReplicaConsoleRouteShape. No new read, no write. |
+| `internal/edge/replicaconsole.go` `Edge.serveReplicaConsole` | body | unchanged (6) | the console route for replica calls is the host named by operator config CARLOS_REPLICA_CONSOLE_HOST (host.env, read once at hub setup, validated as a host name) when set, whatever its account; still app console, unit console.service, loopback upstream or socket, not alias, regional, via tunnel or activator-owned, exactly one. Unset, selection is unchanged (accountless only). Route fields alone never name an account-owned console, so an injected record cannot take over or make it ambiguous. Witness TestReplicaConsoleRouteShape. Memory-only reads, no new read source, no write. |
Envelopes re-pinned: `internal/edge`.
@@ -14,6 +14,6 @@ Recorded dispositions, which each change must still satisfy:
- `internal/edge/replicaconsole.go` `Edge.serveReplicaConsole`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-stateless-coordinator-route;basis=Reads existing in-memory route fields to select a unique accountless console.service local upstream; refuses missing or ambiguous console, tenant routes, remote and tunnel upstreams. Reuses proxy and version wrapper; leaves fleet identity authentication at console.;rev3=census-ruling-retry-after-503;basis=the missing/ambiguous-console 503s go through UnavailableHeader (adds Retry-After 2 and answer/box headers); selection unchanged; no read added
-Seal: `846d1f22e6eb6b2cd8b3086fa554f15deba70418c6542b46b2e2a6a138b6c332` → `7ce05776898a80913f5970dfac4d713da5516b17f632aefa9c159a88a282ed84`.
+Seal: `846d1f22e6eb6b2cd8b3086fa554f15deba70418c6542b46b2e2a6a138b6c332` → `0a1771b2e24bbfb63f397da2b37fe29aa6e12b13f1961a62e7f670ab0aad2c0c`.
Overlay: `internal/provision/testdata/plan14-root-reads-replica-console-account.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/edge/edge.go b/internal/edge/edge.go
index 57e8ca19c..07e8e1b3f 100644
--- a/internal/edge/edge.go
+++ b/internal/edge/edge.go
@@ -115,9 +115,13 @@ type Activator interface {
// its backend. The host→backend map is swapped atomically, so reloads and
// zero-downtime deploys never drop a live connection.
type Edge struct {
- shutdownStarted func(time.Time)
- haIngress atomic.Pointer[haIngressLookup]
- haIngressBlocked atomic.Pointer[map[string]bool]
+ shutdownStarted func(time.Time)
+ // replicaConsoleHost is the operator-configured console route for
+ // fleet replica calls (replicaConsoleHostEnv); "" is the accountless
+ // console.service route. Set before serving.
+ replicaConsoleHost string
+ haIngress atomic.Pointer[haIngressLookup]
+ haIngressBlocked atomic.Pointer[map[string]bool]
// ReplicaProbe is configured before the first syncReplicaProbes call.
// Nil uses the private box landing over the existing tunnel transport.
ReplicaProbe func(context.Context, string, string) (replicas.Copy, error)
@@ -5453,6 +5457,11 @@ func enableTunnelsFromEnv(e *Edge) error {
return fmt.Errorf("CARLOS_TUNNEL_CLIENTS: %q is not a valid tunnel name — want [a-z0-9-]{1,32}, and it must match a route's --tunnel to carry anything", name)
}
}
+ consoleHost, err := replicaConsoleHostFromEnv(os.Getenv)
+ if err != nil {
+ return err
+ }
+ e.replicaConsoleHost = consoleHost
e.EnableTunnels(NewTunnelHub(host, clients))
// Rebuild the route table so tunnel-backed routes that were skipped (or
// left on their old socket/addr) by the startup reload pick up the hub,
diff --git a/internal/edge/replicaconsole.go b/internal/edge/replicaconsole.go
index 43b60e69f..5e8d9f214 100644
--- a/internal/edge/replicaconsole.go
+++ b/internal/edge/replicaconsole.go
@@ -1,22 +1,60 @@
package edge
-import "net/http"
+import (
+ "fmt"
+ "net/http"
+ "strings"
+
+ "github.com/carlosframework/platform/internal/controlname"
+)
+
+// replicaConsoleHostEnv names, in the hub's host.env, the console route the
+// hub hands fleet boxes' replica calls to. It is operator configuration,
+// the only source trusted to say which route is the console: a route's own
+// fields come from records, and records are not a tenancy boundary (a
+// legacy direct-S3 fleet box can write deployment records). A self-hosted
+// deployment, whose console is installed into its operator account, sets
+// it; the platform's own hubs need not.
+const replicaConsoleHostEnv = "CARLOS_REPLICA_CONSOLE_HOST"
+
+// WithReplicaConsoleHost sets the configured console host (tests; the
+// process reads replicaConsoleHostEnv in enableTunnelsFromEnv).
+func WithReplicaConsoleHost(host string) RunOption {
+ return func(e *Edge) { e.replicaConsoleHost = host }
+}
+
+// replicaConsoleHostFromEnv reads and checks replicaConsoleHostEnv. Unset
+// is "" and no error; a value that is not a host name fails the boot,
+// naming the variable, rather than leave every replica call refused.
+func replicaConsoleHostFromEnv(getenv func(string) string) (string, error) {
+ host := strings.ToLower(strings.TrimSpace(getenv(replicaConsoleHostEnv)))
+ if host != "" && !controlname.ValidHostShape(host) {
+ return "", fmt.Errorf("%s: %q is not a host name", replicaConsoleHostEnv, host)
+ }
+ return host, nil
+}
// serveReplicaConsole reuses the local console route, including its version
// header. Only POSTs on the reserved tunnel host enter here; other methods
// keep the hub's 404. Authentication remains the console's fleetIdentityOK.
//
-// The console route is the one row whose unit is console.service, for app
-// console, on a loopback upstream (or a socket), not an activator-owned
-// instance. Its account is not part of the test: the platform's own
-// consoles carry none, but a self-hosted deployment's console is installed
-// into its operator account, and that row is the console all the same. The
-// unit is what marks it: only a platform or operator record names one, and
-// a tenant's instance record never does. Two such rows answer ambiguous.
+// The console route is a row for app console with unit console.service, on
+// a loopback upstream (or a socket), that is not an alias, regional, via a
+// tunnel or activator-owned. With replicaConsoleHostEnv set, it is that
+// host's row and no other, whatever its account. Unset, it is the one such
+// row with no account, the platform console's shape, as before: an
+// account-owned row is never chosen and never makes it ambiguous.
func (e *Edge) serveReplicaConsole(w http.ResponseWriter, r *http.Request) {
+ configured := e.replicaConsoleHost
var console http.Handler
for host, up := range *e.upstreams.Load() {
rt := up.route
+ if configured != "" && host != configured {
+ continue
+ }
+ if configured == "" && rt.Account != "" {
+ continue
+ }
if host != rt.Host || up.alias || up.regional != 0 || up.viaTunnel || rt.App != "console" || rt.Unit != "console.service" || rt.ActivatorOwned() {
continue
}
diff --git a/internal/edge/replicaconsole_test.go b/internal/edge/replicaconsole_test.go
index eccf6148c..15fe2bdd5 100644
--- a/internal/edge/replicaconsole_test.go
+++ b/internal/edge/replicaconsole_test.go
@@ -89,11 +89,13 @@ func TestFleetReplicaConsoleOnTunnelHost(t *testing.T) {
}
// TestReplicaConsoleRouteShape (#511): which local route the hub hands a
-// box's replica call to. A console installed into an operator account, as
-// a self-hosted deployment's is, is the console: its unit, console.service,
-// marks it, and only a platform or operator record names a unit. A tenant
-// app named console on a loopback upstream is not. Two console units are
-// ambiguous.
+// box's replica call to. Route fields come from records, which are not a
+// tenancy boundary (a legacy direct-S3 fleet box can write deployment
+// records), so only operator configuration (CARLOS_REPLICA_CONSOLE_HOST)
+// can name an account-owned console, as a self-hosted deployment's is.
+// Unconfigured, the hub takes the one accountless console.service route,
+// and an account-owned console.service row (an injected record) is neither
+// chosen nor makes it ambiguous.
func TestReplicaConsoleRouteShape(t *testing.T) {
var hits atomic.Int32
console := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@@ -105,17 +107,30 @@ func TestReplicaConsoleRouteShape(t *testing.T) {
consoleRow := func(host, account string) registry.Route {
return registry.Route{Host: host, Account: account, App: "console", Unit: "console.service", Kind: "instance", Addr: addr, Status: "ready", Version: "v-test"}
}
+ // Tito's shape: the console installed into its operator account, and a
+ // platform row for the same app with no unit.
+ selfHosted := []registry.Route{consoleRow("console.staging.example.com", "bab"),
+ {Host: "console.bab.staging.example.com", Account: "bab", App: "console", Kind: "instance", Addr: addr, Status: "ready", Platform: true}}
+ tenant := registry.Route{Host: "console.tenant.test", Account: "a", App: "console", Kind: "service", Addr: addr, Status: "ready"}
+ remote := consoleRow("console.remote.test", "bab")
+ remote.Addr = "192.0.2.10:8090"
for _, tc := range []struct {
- name string
- routes []registry.Route
- code int
- answer string
+ name string
+ configured string
+ routes []registry.Route
+ code int
+ answer string
}{
- {"system console", []registry.Route{consoleRow("console.test", "")}, 200, ""},
- {"console in an operator account", []registry.Route{consoleRow("console.test", "bab"),
- {Host: "console.bab.test", Account: "bab", App: "console", Kind: "instance", Addr: addr, Status: "ready", Platform: true}}, 200, ""},
- {"tenant app named console", []registry.Route{{Host: "console.tenant.test", Account: "a", App: "console", Kind: "service", Addr: addr, Status: "ready"}}, 503, "replica-console-missing"},
- {"two console units", []registry.Route{consoleRow("console.test", "bab"), consoleRow("console2.test", "")}, 503, "replica-console-ambiguous"},
+ {"system console", "", []registry.Route{consoleRow("console.test", "")}, 200, ""},
+ {"system console beside an injected account-owned console unit", "", []registry.Route{consoleRow("console.test", ""), consoleRow("injected.test", "x")}, 200, ""},
+ {"account-owned console unconfigured", "", selfHosted, 503, "replica-console-missing"},
+ {"two system consoles", "", []registry.Route{consoleRow("console.test", ""), consoleRow("console2.test", "")}, 503, "replica-console-ambiguous"},
+ {"configured account-owned console", "console.staging.example.com", selfHosted, 200, ""},
+ {"configured console beside an injected console unit", "console.staging.example.com", append([]registry.Route{consoleRow("injected.test", "x"), consoleRow("console.test", "")}, selfHosted...), 200, ""},
+ {"configured host is a tenant app named console", "console.tenant.test", []registry.Route{tenant}, 503, "replica-console-missing"},
+ {"configured host is not on this box", "console.remote.test", []registry.Route{remote}, 503, "replica-console-missing"},
+ {"configured host absent", "console.staging.example.com", []registry.Route{consoleRow("console.test", "")}, 503, "replica-console-missing"},
+ {"tenant app named console", "", []registry.Route{tenant}, 503, "replica-console-missing"},
} {
t.Run(tc.name, func(t *testing.T) {
reg := openReg(t)
@@ -129,6 +144,7 @@ func TestReplicaConsoleRouteShape(t *testing.T) {
t.Fatal(err)
}
defer e.probers.Stop()
+ WithReplicaConsoleHost(tc.configured)(e)
e.EnableTunnels(NewTunnelHub("tunnel.test", nil))
before := hits.Load()
w := httptest.NewRecorder()
@@ -139,3 +155,17 @@ func TestReplicaConsoleRouteShape(t *testing.T) {
})
}
}
+
+func TestReplicaConsoleHostFromEnv(t *testing.T) {
+ for in, want := range map[string]string{"": "", " Console.Staging.Example.com ": "console.staging.example.com"} {
+ got, err := replicaConsoleHostFromEnv(func(string) string { return in })
+ if err != nil || got != want {
+ t.Errorf("%q: %q %v", in, got, err)
+ }
+ }
+ for _, bad := range []string{"https://console.example.com", "console.example.com:8090", "a b"} {
+ if _, err := replicaConsoleHostFromEnv(func(string) string { return bad }); err == nil {
+ t.Errorf("%q accepted", bad)
+ }
+ }
+}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index b5145683c..0e59c1756 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -210,4 +210,4 @@ plan14-root-reads-same-box-edge-fence.tsv 76c986ad534d23071100a9a573ffb38afc60b2
plan14-root-reads-g6-fence.tsv 3f43afa4b0c18ad678a952b48b511e74e849992cd629b9aa1442bbe0055d5631
plan14-root-reads-offline-move-stage-refusals-339.tsv 846d1f22e6eb6b2cd8b3086fa554f15deba70418c6542b46b2e2a6a138b6c332
plan14-root-reads-fleet-tunnel-tls-state.tsv 846d1f22e6eb6b2cd8b3086fa554f15deba70418c6542b46b2e2a6a138b6c332
-plan14-root-reads-replica-console-account.tsv 7ce05776898a80913f5970dfac4d713da5516b17f632aefa9c159a88a282ed84
+plan14-root-reads-replica-console-account.tsv 0a1771b2e24bbfb63f397da2b37fe29aa6e12b13f1961a62e7f670ab0aad2c0c
diff --git a/internal/provision/testdata/plan14-root-reads-replica-console-account.tsv b/internal/provision/testdata/plan14-root-reads-replica-console-account.tsv
index e61032333..fc3063974 100644
--- a/internal/provision/testdata/plan14-root-reads-replica-console-account.tsv
+++ b/internal/provision/testdata/plan14-root-reads-replica-console-account.tsv
@@ -1,5 +1,5 @@
# Census overlay replica-console-account, written by census-propose (#369). census-ruling-replica-console-account, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-replica-console-account.md.
-# 0 body, 1 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-@legacy ecdf217f2500175e5b51bacaa538dbe01f67893b08f94f7afef475f3bdc10c2d internal/edge/replicaconsole.go Edge.serveReplicaConsole legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-coordinator-route;basis=Reads existing in-memory route fields to select a unique accountless console.service local upstream; refuses missing or ambiguous console, tenant routes, remote and tunnel upstreams. Reuses proxy and version wrapper; leaves fleet identity authentication at console.;rev3=census-ruling-retry-after-503;basis=the missing/ambiguous-console 503s go through UnavailableHeader (adds Retry-After 2 and answer/box headers); selection unchanged; no read added;rev3=census-ruling-replica-console-account;basis=selection drops the account-empty test (one fewer read of the in-memory route Account) so a self-hosted console installed into its operator account (Tito: account bab) is found; it still requires app console, unit console.service, a loopback upstream or socket, not alias, regional, via tunnel or activator-owned, and exactly one match. Tenant routes stay refused: a unit is set only by platform or operator records (provision.Record.Unit, named units), never by a tenant instance record. Witness TestReplicaConsoleRouteShape. No new read, no write. registry:App@237,registry:Host@178,registry:Socket@335,registry:Unit@260,whole:Route@159 3e70f505ece85f692d1864ec8a74de58f1b4318477a13458aa4f783ef4a229da
-internal/edge/replicaconsole.go Edge.serveReplicaConsole legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-coordinator-route;basis=Reads existing in-memory route fields to select a unique accountless console.service local upstream; refuses missing or ambiguous console, tenant routes, remote and tunnel upstreams. Reuses proxy and version wrapper; leaves fleet identity authentication at console.;rev3=census-ruling-retry-after-503;basis=the missing/ambiguous-console 503s go through UnavailableHeader (adds Retry-After 2 and answer/box headers); selection unchanged; no read added;rev3=census-ruling-replica-console-account;basis=selection drops the account-empty test (one fewer read of the in-memory route Account) so a self-hosted console installed into its operator account (Tito: account bab) is found; it still requires app console, unit console.service, a loopback upstream or socket, not alias, regional, via tunnel or activator-owned, and exactly one match. Tenant routes stay refused: a unit is set only by platform or operator records (provision.Record.Unit, named units), never by a tenant instance record. Witness TestReplicaConsoleRouteShape. No new read, no write. registry:App@237,registry:Host@178,registry:Socket@335,registry:Unit@260,whole:Route@159 3e70f505ece85f692d1864ec8a74de58f1b4318477a13458aa4f783ef4a229da
-@coverage internal/edge b5dcd8dfc99988c7db9fa9666310d9d4c6992077200e3116e27cb952bf6987c3
+# 1 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy c4c72ca605e10266524712b9671eaeeb706bb111d6ecc450f2ed03479f4eaf48 internal/edge/replicaconsole.go Edge.serveReplicaConsole legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-coordinator-route;basis=Reads existing in-memory route fields to select a unique accountless console.service local upstream; refuses missing or ambiguous console, tenant routes, remote and tunnel upstreams. Reuses proxy and version wrapper; leaves fleet identity authentication at console.;rev3=census-ruling-retry-after-503;basis=the missing/ambiguous-console 503s go through UnavailableHeader (adds Retry-After 2 and answer/box headers); selection unchanged; no read added;rev3=census-ruling-replica-console-account;basis=the console route for replica calls is the host named by operator config CARLOS_REPLICA_CONSOLE_HOST (host.env, read once at hub setup, validated as a host name) when set, whatever its account; still app console, unit console.service, loopback upstream or socket, not alias, regional, via tunnel or activator-owned, exactly one. Unset, selection is unchanged (accountless only). Route fields alone never name an account-owned console, so an injected record cannot take over or make it ambiguous. Witness TestReplicaConsoleRouteShape. Memory-only reads, no new read source, no write. registry:Account@288,registry:App@395,registry:Host@336,registry:Socket@493,registry:Unit@418,whole:Route@195 4e337c8890a66f8da6e672f243ebed593cc659abdf17387898bbf8732f63be79
+internal/edge/replicaconsole.go Edge.serveReplicaConsole legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-coordinator-route;basis=Reads existing in-memory route fields to select a unique accountless console.service local upstream; refuses missing or ambiguous console, tenant routes, remote and tunnel upstreams. Reuses proxy and version wrapper; leaves fleet identity authentication at console.;rev3=census-ruling-retry-after-503;basis=the missing/ambiguous-console 503s go through UnavailableHeader (adds Retry-After 2 and answer/box headers); selection unchanged; no read added;rev3=census-ruling-replica-console-account;basis=the console route for replica calls is the host named by operator config CARLOS_REPLICA_CONSOLE_HOST (host.env, read once at hub setup, validated as a host name) when set, whatever its account; still app console, unit console.service, loopback upstream or socket, not alias, regional, via tunnel or activator-owned, exactly one. Unset, selection is unchanged (accountless only). Route fields alone never name an account-owned console, so an injected record cannot take over or make it ambiguous. Witness TestReplicaConsoleRouteShape. Memory-only reads, no new read source, no write. registry:Account@288,registry:App@395,registry:Host@336,registry:Socket@493,registry:Unit@418,whole:Route@195 4e337c8890a66f8da6e672f243ebed593cc659abdf17387898bbf8732f63be79
+@coverage internal/edge 02c7760f7ac62bb0f5ca4940275e2fd3aacf76bd4b5187e4afe73827c57fff8e