carlos / platform Public

spec §25.8: cross-region replay is bodyless only (Paul's Q2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev cd91e9e7d621849d6a58d724fc5e112b69cfbedc parent f9b17c0
1 file changed, +2 −1
  • docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md +2 −1

Intent

Human

<task-notification> <task-id>aef76dee7dd89daec</task-id> <tool-use-id>toolu_01PUoqgbVLaZSATZnZ4AYdJP</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/283be278-5c6a-4a71-a8d6-b3d32c668985/tasks/aef76dee7dd89daec.output</output-file> <status>completed</status> <summary>Agent "Implement Task 3: replay + attempts" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE Commits: `786d6fc1` (fix), `f9b17c0f` (census). FIX_BASE `5a71fbfd`. Not pushed. Tests: the cross-region, over-limit, unmarked and non-HA streaming tests pass at `-count=50`. All 6 backhaul mutations are caught. The edge regression set, the census test, gofmt, vet and the darwin/windows builds pass. What changed: - **Cross-region, no body:** a request with no body is marked `X-Carlos-Replayable: 1` on its first attempt, whatever the HA metadata says. Through the real backhaul with no test hook, a GET is followed once after a handover answer, and the next GET goes straight to the cached holder. - **Cross-region, with a body:** the body is never copied or marked and streams as before. POSTs of 10 bytes, 64 KiB, 64 KiB + 1, 1 MiB and a chunked POST each get today's 503 with `Retry-After: 10` after one attempt. - **Body copy:** copying a body using HA metadata now happens only on the in-region forward; the backhaul's HA check is removed. Concerns: one small behaviour change outside the ruling. Any backhaul with a body, HA or not, now closes the client connection when the upstream answers and closes before the client has finished sending its body. Bodies still stream, and keep-alive is unchanged otherwise. Census: re-proposed (seal `0a1abdce...`) with the removed HA-check unit's claim dropped. The census test passes. The cross-family verdict on #280 is still owed. Report (fix round 2 appended): /home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-held-build/.superpowers/sdd/2026-11-08-region-ha-held-requests/task-3-report.md</result> <usage><subagent_tokens>419414</subagent_tokens><tool_uses>69</tool_uses><duration_ms>4104064</duration_ms></usage> </task-notification>

Attributed to this commit: 14.0 g CO₂e (1,770,446 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-held-build, 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/specs/2026-10-26-region-ha-without-claims-design.md b/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md
index e97808017..04f08ed99 100644
--- a/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md
+++ b/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md
@@ -1169,10 +1169,11 @@ Both control paths, `/.carlos/ha-take` and `/.carlos/ha-drain`, are reserved on
### 25.8 What clients see
-- **Zero errors** for every request whose first attempt reaches A. That covers requests through the NLB before Standby, from a peer whose cache names A (the normal in-region case), or through a fixed forwarder in the region. The body must be empty, or have a known length of at most 64 KiB and be copied whole before the first send (H2). An unknown-length body, however small, is not replayable. A request that reached A directly streams its body and has no size limit. The condition is the attempt number on arrival at A and the body's framing, on every ingress path, not the client's region (R3.6). The pause is the rest of H's in-flight work (up to 10 s, usually milliseconds), plus the release (about 1 to 3 s), plus the successor's acquire and restore. The target is under 5 s for a small host.
+- **Zero errors** for every request whose first attempt reaches A. That covers requests through the NLB before Standby, from a peer whose cache names A (the normal in-region case), or through a fixed forwarder in the region. The body must be empty, or have a known length of at most 64 KiB and be copied whole before the first send (H2). An unknown-length body, however small, is not replayable. A request that reached A directly streams its body and has no size limit. The condition is the attempt number on arrival at A and the body's framing (R3.6). Paul's Q2 ruling (2026-11-08) scopes the body rule to in-region traffic: a box has trusted HA metadata only for its own region's hosts, so a cross-region (backhaul) first box replays only bodyless requests, and its requests with bodies stream and are never replayed. The pause is the rest of H's in-flight work (up to 10 s, usually milliseconds), plus the release (about 1 to 3 s), plus the successor's acquire and restore. The target is under 5 s for a small host.
- **Today's 503 with `Retry-After: 10`,** only in the seconds that host is moving, for:
- a hop whose body is over 64 KiB or of unknown length;
- a request whose first attempt went to another box that named A, on any ingress path; most cross-region requests are like this (H3);
+ - a cross-region request with a body (Q2: the body rule is in-region only);
- any bound hit or failed move.
- **Connections:** keep-alive connections are closed between requests. SSE streams reconnect with `Last-Event-ID` after the browser's retry delay. WebSockets still open through A 60 s after its leases have moved are closed, and their clients reconnect. Requests already dispatched to an app (uploads, downloads, upgrades) that run past H's 10 s drain, or past the final 60 s, are cut and never retried, because they may have reached the app (R3.5).
- **An unplanned death:** today's behaviour, unchanged.