feat(httpapi): harden control plane and speed up prefix refresh

Очередь job получила lease и fencing, телеметрия и прогресс deploy сохраняются, ревизия пишет manifest входов. Обновление префиксов не переписывает неизменённый снимок, большие наборы идут через COPY, а устаревшая ревизия не попадает в deploy. Бандл ноды кэшируется, prune и постановка job больше не держат горячий путь.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
DenozordecandCursor committed 2026-11-02 17:23:59 +07:00
1 parent 924f111e48
commit f8e0520817
197 files changed
+18655 -1416

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
package httpclient
import (
"errors"
"io"
"net/http"
"strings"
"testing"
)
func TestReadResponseBodyDoesNotAcceptValidPrefixTruncation(t *testing.T) {
for _, length := range []int64{-1, 9} {
resp := &http.Response{ContentLength: length, Body: io.NopCloser(strings.NewReader("{} "))}
if _, err := ReadResponseBody(resp, 8); !errors.Is(err, ErrResponseTooLarge) {
t.Fatalf("length=%d got %v", length, err)
}
}
resp := &http.Response{ContentLength: -1, Body: io.NopCloser(strings.NewReader("{} "))}
if b, err := ReadResponseBody(resp, 8); err != nil || len(b) != 8 {
t.Fatalf("exact limit failed: %q %v", b, err)
}
}