| index df5a5ae98..98ca149eb 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-region-ha-held-build.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-region-ha-held-build.tsv |
| @@ -17,7 +17,7 @@ |
| @legacy 970d7a1336a4489c044e157445c64ff3432b38642a03b664a22a5167a4591ac5 internal/edge/backhaul_retry.go homeMap.handoverAuthority legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): name authority for a handover answer's ref on an in-region front forward; reads the supplied route's Host, Account and App and the in-memory edges fold snapshot (resolveHomeName over the already-folded claims); no store or filesystem read; only narrows which box a request may be sent to a second time registry:Account@485,registry:App@509,registry:Host@166,registry:Host@435 aa9a4bf7fefc470f931ed8369733708d20a9e4f4edeccf6833c3f1e1f3ff0472 |
| @legacy e74193b4cfcca6f473039efe9163209b7afd1cf8847f7c3d94b25a5e0fa99247 internal/edge/forwardha.go Edge.forwardHAFollow legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): wraps the existing front forward; installs the in-memory attempt counter, and on a handover answer to the marked first attempt sends the in-memory body copy once more to the checked ref, or reports that the ref names this box so the caller serves it through the existing local path; passes the whole route in memory; no store or filesystem read whole:Route@185,whole:Route@189,whole:Route@267,whole:Route@651,whole:Route@655,whole:Route@728 458e3eaa39975df77b221aaee459c00ba4e2791a18b2f43403a697b9bda2aad9 |
| @legacy 3765db605d5322898b539edac85a6f80455331d131441e589a205b9d940fc2f0 internal/edge/forwardha.go Edge.forwardHANoted legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new name for the former body of forwardHAAndNote (held-requests Task 3), unchanged but for passing the attempt state on; the same route Host reads for NoteForward; no read added registry:Host@312,registry:Host@611,registry:Host@692 35c1f30b298b9d1c179d6aa4936cacebd90ec12a31d3204525ba8ce69c62b333 |
| -@legacy 0140e2efd66e575dd9f4892239b3f59dcdd519c2c445d7e839f8843096e0036c internal/edge/forwardha.go Edge.forwardHAObserved legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=held-requests Task 3: spends one in-memory attempt; on the first copies a request body of known length at most 64 KiB (or none) into memory and marks the hop X-Carlos-Replayable, on the second sends that copy unmarked, never a third; wraps the existing forward transport to consume a handover answer to the marked attempt and to strip X-Carlos-Handover from relayed answers; the ref is checked with the in-memory view (boxInView) and handoverAuthority; reads the route in memory; no store or filesystem read. Task 3 fix round 1: a body that is not copied is wrapped (watchBody, in memory) to note when it has all been read, and a relayed answer the upstream closes after, while that body is unfinished, gets Connection: close (closeAfterEarlyAnswer); a handover naming this box also clears the already-met Expect header on the request served here; no read added. Task 3 fix round 3: after relaying an early closing answer (closeAfterEarlyAnswer, which now also sets the client connection's read deadline 1 s ahead), finishEarlyAnswer flushes the answer and reads and discards the client's own request body until it ends or that deadline passes, so the client connection closes within about 1 s; reads only the request body, no store or filesystem read whole:Route@4413 a32eaea1522d68a65490082bb235baa2aece99b7efb919027d266ee97c00fd54 |
| +@legacy 509056a1c6b0206b8ea0d226c0c28be7f016fa2197325e7db7faa3b084dcdf7f internal/edge/forwardha.go Edge.forwardHAObserved legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=held-requests Task 3: spends one in-memory attempt; on the first copies a request body of known length at most 64 KiB (or none) into memory and marks the hop X-Carlos-Replayable, on the second sends that copy unmarked, never a third; wraps the existing forward transport to consume a handover answer to the marked attempt and to strip X-Carlos-Handover from relayed answers; the ref is checked with the in-memory view (boxInView) and handoverAuthority; reads the route in memory; no store or filesystem read. Task 3 fix round 1: a body that is not copied is wrapped (watchBody, in memory) to note when it has all been read, and a relayed answer the upstream closes after, while that body is unfinished, gets Connection: close (closeAfterEarlyAnswer); a handover naming this box also clears the already-met Expect header on the request served here; no read added. Task 3 fix round 3: after relaying an early closing answer (closeAfterEarlyAnswer, which now also sets the client connection's read deadline 1 s ahead), finishEarlyAnswer flushes the answer and reads and discards the client's own request body until it ends or that deadline passes, so the client connection closes within about 1 s; reads only the request body, no store or filesystem read. Task 3 fix round 4: the 1 s read deadline is set in finishEarlyAnswer after the relay, not when the answer's headers arrive, so a slow closing answer is relayed whole first; no read added whole:Route@4413 a32eaea1522d68a65490082bb235baa2aece99b7efb919027d266ee97c00fd54 |
| @legacy 117cbaf4814c2f8d1d5a76d674368008c78e9db44f04677225fa236b18812c2c internal/edge/forwardha.go Edge.forwardHAStreaming legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): the draining box's release of a client request to the confirmed holder through the existing front forward, with the body streamed as before and never copied or replayed; passes the whole route in memory; no read added whole:Route@215,whole:Route@242,whole:Route@246 25428d3720986a7103a2990e0dc4c3dc9217d00bca684fef610f58db3c23500f |
| @legacy 974aff241ca9f5e0e1cfb0f09cf4918f3bb7e5d3790dab0d2ecd6a8b1c244757 internal/edge/forwardha.go Edge.handoverInRegion legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): parses X-Carlos-Handover (ParseHandover) and checks its ref: this box's own label, or a box in the in-memory view (boxInView) passing handoverAuthority; passes the route in memory; no store or filesystem read whole:Route@356 255bf92b4ba6f58c2e03260bb743a2db2f23f03d97387c8902575f38c72c03e8 |
| @legacy 2a74d8a3671b4a9fb769e3cb121865e6499b01f43a42b67ce4a3b8328b1444b6 internal/edge/hadrain.go Edge.serveHAControl legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: answers a signed drain ask. Reads the request body (io.ReadAll under MaxBytesReader 4 KiB and a 2 s read deadline), verifies its own mesh-key MAC, requires a phase (draining or drained) and a nonzero publication id, and may refresh the edges fold (the existing refreshHosts: LIST plus GET of control/edges/ in the deployment bucket); reads no local file; answers JSON seen true or false, or a bare 404. Fix round 1: the ask names phase and publication id instead of a generation file:ReadAll@674 6f135b934ef3a804ed07bd8567e2ee4dc8db9f8abee97038d3946892ac9c1128 |
| @@ -47,7 +47,7 @@ internal/activator/handover.go sameMoveLifetime legacy accepted-legacy accepted- |
| internal/edge/backhaul_retry.go homeMap.handoverAuthority legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): name authority for a handover answer's ref on an in-region front forward; reads the supplied route's Host, Account and App and the in-memory edges fold snapshot (resolveHomeName over the already-folded claims); no store or filesystem read; only narrows which box a request may be sent to a second time registry:Account@485,registry:App@509,registry:Host@166,registry:Host@435 aa9a4bf7fefc470f931ed8369733708d20a9e4f4edeccf6833c3f1e1f3ff0472 |
| internal/edge/forwardha.go Edge.forwardHAFollow legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): wraps the existing front forward; installs the in-memory attempt counter, and on a handover answer to the marked first attempt sends the in-memory body copy once more to the checked ref, or reports that the ref names this box so the caller serves it through the existing local path; passes the whole route in memory; no store or filesystem read whole:Route@185,whole:Route@189,whole:Route@267,whole:Route@651,whole:Route@655,whole:Route@728 458e3eaa39975df77b221aaee459c00ba4e2791a18b2f43403a697b9bda2aad9 |
| internal/edge/forwardha.go Edge.forwardHANoted legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new name for the former body of forwardHAAndNote (held-requests Task 3), unchanged but for passing the attempt state on; the same route Host reads for NoteForward; no read added registry:Host@312,registry:Host@611,registry:Host@692 35c1f30b298b9d1c179d6aa4936cacebd90ec12a31d3204525ba8ce69c62b333 |
| -internal/edge/forwardha.go Edge.forwardHAObserved legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=held-requests Task 3: spends one in-memory attempt; on the first copies a request body of known length at most 64 KiB (or none) into memory and marks the hop X-Carlos-Replayable, on the second sends that copy unmarked, never a third; wraps the existing forward transport to consume a handover answer to the marked attempt and to strip X-Carlos-Handover from relayed answers; the ref is checked with the in-memory view (boxInView) and handoverAuthority; reads the route in memory; no store or filesystem read. Task 3 fix round 1: a body that is not copied is wrapped (watchBody, in memory) to note when it has all been read, and a relayed answer the upstream closes after, while that body is unfinished, gets Connection: close (closeAfterEarlyAnswer); a handover naming this box also clears the already-met Expect header on the request served here; no read added. Task 3 fix round 3: after relaying an early closing answer (closeAfterEarlyAnswer, which now also sets the client connection's read deadline 1 s ahead), finishEarlyAnswer flushes the answer and reads and discards the client's own request body until it ends or that deadline passes, so the client connection closes within about 1 s; reads only the request body, no store or filesystem read whole:Route@4413 a32eaea1522d68a65490082bb235baa2aece99b7efb919027d266ee97c00fd54 |
| +internal/edge/forwardha.go Edge.forwardHAObserved legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=held-requests Task 3: spends one in-memory attempt; on the first copies a request body of known length at most 64 KiB (or none) into memory and marks the hop X-Carlos-Replayable, on the second sends that copy unmarked, never a third; wraps the existing forward transport to consume a handover answer to the marked attempt and to strip X-Carlos-Handover from relayed answers; the ref is checked with the in-memory view (boxInView) and handoverAuthority; reads the route in memory; no store or filesystem read. Task 3 fix round 1: a body that is not copied is wrapped (watchBody, in memory) to note when it has all been read, and a relayed answer the upstream closes after, while that body is unfinished, gets Connection: close (closeAfterEarlyAnswer); a handover naming this box also clears the already-met Expect header on the request served here; no read added. Task 3 fix round 3: after relaying an early closing answer (closeAfterEarlyAnswer, which now also sets the client connection's read deadline 1 s ahead), finishEarlyAnswer flushes the answer and reads and discards the client's own request body until it ends or that deadline passes, so the client connection closes within about 1 s; reads only the request body, no store or filesystem read. Task 3 fix round 4: the 1 s read deadline is set in finishEarlyAnswer after the relay, not when the answer's headers arrive, so a slow closing answer is relayed whole first; no read added whole:Route@4413 a32eaea1522d68a65490082bb235baa2aece99b7efb919027d266ee97c00fd54 |
| internal/edge/forwardha.go Edge.forwardHAStreaming legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): the draining box's release of a client request to the confirmed holder through the existing front forward, with the body streamed as before and never copied or replayed; passes the whole route in memory; no read added whole:Route@215,whole:Route@242,whole:Route@246 25428d3720986a7103a2990e0dc4c3dc9217d00bca684fef610f58db3c23500f |
| internal/edge/forwardha.go Edge.handoverInRegion legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new (held-requests Task 3): parses X-Carlos-Handover (ParseHandover) and checks its ref: this box's own label, or a box in the in-memory view (boxInView) passing handoverAuthority; passes the route in memory; no store or filesystem read whole:Route@356 255bf92b4ba6f58c2e03260bb743a2db2f23f03d97387c8902575f38c72c03e8 |
| internal/edge/hadrain.go Edge.serveHAControl legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: answers a signed drain ask. Reads the request body (io.ReadAll under MaxBytesReader 4 KiB and a 2 s read deadline), verifies its own mesh-key MAC, requires a phase (draining or drained) and a nonzero publication id, and may refresh the edges fold (the existing refreshHosts: LIST plus GET of control/edges/ in the deployment bucket); reads no local file; answers JSON seen true or false, or a bare 404. Fix round 1: the ask names phase and publication id instead of a generation file:ReadAll@674 6f135b934ef3a804ed07bd8567e2ee4dc8db9f8abee97038d3946892ac9c1128 |
| @@ -59,5 +59,5 @@ internal/edge/forwardha.go Edge.forwardHAAndNote legacy accepted-legacy accepted |
| internal/edge/forwardha.go Edge.frontForwardHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): the agent's edge decides at the front door whether to forward a visitor request: reads the route's HA flag and host from the box's own registry row and asks the activator; forwards only to a box in view over the existing signed hop; root never calls it;rev3=census-ruling-region-ha-dead-holder-backoff;basis=ForwardTarget returns a ForwardDecision (Ref, Refuse, Gen); a Refuse is answered at the front door with the existing unreachable answer (503, Retry-After: 10, same body, via answerHolderUnreachable), with no forward, dial, note or per-request step. A forward passes the decision to forwardHA and NoteForward carries Ref and Gen back. The round-1 connection callback (NoteConnected) is gone: the dial bound now lives in forwardTransport's forwardDialGate, which coalesces TCP dials per holder address in memory. The same 5 read sites; no new read; root never calls it.;rev3=census-ruling-region-ha-p1b3a;basis=Pass the existing route to a lazy cached wakeSnapshot closure, handle explicit local denial before all accounting, and refuse a disappeared Placement choice rather than falling through locally; whole Route read only, no new store or filesystem operation and no root authority.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): for a marked request to a hibernating HA route it uses the new HAForwarderFromMemory (ForwardTargetFromMemory) instead of ForwardTarget, so the hold path makes no holder-lock read; a non-stream marked request is left to this box's classification, and a holder not known from memory is answered with the one-retry event. The unmarked path is unchanged. Reads only the request mark and the already-loaded route and home map; no read added.;rev3=census-ruling-region-ha-followups;basis=Report detached TCP/TLS failure after a canceled Placement or Recovery request through the existing NoteForward classifier, preserving Ref, Gen and PeerGen. Reuse the route Host to correlate the late result; no new storage read or routing authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Share forwarding observation helper and refuse disappearance of a selected peer when local pool-ineligible; existing route input, two Host reads moved to helper.;rev3=census-ruling-region-ha-held-build;basis=held-requests Task 3: calls forwardHAFollow instead of forwardHAAndNote, and when a handover answer named this box returns false so the request takes the existing local path (only when the route is locally pool-eligible); the same route reads; no read added registry:HA@225,registry:Hibernate@584,whole:Route@1244,whole:Route@1368,whole:Route@1602,whole:Route@1651,whole:Route@1856,whole:Route@228,whole:Route@515,whole:Route@587 43b47f419e9d094f67e9fb1737b9988efb7d732f09a52884197726a31cc68b85 |
| internal/edge/haingress.go Edge.routeHAIngress legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Resolve exact/alias/catchall authority and bind projected primary identity for HA forwarding. A zero projection permits an existing non-activator-owned upstream to continue its ordinary path; managed rows still refuse. New in-memory Host and route reads only.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 2: just before frontForwardHAIngress, the handover decision moveGate runs on the already-resolved primary route rt (whole Route passed in memory); it can only hold the request, answer it with an existing refusal or forward it to a confirmed holder over the existing signed hop; no store or filesystem read added registry:Account@1361,registry:Account@2752,registry:Account@3006,registry:Account@3026,registry:Account@519,registry:App@1378,registry:App@2775,registry:App@3040,registry:App@3056,registry:App@543,registry:ClaimStamp@638,registry:HA@1099,registry:HA@1921,registry:HA@1998,registry:HA@2308,registry:HA@3176,registry:Host@1190,registry:Host@1248,registry:Host@1874,registry:Host@1980,registry:Host@2290,registry:Host@2495,registry:Host@251,registry:Host@2728,registry:Host@2978,registry:Host@2995,registry:Host@374,registry:Incarnation@1399,registry:Incarnation@2802,registry:Incarnation@3094,registry:Incarnation@3118,registry:Incarnation@570,registry:Pool@3066,registry:Pool@3083,registry:ServingSeq@1427,registry:ServingSeq@2836,registry:ServingSeq@3136,registry:ServingSeq@3159,registry:ServingSeq@604,whole:Route@1732,whole:Route@1807,whole:Route@1924,whole:Route@1959,whole:Route@2074,whole:Route@2157,whole:Route@2263,whole:Route@254,whole:Route@2938,whole:Route@2968,whole:Route@2981,whole:Route@3009,whole:Route@3043,whole:Route@3069,whole:Route@3097,whole:Route@3139,whole:Route@3179,whole:Route@3422,whole:Route@3544,whole:Route@377,whole:Route@522,whole:Route@546,whole:Route@573,whole:Route@607,whole:Route@641,whole:Route@892 5e0dfdd7bf53cadf9d9a1de94475d3cc4d6fb316d72c8b45e0b19e04e7e29153 |
| @coverage internal/activator 41848e37a68a93c71c80f28380b1e6e48218840c29d5b7bc291529c0e44aab17 |
| -@coverage internal/edge d4269467f6a68d062cdd603e3593fb38a3a8c89ad48f3fe95f78834c060d2b38 |
| +@coverage internal/edge 984d589b37e19f96cef35124b372e820d9edadbd7086f4370f9baeca984c518c |
| @coverage internal/host 2e83bba2a89d116388857912876ebde007a7c7b7fb6a3265c04856d60185583d |