edge: store door cap bypasses small GETs, per-account cap, stall deadline
7 files changed,
+240
−31
docs/superpowers/notes/census-proposal-storedoor-stream-get.md+2 −2internal/edge/storedoor.go+61 −16internal/edge/storedoor_stream_test.go+171 −6internal/provision/instance_egress_sizes_census_test.go+1 −1internal/provision/plan9_b8_census_test.go+1 −2internal/provision/testdata/plan14-root-reads-chain.tsv+1 −1internal/provision/testdata/plan14-root-reads-storedoor-stream-get.tsv+3 −3
diff --git a/docs/superpowers/notes/census-proposal-storedoor-stream-get.md b/docs/superpowers/notes/census-proposal-storedoor-stream-get.md| index b63901e35..8e446562f 100644 |
| --- a/docs/superpowers/notes/census-proposal-storedoor-stream-get.md |
| +++ b/docs/superpowers/notes/census-proposal-storedoor-stream-get.md |
| @@ -4,7 +4,7 @@ Ruling `census-ruling-storedoor-stream-get`. The independent reviewer approves o |
| | unit | change | read sites | what changed | |
| |---|---|---|---| |
| -| `internal/edge/storedoor.go` `storeDoor.serveObject` | body | unchanged (1) | GET streams through OpenObjectStreaming via openGET, with concurrency limits and Content-Length when known; no read added. The same bounded PUT ReadAll and store.Put remain unchanged. | |
| +| `internal/edge/storedoor.go` `storeDoor.serveObject` | body | unchanged (1) | GET opens before sizing; known bodies <= 1 MiB bypass caps. Unknown/large bodies acquire per-box 2, per-account 4, edge-wide 8 before writing, release by defer, and stream through a writer that refreshes a 60-second deadline for each bounded chunk. Auth/ACL, claims, missing-key handling and bounded PUT ReadAll/store.Put remain unchanged; no read added. | |
| | `internal/release/store.go` `S3Store.Open` | body | unchanged (1) | Wraps the existing GetObject response body in sizedObjectBody, exposing ContentLength through Size() or -1 when absent; preserves ETag, close/read behavior and missing-key mapping. No additional request or read added. | |
| Envelopes re-pinned: `internal/edge`, `internal/release`. |
| @@ -20,6 +20,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the |
| - new `internal/edge/storedoor.go:storeDoor.openGET`: reads +file:Stat; written legacy, accepted-legacy, frozen |
| -Seal: `66a5df05f18f70c3162ad05aa316c1e69c0f053d54f8b682262c266d6aa50772` → `62b550b9398c40c2eabe4d3869acf0e1ec87a25e42fffca40affeef31adeac81`. |
| +Seal: `66a5df05f18f70c3162ad05aa316c1e69c0f053d54f8b682262c266d6aa50772` → `6b6455ab34041aa7c989c6dffae8aeadf733c0cf89551faf2f11ad5ea6fd50c8`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-storedoor-stream-get.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/edge/storedoor.go b/internal/edge/storedoor.go| index 24aca0270..85d1b22d9 100644 |
| --- a/internal/edge/storedoor.go |
| +++ b/internal/edge/storedoor.go |
| @@ -29,12 +29,14 @@ import ( |
| "fmt" |
| "io" |
| "log" |
| + "log/slog" |
| "net/http" |
| "os" |
| "sort" |
| "strconv" |
| "strings" |
| "sync" |
| + "time" |
| "github.com/carlosframework/platform/internal/domains" |
| "github.com/carlosframework/platform/internal/plans" |
| @@ -66,10 +68,13 @@ const ( |
| maxStoreBodyBytes = 32 << 20 |
| // The 2026-11-03 sophie OOM came from repeated 483 MB fleet GETs. |
| - maxStoreGETsPerBox = 2 |
| - maxStoreGETs = 8 |
| - storeGETRetry = "5" |
| - maxStoreGETBuffer = release.PutFromFallbackMax |
| + maxStoreGETsPerBox = 2 |
| + maxStoreGETsPerAccount = 4 |
| + maxStoreGETs = 8 |
| + smallGETBypass = 1 << 20 |
| + storeGETWriteTimeout = 60 * time.Second |
| + storeGETRetry = "5" |
| + maxStoreGETBuffer = release.PutFromFallbackMax |
| ) |
| // storeDoor serves release.Store over HTTPS for fleet boxes (spec F1-F4). |
| @@ -91,9 +96,11 @@ type storeDoor struct { |
| // registry. |
| fleetAccount func(fleet string) (sqid string, ok bool) |
| - getMu sync.Mutex |
| - gets map[storeGETIdentity]int |
| - getTotal int |
| + getMu sync.Mutex |
| + gets map[storeGETIdentity]int |
| + getTotal int |
| + getAccounts map[string]int |
| + getDeadlineUnsupported sync.Once |
| } |
| type storeGETIdentity struct { |
| @@ -103,12 +110,16 @@ type storeGETIdentity struct { |
| func (d *storeDoor) acquireGET(id storeGETIdentity) bool { |
| d.getMu.Lock() |
| defer d.getMu.Unlock() |
| - if d.getTotal >= maxStoreGETs || d.gets[id] >= maxStoreGETsPerBox { |
| + if d.getTotal >= maxStoreGETs || d.gets[id] >= maxStoreGETsPerBox || d.getAccounts[id.sqid] >= maxStoreGETsPerAccount { |
| return false |
| } |
| if d.gets == nil { |
| d.gets = make(map[storeGETIdentity]int) |
| } |
| + if d.getAccounts == nil { |
| + d.getAccounts = make(map[string]int) |
| + } |
| + d.getAccounts[id.sqid]++ |
| d.gets[id]++ |
| d.getTotal++ |
| return true |
| @@ -117,6 +128,10 @@ func (d *storeDoor) acquireGET(id storeGETIdentity) bool { |
| func (d *storeDoor) releaseGET(id storeGETIdentity) { |
| d.getMu.Lock() |
| defer d.getMu.Unlock() |
| + d.getAccounts[id.sqid]-- |
| + if d.getAccounts[id.sqid] == 0 { |
| + delete(d.getAccounts, id.sqid) |
| + } |
| d.getTotal-- |
| d.gets[id]-- |
| if d.gets[id] == 0 { |
| @@ -210,13 +225,6 @@ func (d *storeDoor) serveObject(w http.ResponseWriter, r *http.Request, sqid, fl |
| http.NotFound(w, r) |
| return |
| } |
| - id := storeGETIdentity{sqid, fleet, r.Header.Get("Carlos-Tunnel-Name")} |
| - if !d.acquireGET(id) { |
| - w.Header().Set("Retry-After", storeGETRetry) |
| - http.Error(w, http.StatusText(http.StatusTooManyRequests), http.StatusTooManyRequests) |
| - return |
| - } |
| - defer d.releaseGET(id) |
| body, etag, size, err := d.openGET(ctx, key) |
| if err != nil { |
| if errors.Is(err, os.ErrNotExist) { |
| @@ -233,6 +241,21 @@ func (d *storeDoor) serveObject(w http.ResponseWriter, r *http.Request, sqid, fl |
| return |
| } |
| defer body.Close() |
| + var dst io.Writer = w |
| + var src io.Reader = body |
| + if size < 0 || size > smallGETBypass { |
| + id := storeGETIdentity{sqid, fleet, r.Header.Get("Carlos-Tunnel-Name")} |
| + if !d.acquireGET(id) { |
| + w.Header().Set("Retry-After", storeGETRetry) |
| + http.Error(w, http.StatusText(http.StatusTooManyRequests), http.StatusTooManyRequests) |
| + return |
| + } |
| + defer d.releaseGET(id) |
| + rc := http.NewResponseController(w) |
| + defer rc.SetWriteDeadline(time.Time{}) |
| + dst = &storeGETWriter{writer: w, controller: rc, door: d} |
| + src = struct{ io.Reader }{body} |
| + } |
| if etag != "" { |
| w.Header().Set("ETag", etag) |
| } |
| @@ -241,7 +264,7 @@ func (d *storeDoor) serveObject(w http.ResponseWriter, r *http.Request, sqid, fl |
| w.Header().Set("Content-Length", strconv.FormatInt(size, 10)) |
| } |
| w.WriteHeader(http.StatusOK) |
| - if _, err := io.Copy(w, body); err != nil { |
| + if _, err := io.Copy(dst, src); err != nil { |
| // Abort an incomplete response, including one with no length. |
| // net/http suppresses logging for ErrAbortHandler. |
| panic(http.ErrAbortHandler) |
| @@ -300,6 +323,28 @@ func (d *storeDoor) serveObject(w http.ResponseWriter, r *http.Request, sqid, fl |
| } |
| } |
| +type storeGETWriter struct { |
| + writer io.Writer |
| + controller *http.ResponseController |
| + door *storeDoor |
| + unsupported bool |
| +} |
| + |
| +func (w *storeGETWriter) Write(p []byte) (int, error) { |
| + if !w.unsupported { |
| + if err := w.controller.SetWriteDeadline(time.Now().Add(storeGETWriteTimeout)); err != nil { |
| + if !errors.Is(err, http.ErrNotSupported) { |
| + return 0, err |
| + } |
| + w.unsupported = true |
| + w.door.getDeadlineUnsupported.Do(func() { |
| + slog.Debug("edge: store door: response writer does not support write deadlines") |
| + }) |
| + } |
| + } |
| + return w.writer.Write(p) |
| +} |
| + |
| func (d *storeDoor) openGET(ctx context.Context, key string) (io.ReadCloser, string, int64, error) { |
| body, etag, err := release.OpenObjectStreaming(ctx, d.store, key) |
| if errors.Is(err, errors.ErrUnsupported) { |
diff --git a/internal/edge/storedoor_stream_test.go b/internal/edge/storedoor_stream_test.go| index 80d401d59..9a121a29a 100644 |
| --- a/internal/edge/storedoor_stream_test.go |
| +++ b/internal/edge/storedoor_stream_test.go |
| @@ -5,6 +5,7 @@ import ( |
| "errors" |
| "fmt" |
| "io" |
| + "net" |
| "net/http" |
| "net/http/httptest" |
| "runtime" |
| @@ -188,18 +189,19 @@ func TestStoreDoorStreamCaps(t *testing.T) { |
| d.store = s |
| auth := map[string]string{} |
| for i := 0; i < 5; i++ { |
| - auth[fmt.Sprintf("%s/box-%d", testFleet, i)] = sha256Hex(testToken) |
| + auth[fmt.Sprintf("fleet-%d/box-%d", i/2, i)] = sha256Hex(testToken) |
| } |
| d.hub.SetDynamicAuth(auth) |
| + d.fleetAccount = func(fleet string) (string, bool) { return "account-" + fleet, true } |
| defer func() { |
| close(releaseBodies) |
| workers.Wait() |
| - if d.getTotal != 0 || len(d.gets) != 0 { |
| + if d.getTotal != 0 || len(d.gets) != 0 || len(d.getAccounts) != 0 { |
| t.Errorf("leaked slots: total=%d boxes=%v", d.getTotal, d.gets) |
| } |
| }() |
| request := func(box int) *http.Request { |
| - return doorReq("GET", storeObjectPrefix+ownKey, fmt.Sprintf("%s/box-%d", testFleet, box), testToken, "") |
| + return doorReq("GET", storeObjectPrefix+"control/serial", fmt.Sprintf("fleet-%d/box-%d", box/2, box), testToken, "") |
| } |
| start := func(box int) { |
| workers.Add(1) |
| @@ -221,7 +223,7 @@ func TestStoreDoorStreamCaps(t *testing.T) { |
| case <-time.After(5 * time.Second): |
| t.Fatal("capped GET blocked instead of returning 429") |
| } |
| - if w.Code != 429 || w.Header().Get("Retry-After") != "5" || s.opens.Load() != before { |
| + if w.Code != 429 || w.Header().Get("Retry-After") != "5" || s.opens.Load() != before+1 { |
| t.Fatalf("cap: %d %v opens %d -> %d", w.Code, w.Header(), before, s.opens.Load()) |
| } |
| } |
| @@ -251,7 +253,7 @@ func TestStoreDoorStreamCaps(t *testing.T) { |
| } |
| r = request(0) |
| r.Method = "PUT" |
| - r.URL.Path = storeObjectPrefix + ownFleetKey |
| + r.URL.Path = storeObjectPrefix + "fleets/fleet-0/status/box.json" |
| r.Body = io.NopCloser(strings.NewReader("ok")) |
| r.Header.Set("If-None-Match", "*") |
| w = httptest.NewRecorder() |
| @@ -367,7 +369,7 @@ func TestStoreDoorStreamReleasesOnFailure(t *testing.T) { |
| } |
| d.ServeHTTP(w, doorReq("GET", storeObjectPrefix+ownKey, testChannel, testToken, "")) |
| }() |
| - if d.getTotal != 0 || len(d.gets) != 0 { |
| + if d.getTotal != 0 || len(d.gets) != 0 || len(d.getAccounts) != 0 { |
| t.Fatalf("leaked slots: total=%d boxes=%v", d.getTotal, d.gets) |
| } |
| if body != nil && !body.closed { |
| @@ -386,3 +388,166 @@ type doorErrorWriter struct{ header http.Header } |
| func (w *doorErrorWriter) Header() http.Header { return w.header } |
| func (w *doorErrorWriter) WriteHeader(int) {} |
| func (w *doorErrorWriter) Write([]byte) (int, error) { return 0, io.ErrClosedPipe } |
| + |
| +func heldDoorGETs(t *testing.T) (*storeDoor, func(string, bool) <-chan *httptest.ResponseRecorder) { |
| + t.Helper() |
| + d, base := newTestDoor(t) |
| + releaseBodies := make(chan struct{}) |
| + started := make(chan struct{}, 8) |
| + var workers sync.WaitGroup |
| + d.store = &doorStreamStore{Store: base, open: func() (io.ReadCloser, string, error) { |
| + return &doorSizedBody{Reader: &doorBlockingReader{release: releaseBodies, started: started}, size: (1 << 20) + 1}, "", nil |
| + }} |
| + auth := map[string]string{} |
| + for _, channel := range []string{testChannel, "pi/box-2", "pi/box-3", "second/box-1", "other/box-1"} { |
| + auth[channel] = sha256Hex(testToken) |
| + } |
| + d.hub.SetDynamicAuth(auth) |
| + d.fleetAccount = func(fleet string) (string, bool) { |
| + if fleet == "other" { |
| + return "zz99", true |
| + } |
| + return testSqid, true |
| + } |
| + t.Cleanup(func() { |
| + close(releaseBodies) |
| + workers.Wait() |
| + if d.getTotal != 0 || len(d.gets) != 0 || len(d.getAccounts) != 0 { |
| + t.Errorf("leaked slots: total=%d boxes=%v", d.getTotal, d.gets) |
| + } |
| + }) |
| + return d, func(channel string, held bool) <-chan *httptest.ResponseRecorder { |
| + t.Helper() |
| + key := ownKey |
| + if strings.HasPrefix(channel, "other/") { |
| + key = otherAccountKey |
| + } |
| + done := make(chan *httptest.ResponseRecorder, 1) |
| + workers.Add(1) |
| + go func() { |
| + defer workers.Done() |
| + w := httptest.NewRecorder() |
| + d.ServeHTTP(w, doorReq("GET", storeObjectPrefix+key, channel, testToken, "")) |
| + done <- w |
| + }() |
| + if held { |
| + select { |
| + case <-started: |
| + case w := <-done: |
| + t.Fatalf("GET refused: %d", w.Code) |
| + case <-time.After(5 * time.Second): |
| + t.Fatal("GET did not start") |
| + } |
| + } |
| + return done |
| + } |
| +} |
| + |
| +func TestStoreDoorSmallGETBypassesCap(t *testing.T) { |
| + d, start := heldDoorGETs(t) |
| + start(testChannel, true) |
| + start(testChannel, true) |
| + s := d.store.(*doorStreamStore) |
| + for _, size := range []int64{0, 1, 1 << 20} { |
| + body := &doorSizedBody{Reader: io.LimitReader(doorPatternReader{}, size), size: size} |
| + s.open = func() (io.ReadCloser, string, error) { return body, "", nil } |
| + w := doorDo(d, "GET", storeObjectPrefix+ownKey, "", nil) |
| + if w.Code != 200 || int64(w.Body.Len()) != size || !body.closed { |
| + t.Fatalf("size=%d: status=%d bytes=%d closed=%v", size, w.Code, w.Body.Len(), body.closed) |
| + } |
| + } |
| + for _, size := range []int64{-1, (1 << 20) + 1} { |
| + body := &doorSizedBody{Reader: doorErrorReader{}, size: size} |
| + s.open = func() (io.ReadCloser, string, error) { return body, "", nil } |
| + w := doorDo(d, "GET", storeObjectPrefix+ownKey, "", nil) |
| + if w.Code != 429 || w.Header().Get("Retry-After") != "5" || !body.closed { |
| + t.Fatalf("size=%d: status=%d headers=%v closed=%v", size, w.Code, w.Header(), body.closed) |
| + } |
| + } |
| +} |
| + |
| +func TestStoreDoorPerAccountCap(t *testing.T) { |
| + _, start := heldDoorGETs(t) |
| + start(testChannel, true) |
| + start(testChannel, true) |
| + start("pi/box-2", true) |
| + start("pi/box-2", true) |
| + for _, channel := range []string{"pi/box-3", "second/box-1"} { |
| + select { |
| + case w := <-start(channel, false): |
| + if w.Code != 429 || w.Header().Get("Retry-After") != "5" { |
| + t.Fatalf("account cap: %d %v", w.Code, w.Header()) |
| + } |
| + case <-time.After(time.Second): |
| + t.Fatal("fifth account GET was not refused") |
| + } |
| + } |
| + start("other/box-1", true) |
| +} |
| + |
| +type doorShortDeadlineWriter struct { |
| + http.ResponseWriter |
| + deadlines *atomic.Int32 |
| + badDeadline *atomic.Bool |
| +} |
| + |
| +func (w *doorShortDeadlineWriter) SetWriteDeadline(deadline time.Time) error { |
| + if !deadline.IsZero() { |
| + w.deadlines.Add(1) |
| + if remaining := time.Until(deadline); remaining < 59*time.Second || remaining > 60*time.Second { |
| + w.badDeadline.Store(true) |
| + } |
| + deadline = time.Now().Add(100 * time.Millisecond) |
| + } |
| + return http.NewResponseController(w.ResponseWriter).SetWriteDeadline(deadline) |
| +} |
| + |
| +func TestStoreDoorStalledReaderFreesSlot(t *testing.T) { |
| + d, start := heldDoorGETs(t) |
| + start(testChannel, true) |
| + var deadlines atomic.Int32 |
| + var badDeadline atomic.Bool |
| + s := d.store.(*doorStreamStore) |
| + s.open = func() (io.ReadCloser, string, error) { |
| + return &doorSizedBody{Reader: io.LimitReader(doorPatternReader{}, 1<<30), size: 1 << 30}, "", nil |
| + } |
| + finished := make(chan struct{}, 1) |
| + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| + defer func() { finished <- struct{}{} }() |
| + d.ServeHTTP(&doorShortDeadlineWriter{ResponseWriter: w, deadlines: &deadlines, badDeadline: &badDeadline}, r) |
| + })) |
| + defer server.Close() |
| + conn, err := net.Dial("tcp", server.Listener.Addr().String()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + defer conn.Close() |
| + if err := conn.(*net.TCPConn).SetReadBuffer(1024); err != nil { |
| + t.Fatal(err) |
| + } |
| + _, err = fmt.Fprintf(conn, "GET %s%s HTTP/1.1\r\nHost: test\r\nCarlos-Tunnel-Name: %s\r\nAuthorization: Bearer %s\r\n\r\n", storeObjectPrefix, ownKey, testChannel, testToken) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + select { |
| + case <-finished: |
| + case <-time.After(5 * time.Second): |
| + t.Fatal("stalled reader did not release its GET slot") |
| + } |
| + if deadlines.Load() < 2 || badDeadline.Load() { |
| + t.Fatalf("deadline refreshes=%d incorrect duration=%v", deadlines.Load(), badDeadline.Load()) |
| + } |
| + d.getMu.Lock() |
| + total := d.getTotal |
| + d.getMu.Unlock() |
| + if total != 1 { |
| + t.Fatalf("after stall: %d slots, want only the held GET", total) |
| + } |
| + s.open = func() (io.ReadCloser, string, error) { |
| + return &doorSizedBody{Reader: io.LimitReader(doorPatternReader{}, 2<<20), size: 2 << 20}, "", nil |
| + } |
| + w := doorDo(d, "GET", storeObjectPrefix+ownKey, "", nil) |
| + if w.Code != 200 || w.Body.Len() != 2<<20 { |
| + t.Fatalf("next GET: status=%d bytes=%d", w.Code, w.Body.Len()) |
| + } |
| +} |
diff --git a/internal/provision/instance_egress_sizes_census_test.go b/internal/provision/instance_egress_sizes_census_test.go| index c6ebec495..a2ec8e885 100644 |
| --- a/internal/provision/instance_egress_sizes_census_test.go |
| +++ b/internal/provision/instance_egress_sizes_census_test.go |
| @@ -44,7 +44,7 @@ func instanceEgressSizesWriteCensusInventory() []censusEntry { |
| {"internal/console/apiinstances.go", "Server.handleAPIInstanceList", "key-site", "lit:instances", "0e4720ae3420f8a20e07ac5c3e0b2a2aa929050826dd8103195875f1cd6b0691"}, |
| {"internal/console/authcli.go", "Server.registerCLIRoutes", "key-site", "lit:instances,lit:sidecars", "bfbc8c69caa3f5c3b0e6bef1dea0cac50ac72081ca33d78cc14e452780e369f1"}, |
| // Re-digested for storedoor-stream-get: GET streams through openGET with concurrency limits; the same ACL- and precondition-gated Put and bounded PUT body read are unchanged. |
| - {"internal/edge/storedoor.go", "storeDoor.serveObject", "record-transport", "sel:Put", "b449adb2812961af290c327cca8a43e0e92029acaafc2b63be20cb5b0d9b0196"}, |
| + {"internal/edge/storedoor.go", "storeDoor.serveObject", "record-transport", "sel:Put", "d328982ab92ad428797b02bab5c285721d4d346e25b9e5e1640ab29ae362c402"}, |
| {"internal/hostops/mutation_classifier.go", "ClassifyMutation", "reference", "str:Put", "d6c092d22943d0db17abed14cb73dda8a90e2753f2c9e790ddde9dd5dd36614c"}, |
| {"internal/provision/reconcile.go", "Reconcile", "key-site", "key:ParseRecordKey,key:RecordKey,lit:instances", "be424187c00d65935209ce8146aa7e24832ccf24af129075f7e94550e99683d0"}, |
| {"internal/provision/reconcile.go", "mintHeld", "key-site", "key:RecordKey", "c1334db2723716381f2fe57c60ccba3bd4953fcf57a155808ef3f14bb89f9c4a"}, |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index 5c5f297a2..a3aa2a17e 100644 |
| --- a/internal/provision/plan9_b8_census_test.go |
| +++ b/internal/provision/plan9_b8_census_test.go |
| @@ -759,8 +759,7 @@ var plan9B8CensusInventory = []censusEntry{ |
| // Calls the in-memory edge Cache.Put, not a deployment store writer. |
| {"internal/edge/edge.go", "Edge.maybeStore", "nonrecord", "sel:Put", "89231cd6ebfa293c307f502a7bf7236373199489e6846e0c3b8ccf281594b9ab"}, |
| {"internal/edge/mesh.go", "mintMeshKey", "nonrecord", "sel:Put", "bfb55866660051d4c55b2a1be96e7f997c76042119a8f57472fbc41908a2dcc0"}, |
| - // Re-digested for storedoor-stream-get: GET streams through openGET with concurrency limits; the same ACL- and precondition-gated Put and bounded PUT body read are unchanged. |
| - {"internal/edge/storedoor.go", "storeDoor.serveObject", "record-transport", "sel:Put", "b449adb2812961af290c327cca8a43e0e92029acaafc2b63be20cb5b0d9b0196"}, |
| + {"internal/edge/storedoor.go", "storeDoor.serveObject", "record-transport", "sel:Put", "95fef5f91ed7a5f07a3818b1a55baded4209e97d43d48ba21cb69be3d2c7299d"}, |
| {"internal/edge/wildcard.go", "wildcardManager.obtain", "nonrecord", "sel:Put", "752840841afb596cba318e5c7ece964c5146a7a24edde91f9c9dc0024753dc3b"}, |
| {"internal/edge/wildcard.go", "wildcardManager.accountKey", "nonrecord", "sel:Put", "77f7da94e302045eff8cbbb1be311bdcbaf75cc4cdd8f794d474e508fbf35a51"}, |
| {"internal/fleetapi/fleetapi.go", "store.Put", "record-transport", "def:Put", "68f7424cbbaf8fffde48429ae29198cf6e4fcf768c512657b305224febc11186"}, |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 598170eae..b93af8e0b 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -65,4 +65,4 @@ plan14-root-reads-edge-held-first-ping.tsv 3b6cd29b87d2728254936722ab45fdadcfbb8 |
| plan14-root-reads-fleet-examined-519.tsv 3b6cd29b87d2728254936722ab45fdadcfbb8c1f5b74fdfa19d1921b9dfd1dbe |
| plan14-root-reads-domains-zone-credentials.tsv 3b6cd29b87d2728254936722ab45fdadcfbb8c1f5b74fdfa19d1921b9dfd1dbe |
| plan14-root-reads-devbox-identity.tsv 66a5df05f18f70c3162ad05aa316c1e69c0f053d54f8b682262c266d6aa50772 |
| -plan14-root-reads-storedoor-stream-get.tsv 62b550b9398c40c2eabe4d3869acf0e1ec87a25e42fffca40affeef31adeac81 |
| +plan14-root-reads-storedoor-stream-get.tsv 6b6455ab34041aa7c989c6dffae8aeadf733c0cf89551faf2f11ad5ea6fd50c8 |
diff --git a/internal/provision/testdata/plan14-root-reads-storedoor-stream-get.tsv b/internal/provision/testdata/plan14-root-reads-storedoor-stream-get.tsv| index 4a8925ac8..7b9a1a8ed 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-storedoor-stream-get.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-storedoor-stream-get.tsv |
| @@ -1,11 +1,11 @@ |
| # Census overlay storedoor-stream-get, written by census-propose (#369). census-ruling-storedoor-stream-get, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-storedoor-stream-get.md. |
| # 2 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| # 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| -@legacy e1f0b764f795a634b113a156ab0d9a097a7798afefcebcf364fabb8653578332 internal/edge/storedoor.go storeDoor.serveObject legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 1 Task 5: a GET that passed aclRead and whose store answer is os.ErrNotExist sets Carlos-Store-Absent: 1 on the same 404 when appPolicyRead grants the key (exactly control/app-policy/<the box's own sqid>/<app>.json); every other 404 is unchanged. The same one ReadAll site (a PUT body under maxStoreBodyBytes), offset moved; no read added.;rev3=census-ruling-storedoor-stream-get;basis=GET streams through OpenObjectStreaming via openGET, with concurrency limits and Content-Length when known; no read added. The same bounded PUT ReadAll and store.Put remain unchanged. file:ReadAll@2074 b449adb2812961af290c327cca8a43e0e92029acaafc2b63be20cb5b0d9b0196 |
| +@legacy 56e19a0ab60e4c48ed8251caf7fea3971115b8dbd9088bc52e663955a6d1a953 internal/edge/storedoor.go storeDoor.serveObject legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 1 Task 5: a GET that passed aclRead and whose store answer is os.ErrNotExist sets Carlos-Store-Absent: 1 on the same 404 when appPolicyRead grants the key (exactly control/app-policy/<the box's own sqid>/<app>.json); every other 404 is unchanged. The same one ReadAll site (a PUT body under maxStoreBodyBytes), offset moved; no read added.;rev3=census-ruling-storedoor-stream-get;basis=GET opens before sizing; known bodies <= 1 MiB bypass caps. Unknown/large bodies acquire per-box 2, per-account 4, edge-wide 8 before writing, release by defer, and stream through a writer that refreshes a 60-second deadline for each bounded chunk. Auth/ACL, claims, missing-key handling and bounded PUT ReadAll/store.Put remain unchanged; no read added. file:ReadAll@2355 d328982ab92ad428797b02bab5c285721d4d346e25b9e5e1640ab29ae362c402 |
| @legacy e624eb81f597ae4d707fbdc55df74ed8280dbe66566a42e626daea3bc8200f38 internal/release/store.go S3Store.Open legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-storedoor-stream-get;basis=Wraps the existing GetObject response body in sizedObjectBody, exposing ContentLength through Size() or -1 when absent; preserves ETag, close/read behavior and missing-key mapping. No additional request or read added. file:Open@18 ed93e0efdb79dcd683abc22416a16927c913df65328818a81ae3ee6ceb97c106 |
| @legacy 35af88d16ade9e9c3d6f4403dd0732e448c8f6e9b1a536030bb909828d84adfe internal/edge/storedoor.go storeDoor.openGET legacy accepted-legacy accepted-legacy;rev3=census-ruling-storedoor-stream-get;basis=New helper: streams the existing key through OpenObjectStreaming; stats the opened DirStore file only to learn its size for Content-Length (new file:Stat read). Hashes and rewinds that same file when needed to preserve its ETag; unsupported stores retain Get with a 64 MiB returned-body limit. file:Stat@862 74346d1f654ce3da1f41c829e5ffaab11f4ef4a6c5d9a60b6c512d0ebde1672b |
| -internal/edge/storedoor.go storeDoor.serveObject legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 1 Task 5: a GET that passed aclRead and whose store answer is os.ErrNotExist sets Carlos-Store-Absent: 1 on the same 404 when appPolicyRead grants the key (exactly control/app-policy/<the box's own sqid>/<app>.json); every other 404 is unchanged. The same one ReadAll site (a PUT body under maxStoreBodyBytes), offset moved; no read added.;rev3=census-ruling-storedoor-stream-get;basis=GET streams through OpenObjectStreaming via openGET, with concurrency limits and Content-Length when known; no read added. The same bounded PUT ReadAll and store.Put remain unchanged. file:ReadAll@2074 b449adb2812961af290c327cca8a43e0e92029acaafc2b63be20cb5b0d9b0196 |
| +internal/edge/storedoor.go storeDoor.serveObject legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 1 Task 5: a GET that passed aclRead and whose store answer is os.ErrNotExist sets Carlos-Store-Absent: 1 on the same 404 when appPolicyRead grants the key (exactly control/app-policy/<the box's own sqid>/<app>.json); every other 404 is unchanged. The same one ReadAll site (a PUT body under maxStoreBodyBytes), offset moved; no read added.;rev3=census-ruling-storedoor-stream-get;basis=GET opens before sizing; known bodies <= 1 MiB bypass caps. Unknown/large bodies acquire per-box 2, per-account 4, edge-wide 8 before writing, release by defer, and stream through a writer that refreshes a 60-second deadline for each bounded chunk. Auth/ACL, claims, missing-key handling and bounded PUT ReadAll/store.Put remain unchanged; no read added. file:ReadAll@2355 d328982ab92ad428797b02bab5c285721d4d346e25b9e5e1640ab29ae362c402 |
| internal/release/store.go S3Store.Open legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-storedoor-stream-get;basis=Wraps the existing GetObject response body in sizedObjectBody, exposing ContentLength through Size() or -1 when absent; preserves ETag, close/read behavior and missing-key mapping. No additional request or read added. file:Open@18 ed93e0efdb79dcd683abc22416a16927c913df65328818a81ae3ee6ceb97c106 |
| internal/edge/storedoor.go storeDoor.openGET legacy accepted-legacy accepted-legacy;rev3=census-ruling-storedoor-stream-get;basis=New helper: streams the existing key through OpenObjectStreaming; stats the opened DirStore file only to learn its size for Content-Length (new file:Stat read). Hashes and rewinds that same file when needed to preserve its ETag; unsupported stores retain Get with a 64 MiB returned-body limit. file:Stat@862 74346d1f654ce3da1f41c829e5ffaab11f4ef4a6c5d9a60b6c512d0ebde1672b |
| -@coverage internal/edge 2035bd4b6775e4dd9e5f76b20ed24a47b07ee4ba4aea7181bec48d54eee160f9 |
| +@coverage internal/edge 6c85625d5f43447942a477b4072f3b6d34bf0b3e7f61d131d701e7b36da524ac |
| @coverage internal/release 35bfcaeb75b142964a19a92029b830567b9e6653fa28919c7aea1a958c20880b |