carlos / platform Public

edge: disabled page keeps no Retry-After; guard refuses writer values

Astra R2: the plans turned-off page deliberately sends no Retry-After
(waiting changes nothing), so it now uses UnavailableNoRetry, which still
names site and box. Guard rule W5 refuses WriteHeader or http.Error taken
as a value, with a fixture. Census overlay re-proposed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 14851b8d6b60c3998334c147c097b799109bcec1 parent 1589fa8
8 files changed, +84 −14
  • docs/superpowers/notes/census-proposal-retry-after-503.md +2 −2
  • internal/edge/plandisabled.go +1 −1
  • internal/edge/plandisabled_test.go +1 −1
  • internal/edge/testdata/unavailable_guard/indirect.go +14 −0
  • internal/edge/unavailable.go +17 −4
  • internal/edge/unavailable_guard_test.go +45 −2
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-retry-after-503.tsv +3 −3

CI cancelled — superseded by a newer push — run details

Intent

Human

<task-notification> <task-id>bw0e1jbwd</task-id> <tool-use-id>toolu_01Wb6J7bdwhKgDxngafwqK1b</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/65c83978-bd41-49d3-9db5-c69ac6296f34/tasks/bw0e1jbwd.output</output-file> <status>completed</status> <summary>Background command "~/.cache/region-ha-held/retry-after/run.sh 2 " ROUND 2. The branch tip is now 1589fa88. Your round-1 findings are in $HOME/.cache/region-ha-held/retry-after/r1.md. First give a disposition table for each round-1 finding (fixed / not fixed, verified against the code). Then report only NEW P1/P2 findings. ALSO, as the census reviewer (you are the independent cross-model reviewer; the author is Claude): read docs/superpowers/notes/census-proposal-retry-after-503.md and git dif ... [299 characters truncated] ... e change weaken a check, refusal, validation, argument or environment its recorded basis relies on? Give APPROVE or REJECT per unit and per envelope with a one-line reason. End with ACCEPT or NOT READY for the code review."; tail -3 ~/.cache/region-ha-held/retry-after/r2.log" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 13.0 g CO₂e (1,362,413 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on retry-after-503, 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-retry-after-503.md b/docs/superpowers/notes/census-proposal-retry-after-503.md
index 3bab9cdad..e195f62f7 100644
--- a/docs/superpowers/notes/census-proposal-retry-after-503.md
+++ b/docs/superpowers/notes/census-proposal-retry-after-503.md
@@ -10,7 +10,7 @@ Ruling `census-ruling-retry-after-503`. The independent reviewer approves or rej
| `internal/activator/haforward.go` `Service.answerForwarded` | body | unchanged (1) | the held-lease 503 is written through edge.Unavailable (Retry-After 1 unchanged); X-Carlos-Holder unchanged; no read added |
| `internal/activator/harelease.go` `Service.releaseHAClean` | body | unchanged (7) | records four time.Now stamps and logs per-phase durations (files, sync, record, marker) on the existing marker log line; order, budgets and clean rule unchanged; no read added |
| `internal/edge/importgate.go` `Edge.importGateAdmit` | body | unchanged (10) | the gate's 503 is written through Unavailable (adds Retry-After and answer/box headers); admission logic unchanged; no read added |
-| `internal/edge/plandisabled.go` `Edge.planDisabledAdmit` | body | unchanged (2) | the fixed 503 page's status is written through UnavailableHeader (adds Retry-After 300 and answer/box headers); body and checks unchanged; no read added |
+| `internal/edge/plandisabled.go` `Edge.planDisabledAdmit` | body | unchanged (2) | the fixed 503 page status is written through UnavailableNoRetry (still no Retry-After; adds answer/box headers); body and checks unchanged; no read added |
| `internal/edge/replicaconsole.go` `Edge.serveReplicaConsole` | body | unchanged (6) | the missing/ambiguous-console 503s go through UnavailableHeader (adds Retry-After 2 and answer/box headers); selection unchanged; no read added |
| `internal/edge/replicaprobe.go` `Edge.serveReplicaProbe` | body | unchanged (9) | each refusal 503 goes through UnavailableHeader with its own site (adds Retry-After 2 and answer/box headers); dial and identity checks unchanged; no read added |
@@ -30,6 +30,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.
- `internal/edge/replicaprobe.go` `Edge.serveReplicaProbe`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 I4/F1: the dialled pathname comes from the serving Gen.Socket and, for shared/foreign layouts, can originate in the registry row Socket. Dial through unixdial.Checked: refuse the instance-control directory before connect and require getpeername to match the dialled path before sending HTTP, including symlink refusal. Existing Route reads unchanged. M5 handles request construction errors before RoundTrip; M2 uses the shared reason constant. Authenticated private landing, held-leg admission, one-second bound and post-response identity checks remain.
-Seal: `e650a3ceb286df4457850d74ded9229d94ed9932057ae5b45b1d6c3d0d843ce2` → `26296cbf0af0b304f99864846d51084a60190c741d277f12559e52e53f15cff4`.
+Seal: `e650a3ceb286df4457850d74ded9229d94ed9932057ae5b45b1d6c3d0d843ce2` → `eea13e9a0b04164ea3fc7f8258bd1ab0a613d1e23ffe0cd028bc85058576c248`.
Overlay: `internal/provision/testdata/plan14-root-reads-retry-after-503.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/edge/plandisabled.go b/internal/edge/plandisabled.go
index 7c26a2fd2..6b55307b7 100644
--- a/internal/edge/plandisabled.go
+++ b/internal/edge/plandisabled.go
@@ -81,7 +81,7 @@ func (e *Edge) planDisabledAdmit(w http.ResponseWriter, r *http.Request, host st
h := w.Header()
h.Set("Content-Type", "text/html; charset=utf-8")
h.Set("Cache-Control", "no-store")
- UnavailableHeader(w, "plan-disabled", 300)
+ UnavailableNoRetry(w, "plan-disabled")
if r.Method != http.MethodHead {
w.Write(disabledPage)
}
diff --git a/internal/edge/plandisabled_test.go b/internal/edge/plandisabled_test.go
index 697d8a4dc..19ace8d89 100644
--- a/internal/edge/plandisabled_test.go
+++ b/internal/edge/plandisabled_test.go
@@ -50,7 +50,7 @@ func newDisabledScene(t *testing.T, listed ...string) *disabledScene {
func wantDisabledPage(t *testing.T, rec *httptest.ResponseRecorder, what string) {
t.Helper()
if rec.Code != http.StatusServiceUnavailable || rec.Header().Get("Cache-Control") != "no-store" ||
- rec.Header().Get("Retry-After") != "" || rec.Header().Get("Content-Type") != "text/html; charset=utf-8" {
+ rec.Header().Get("Retry-After") != "" || rec.Header().Get(answerHeader) != "plan-disabled" || rec.Header().Get("Content-Type") != "text/html; charset=utf-8" {
t.Fatalf("%s: %d cache %q retry %q type %q, want the disabled page's 503", what, rec.Code,
rec.Header().Get("Cache-Control"), rec.Header().Get("Retry-After"), rec.Header().Get("Content-Type"))
}
diff --git a/internal/edge/testdata/unavailable_guard/indirect.go b/internal/edge/testdata/unavailable_guard/indirect.go
new file mode 100644
index 000000000..da0a90f83
--- /dev/null
+++ b/internal/edge/testdata/unavailable_guard/indirect.go
@@ -0,0 +1,14 @@
+package edge
+
+import "net/http"
+
+func zzIndirect(w http.ResponseWriter) {
+ write := w.WriteHeader
+ code := http.StatusServiceUnavailable
+ write(code)
+}
+
+func zzIndirectError(w http.ResponseWriter) {
+ fail := http.Error
+ fail(w, "busy", 503)
+}
diff --git a/internal/edge/unavailable.go b/internal/edge/unavailable.go
index c6481be7a..ffaf3780e 100644
--- a/internal/edge/unavailable.go
+++ b/internal/edge/unavailable.go
@@ -9,14 +9,14 @@ import (
"sync/atomic"
)
-// Every 503 the edge and the activator write goes through Unavailable or
-// UnavailableHeader (#421 finding 1: a just-joined member's 503 reached a
+// Every 503 the edge and the activator write goes through Unavailable,
+// UnavailableHeader or (no Retry-After, one caller) UnavailableNoRetry (#421 finding 1: a just-joined member's 503 reached a
// client with no Retry-After, and nothing in the answer said which box or
// which path wrote it). TestEvery503GoesThroughUnavailable refuses any
// other 503 in internal/edge and internal/activator.
//
// Each answer carries:
-// - Retry-After, whole seconds, at least one;
+// - Retry-After, whole seconds, at least one (not UnavailableNoRetry);
// - X-Carlos-Answer, the call site's fixed short name (unique per call
// site, checked by the same test), so a probe can name the path;
// - X-Carlos-Box, this box's tag: the first 12 hex digits of the SHA-256
@@ -62,12 +62,25 @@ func UnavailableHeader(w http.ResponseWriter, site string, retryAfter int) {
w.WriteHeader(http.StatusServiceUnavailable)
}
+// UnavailableNoRetry is UnavailableHeader with no Retry-After, for the one
+// answer where waiting changes nothing (the plans turned-off page,
+// plandisabled.go). It still names its site and box.
+func UnavailableNoRetry(w http.ResponseWriter, site string) {
+ answerHeaders(w, site)
+ w.Header().Del("Retry-After")
+ w.WriteHeader(http.StatusServiceUnavailable)
+}
+
func unavailableHeaders(w http.ResponseWriter, site string, retryAfter int) {
+ answerHeaders(w, site)
+ w.Header().Set("Retry-After", strconv.Itoa(max(retryAfter, 1)))
+}
+
+func answerHeaders(w http.ResponseWriter, site string) {
if !answerSite.MatchString(site) {
site = "unnamed"
}
h := w.Header()
- h.Set("Retry-After", strconv.Itoa(max(retryAfter, 1)))
h.Set(answerHeader, site)
if tag := answerBoxTag.Load(); tag != nil {
h.Set(boxTagHeader, *tag)
diff --git a/internal/edge/unavailable_guard_test.go b/internal/edge/unavailable_guard_test.go
index 56e42d786..8258fd50a 100644
--- a/internal/edge/unavailable_guard_test.go
+++ b/internal/edge/unavailable_guard_test.go
@@ -19,7 +19,10 @@ package edge
// - W4, every Unavailable and UnavailableHeader call names its site with
// a constant matching answerSite, except in a site forwarder
// (siteForwarders), whose own callers must pass a constant; and no two
-// call sites share a name.
+// call sites share a name;
+// - W5, a status writer (a WriteHeader method or http.Error) taken as a
+// value rather than called, outside the helper, is refused: W1-W3 see
+// calls only, so `write := w.WriteHeader; write(code)` would escape.
//
// Residual, by design: a 503 carried in a variable or a return value into
// a relay that writes its code verbatim. The relays listed are an upstream
@@ -75,6 +78,7 @@ var unavailableGuardFixtures = map[string][]string{
"variable.go": {"zzVariable: status written from a variable outside a relay"},
"handed.go": {"zzHanded: constant 503 handed to zzWriteCode", "zzWriteCode: status written from a variable outside a relay"},
"closure.go": {"zzClosureHandler: 503 written without the helper (WriteHeader)", "zzClosureError: 503 written without the helper (http.Error)"},
+ "indirect.go": {"zzIndirect: WriteHeader taken as a value", "zzIndirectError: http.Error taken as a value", "zzIndirectError: constant 503 handed to fail"},
"site.go": {"zzSiteVar: Unavailable site is not a constant", "zzSiteBad: Unavailable site \"Bad Site\" does not match answerSite", "zzSiteDup: Unavailable site \"wake-failed\" named twice"},
}
@@ -203,11 +207,25 @@ func unavailableProblems(info *types.Info, f *ast.File, helperFile bool, sites *
default:
continue
}
+ callFuns := map[ast.Expr]bool{}
+ selNames := map[*ast.Ident]bool{}
ast.Inspect(body, func(n ast.Node) bool {
+ // W5: a status writer taken as a value (write := w.WriteHeader,
+ // or http.Error passed on) escapes W1-W3, which see only calls.
+ if sel, ok := n.(*ast.SelectorExpr); ok {
+ selNames[sel.Sel] = true // judged as the selector, not again
+ }
+ if id, ok := n.(*ast.Ident); ok && selNames[id] {
+ return true
+ }
+ if ref := statusWriterRef(info, n); ref != "" && !callFuns[n.(ast.Expr)] && !helperFile {
+ out = append(out, fmt.Sprintf("%s: %s taken as a value", name, ref))
+ }
call, ok := n.(*ast.CallExpr)
if !ok {
return true
}
+ callFuns[ast.Unparen(call.Fun)] = true
obj := calleeObj(info, call)
var code ast.Expr
kind := ""
@@ -243,7 +261,7 @@ func unavailableProblems(info *types.Info, f *ast.File, helperFile bool, sites *
}
}
// W4: sites.
- if obj != nil && (isPkgFunc(obj, edgePkg, "Unavailable") || isPkgFunc(obj, edgePkg, "UnavailableHeader")) && len(call.Args) >= 2 && !helperFile {
+ if obj != nil && (isPkgFunc(obj, edgePkg, "Unavailable") || isPkgFunc(obj, edgePkg, "UnavailableHeader") || isPkgFunc(obj, edgePkg, "UnavailableNoRetry")) && len(call.Args) >= 2 && !helperFile {
if _, fwd := siteForwarders[name]; fwd {
return true
}
@@ -260,6 +278,31 @@ func unavailableProblems(info *types.Info, f *ast.File, helperFile bool, sites *
return out
}
+// statusWriterRef names n if it refers to a status writer (a WriteHeader
+// method or net/http.Error), whatever position it is in.
+func statusWriterRef(info *types.Info, n ast.Node) string {
+ var obj types.Object
+ switch x := n.(type) {
+ case *ast.SelectorExpr:
+ if sel, ok := info.Selections[x]; ok {
+ obj = sel.Obj()
+ } else {
+ obj = info.Uses[x.Sel]
+ }
+ case *ast.Ident:
+ obj = info.Uses[x]
+ default:
+ return ""
+ }
+ if isPkgFunc(obj, "net/http", "Error") {
+ return "http.Error"
+ }
+ if fn, ok := obj.(*types.Func); ok && fn.Name() == "WriteHeader" && fn.Type().(*types.Signature).Recv() != nil {
+ return "WriteHeader"
+ }
+ return ""
+}
+
// genDeclName is the first name a var or const declaration declares, for
// the guard's report.
func genDeclName(d *ast.GenDecl) string {
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 0fef2d368..58c6ca4d9 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -159,4 +159,4 @@ plan14-root-reads-group-roll-dr4-lock-refusal.tsv 6d3ea7fccce1a7f4bc507b6eb8d368
plan14-root-reads-held-floor-capability.tsv b60c83f8ba4311222174284420b5327e92002882b4a1c6f291e74e69234c6f59
plan14-root-reads-litestream-unit-restart.tsv e650a3ceb286df4457850d74ded9229d94ed9932057ae5b45b1d6c3d0d843ce2
plan14-root-reads-health-check-no-redirects-845.tsv e650a3ceb286df4457850d74ded9229d94ed9932057ae5b45b1d6c3d0d843ce2
-plan14-root-reads-retry-after-503.tsv 26296cbf0af0b304f99864846d51084a60190c741d277f12559e52e53f15cff4
+plan14-root-reads-retry-after-503.tsv eea13e9a0b04164ea3fc7f8258bd1ab0a613d1e23ffe0cd028bc85058576c248
diff --git a/internal/provision/testdata/plan14-root-reads-retry-after-503.tsv b/internal/provision/testdata/plan14-root-reads-retry-after-503.tsv
index 63bb7df2d..d83d293f2 100644
--- a/internal/provision/testdata/plan14-root-reads-retry-after-503.tsv
+++ b/internal/provision/testdata/plan14-root-reads-retry-after-503.tsv
@@ -5,7 +5,7 @@
@legacy 2fff3fc1a88412d0773eccae91dc35606bb66e6ce5913f1533fdfe76a434ff12 internal/activator/haforward.go Service.answerForwarded legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): writes the 503 Retry-After 1 with X-Carlos-Holder for a held lease on a verified HA hop; reads the route only to check HA; root never calls it;rev3=census-ruling-retry-after-503;basis=the held-lease 503 is written through edge.Unavailable (Retry-After 1 unchanged); X-Carlos-Holder unchanged; no read added whole:Route@131 2be3eb0e89caa5578f42a067a902e9bbbf3d2aa551392e64d1f93f29d82ed1f3
@legacy f3874373de5c874de7b81ce35144df4afc2c90a5e01ea96bcfe598f8b1376b39 internal/activator/harelease.go Service.releaseHAClean legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA entry's release, in order: host slice read empty through haHostEmpty (else errHostSliceUnproven and nothing written; the same check, moved into that helper by final fix F1), stop and join the files publisher, its final publish (2 min budget), the replica's final sync (Finish, 30 s), the local release record, then the release marker PUT (10 s), clean only when the final publish was complete and the sync and record succeeded; a failed PUT is a persisted lease obligation; +registry:Host, +whole:Route x4;rev3=census-ruling-region-ha-p1b3b-t;basis=Record advisory local-release basis only after ReleaseMarker succeeds. Add a whole-route argument to local duty bookkeeping; release order and lease authority unchanged.;rev3=census-ruling-region-ha-g2-fixes;basis=Latch unexpected lease loss before release and mark intentional release so ErrSpent alone is not treated as loss; no new read.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Cap Final, Finish and marker contexts by the shutdown deadline and reserves; keep calls synchronous and stop proof unchanged; record successful marker completion under the service mutex. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: records the written marker's clean flag on the entry (haReleaseClean) beside haReleased, for the drain report; no read added;rev3=census-ruling-held-move-speed;basis=reads the entry's drainRelease flag under a.mu; for the drain's release calls the replica's FinishSnapshot (final sync, then a litestream snapshot at the final position, before the store's close; the snapshot reader pipe is closed on every outcome) instead of Finish, and logs a snapshot failure naming rt.Host (+registry:Host, the supplied route); marker order, budgets and clean rule unchanged; no new read;rev3=census-ruling-retry-after-503;basis=records four time.Now stamps and logs per-phase durations (files, sync, record, marker) on the existing marker log line; order, budgets and clean rule unchanged; no read added registry:Host@1584,registry:Host@2785,whole:Route@109,whole:Route@1710,whole:Route@1848,whole:Route@2624,whole:Route@267 39353c898133ea75aa2542d28ea6db1a81c868626aba4fc44dd43a4467a6054b
@legacy 988be30588cdde03e38aad634d536400a17439437e5e9ec6808b64e2094d5643 internal/edge/importgate.go Edge.importGateAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the import gate: a gated row admits only a GET carrying the verify token; anything else is a 503; serving only;rev3=census-ruling-agent-start-demo-3;basis=Keep demo-claim destinations gated until committed; verify exact host/seed capability before allowing console probes. Census read-site delta: +registry:Host, +registry:SeedSource.;rev3=census-ruling-retry-after-503;basis=the gate's 503 is written through Unavailable (adds Retry-After and answer/box headers); admission logic unchanged; no read added registry:Host@482,registry:Host@535,registry:Host@549,registry:ImportGate@274,registry:ImportGate@297,registry:ImportGate@609,registry:SeedSource@394,whole:Route@197,whole:Route@250,whole:Route@261 4dfc59d7f0702f867456fb45114518ee13cdd00bd3f3af0790b194b6be48fef1
-@legacy 903f60097268d92ca1e672eec05e361459c15d139cecc5a2e74ff4dec64e33d2 internal/edge/plandisabled.go Edge.planDisabledAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4d-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: asks the plans turned-off hook (planDisabledFor, passed the row and the request host) and answers a turned-off route with a fixed 503 page rendered from constants, before the meter, gate, cache and activator; reads only the row's kind; echoes nothing from the request (plans 4d).;rev3=census-ruling-retry-after-503;basis=the fixed 503 page's status is written through UnavailableHeader (adds Retry-After 300 and answer/box headers); body and checks unchanged; no read added registry:Kind@156,whole:Route@185 06c803560228a95822b8bfdcf7202f0bc46f4940a950cd7631dbc88d8bfff560
+@legacy 4cf7876eec44ead223526d45b8f846138e3b2eadb158476d99f8c94a7b50ea8e internal/edge/plandisabled.go Edge.planDisabledAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4d-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: asks the plans turned-off hook (planDisabledFor, passed the row and the request host) and answers a turned-off route with a fixed 503 page rendered from constants, before the meter, gate, cache and activator; reads only the row's kind; echoes nothing from the request (plans 4d).;rev3=census-ruling-retry-after-503;basis=the fixed 503 page status is written through UnavailableNoRetry (still no Retry-After; adds answer/box headers); body and checks unchanged; no read added registry:Kind@156,whole:Route@185 9c262814f06d3ee9c3d4a419936e3be7b033659c4b25c4601199a2098dd8ba1c
@legacy ec43384b0f0a176f0d0408082f3832e1563912e3463a993a527d376346ed5503 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 registry:Account@237,registry:App@257,registry:Host@178,registry:Socket@355,registry:Unit@280,whole:Route@159 cd4066214c9abe0e393c0f57abf0adab3988e4916073649e1ce0231d95388906
@legacy b3c3ab490d60a2ee9d0861e2e2c745b7c43c709c0bf23d8438f36c2ca3836089 internal/edge/replicaprobe.go Edge.serveReplicaProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 I4/F1: the dialled pathname comes from the serving Gen.Socket and, for shared/foreign layouts, can originate in the registry row Socket. Dial through unixdial.Checked: refuse the instance-control directory before connect and require getpeername to match the dialled path before sending HTTP, including symlink refusal. Existing Route reads unchanged. M5 handles request construction errors before RoundTrip; M2 uses the shared reason constant. Authenticated private landing, held-leg admission, one-second bound and post-response identity checks remain.;rev3=census-ruling-retry-after-503;basis=each refusal 503 goes through UnavailableHeader with its own site (adds Retry-After 2 and answer/box headers); dial and identity checks unchanged; no read added registry:FleetBoxes@390,registry:HA@459,registry:Hibernate@443,registry:Host@346,registry:Kind@365,whole:Route@1028,whole:Route@1218,whole:Route@2279,whole:Route@708 b17068d220c00949d08e47c6420f62508d3bada1b9996bcea3d8ada9e4f18d11
internal/activator/activator.go Service.ServeScheduled legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-plans-4d-lapse;basis=answers a scheduled request to a route the turned-off hook names with the maintenance response before serve (plans 4d). One more whole-row read: the row handed to the hook (a.disabled), as the fence and maxRunFor are asked.;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: wraps the proxy so that, after the wake, fillScheduledToken(r, rt) sets an HA host's tick bearer token from its restored env file; an error there logs (+registry:Host, rt.Host) and answers 503 with Retry-After: 5; a non-HA host's tick is left as the runner built it; +whole:Route is rt handed to fillScheduledToken; keeps legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned (a hibernating instance, or an instance with a runtime) instead of Kind and Hibernate inline; reads the same fields plus Runtime through the method;rev3=census-ruling-region-ha-p1b3b-t;basis=Run the local scheduled request under WithDuty and retain existing HTTP refusal text; add route arguments to background admission and error handling. No forwarding.;rev3=census-ruling-retry-after-503;basis=the scheduled-token 503 is written through edge.UnavailableHeader (Retry-After 5 unchanged, adds X-Carlos-Answer/X-Carlos-Box); no read added registry:Host@669,registry:Status@146,registry:Status@165,whole:Route@1108,whole:Route@248,whole:Route@600,whole:Route@848,whole:Route@929 a05c6cb48d8e39c41e3918a2e4ef7c11871d9afbe7eca725547b7a47250f40da
@@ -14,8 +14,8 @@ internal/activator/activator.go Service.serveWakeError diagnostic C,J4 rev3=PROP
internal/activator/haforward.go Service.answerForwarded legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): writes the 503 Retry-After 1 with X-Carlos-Holder for a held lease on a verified HA hop; reads the route only to check HA; root never calls it;rev3=census-ruling-retry-after-503;basis=the held-lease 503 is written through edge.Unavailable (Retry-After 1 unchanged); X-Carlos-Holder unchanged; no read added whole:Route@131 2be3eb0e89caa5578f42a067a902e9bbbf3d2aa551392e64d1f93f29d82ed1f3
internal/activator/harelease.go Service.releaseHAClean legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA entry's release, in order: host slice read empty through haHostEmpty (else errHostSliceUnproven and nothing written; the same check, moved into that helper by final fix F1), stop and join the files publisher, its final publish (2 min budget), the replica's final sync (Finish, 30 s), the local release record, then the release marker PUT (10 s), clean only when the final publish was complete and the sync and record succeeded; a failed PUT is a persisted lease obligation; +registry:Host, +whole:Route x4;rev3=census-ruling-region-ha-p1b3b-t;basis=Record advisory local-release basis only after ReleaseMarker succeeds. Add a whole-route argument to local duty bookkeeping; release order and lease authority unchanged.;rev3=census-ruling-region-ha-g2-fixes;basis=Latch unexpected lease loss before release and mark intentional release so ErrSpent alone is not treated as loss; no new read.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Cap Final, Finish and marker contexts by the shutdown deadline and reserves; keep calls synchronous and stop proof unchanged; record successful marker completion under the service mutex. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: records the written marker's clean flag on the entry (haReleaseClean) beside haReleased, for the drain report; no read added;rev3=census-ruling-held-move-speed;basis=reads the entry's drainRelease flag under a.mu; for the drain's release calls the replica's FinishSnapshot (final sync, then a litestream snapshot at the final position, before the store's close; the snapshot reader pipe is closed on every outcome) instead of Finish, and logs a snapshot failure naming rt.Host (+registry:Host, the supplied route); marker order, budgets and clean rule unchanged; no new read;rev3=census-ruling-retry-after-503;basis=records four time.Now stamps and logs per-phase durations (files, sync, record, marker) on the existing marker log line; order, budgets and clean rule unchanged; no read added registry:Host@1584,registry:Host@2785,whole:Route@109,whole:Route@1710,whole:Route@1848,whole:Route@2624,whole:Route@267 39353c898133ea75aa2542d28ea6db1a81c868626aba4fc44dd43a4467a6054b
internal/edge/importgate.go Edge.importGateAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the import gate: a gated row admits only a GET carrying the verify token; anything else is a 503; serving only;rev3=census-ruling-agent-start-demo-3;basis=Keep demo-claim destinations gated until committed; verify exact host/seed capability before allowing console probes. Census read-site delta: +registry:Host, +registry:SeedSource.;rev3=census-ruling-retry-after-503;basis=the gate's 503 is written through Unavailable (adds Retry-After and answer/box headers); admission logic unchanged; no read added registry:Host@482,registry:Host@535,registry:Host@549,registry:ImportGate@274,registry:ImportGate@297,registry:ImportGate@609,registry:SeedSource@394,whole:Route@197,whole:Route@250,whole:Route@261 4dfc59d7f0702f867456fb45114518ee13cdd00bd3f3af0790b194b6be48fef1
-internal/edge/plandisabled.go Edge.planDisabledAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4d-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: asks the plans turned-off hook (planDisabledFor, passed the row and the request host) and answers a turned-off route with a fixed 503 page rendered from constants, before the meter, gate, cache and activator; reads only the row's kind; echoes nothing from the request (plans 4d).;rev3=census-ruling-retry-after-503;basis=the fixed 503 page's status is written through UnavailableHeader (adds Retry-After 300 and answer/box headers); body and checks unchanged; no read added registry:Kind@156,whole:Route@185 06c803560228a95822b8bfdcf7202f0bc46f4940a950cd7631dbc88d8bfff560
+internal/edge/plandisabled.go Edge.planDisabledAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4d-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: asks the plans turned-off hook (planDisabledFor, passed the row and the request host) and answers a turned-off route with a fixed 503 page rendered from constants, before the meter, gate, cache and activator; reads only the row's kind; echoes nothing from the request (plans 4d).;rev3=census-ruling-retry-after-503;basis=the fixed 503 page status is written through UnavailableNoRetry (still no Retry-After; adds answer/box headers); body and checks unchanged; no read added registry:Kind@156,whole:Route@185 9c262814f06d3ee9c3d4a419936e3be7b033659c4b25c4601199a2098dd8ba1c
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 registry:Account@237,registry:App@257,registry:Host@178,registry:Socket@355,registry:Unit@280,whole:Route@159 cd4066214c9abe0e393c0f57abf0adab3988e4916073649e1ce0231d95388906
internal/edge/replicaprobe.go Edge.serveReplicaProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 I4/F1: the dialled pathname comes from the serving Gen.Socket and, for shared/foreign layouts, can originate in the registry row Socket. Dial through unixdial.Checked: refuse the instance-control directory before connect and require getpeername to match the dialled path before sending HTTP, including symlink refusal. Existing Route reads unchanged. M5 handles request construction errors before RoundTrip; M2 uses the shared reason constant. Authenticated private landing, held-leg admission, one-second bound and post-response identity checks remain.;rev3=census-ruling-retry-after-503;basis=each refusal 503 goes through UnavailableHeader with its own site (adds Retry-After 2 and answer/box headers); dial and identity checks unchanged; no read added registry:FleetBoxes@390,registry:HA@459,registry:Hibernate@443,registry:Host@346,registry:Kind@365,whole:Route@1028,whole:Route@1218,whole:Route@2279,whole:Route@708 b17068d220c00949d08e47c6420f62508d3bada1b9996bcea3d8ada9e4f18d11
@coverage internal/activator d6ce24a4b55dbf89771215c105acf2156e79b17659bbb4d21dc6628a13c8b609
-@coverage internal/edge 3dc38982da0537483b436bcf6bcf9f537505c0df92426c62cbe272ec90a7271b
+@coverage internal/edge 3a80599eb7da7d390059130c0e008e76cd87a5a97596ed8191323342069c9b21