oficina / equipo Public

make ci follow-ups: staticcheck, a load-proof write test, short budgets

From the one make ci run (make-ci.log), our three findings:

- staticcheck: thin/render_page_test.go's call helper returns its error
  last (ST1008); wire/design_test.go writes U+202E as an escape (ST1018).
- renderpage TestCallDeadlineCoversWriting panicked under load
  (wrote[len(wrote)-1] with nothing written: the deadline passed before
  any write). It now asserts the properties only: the call times out,
  no file is written after the slow one, the call's files and scratch
  are removed, the record is timeout with no files. The follow-up call
  runs at the real 60 s bound.
- .rastrillo/budgets.txt: lines 17, 18, 29, 41, 59 and 74 (internal/equipo,
  wire, runner/provider, runner/thin, equipo/chat, thintest; all
  lengthened on this branch, against 3c4f0578) cut to short reasons
  under 200 bytes; measured values unchanged.

Tests:
  go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags
    browser,perf,testbuild ./internal/runner/renderpage/
    ./internal/runner/thin/ ./internal/wire/            clean
  go test ./internal/runner/renderpage/ -run
    TestCallDeadlineCoversWriting -count=20 -cpu 1,2,4  ok (twice, once
    beside a -count=5 -cpu 1,4 run of the whole package)
  go test ./internal/runner/renderpage/                 ok
  go test ./internal/runner/thin/ -run TestRenderPageThroughTheStep  ok
  go test ./internal/testci -run TestBudgetRecordsAreShort  ok
  make budget                                          99 within budget
RED: make-ci.log (ST1008, ST1018, the index out of range panic, six
  budget lines over).
Mutations: the write test still catches writeCaptures without its
  final ctx check and without its per-file check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 2e69b7a7ed93d9c7d1bb70ec1bd9684061b09682 parent eb87396
4 files changed, +21 −17
  • .rastrillo/budgets.txt +6 −6
  • internal/runner/renderpage/tool_test.go +10 −6
  • internal/runner/thin/render_page_test.go +4 −4
  • internal/wire/design_test.go +1 −1

CI cancelled — superseded by a newer push — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 61b2cd52..1d331e37 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,8 +14,8 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr
time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI.
time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage.
-size internal/equipo 24050 - Preview grants, retry/timeline, no-access merges, kept work, check-db copy, notification actions, places page and its superseded card, GitHub owner routes, specialist copy, the recovery card and Design's waiting lines, Design's captures on the task page and direction card; measured 24050 source lines.
-size internal/wire 8682 - Protocol 31 facts, 32 unfinished work, task evidence, CI units, notification inputs, 33 Assistant files, 34 places, 35 diffs, 36 Design (binding, options, render_file), its exploration flag, brief, waits and recovery card, kept captures on the read shape, 36 render records on the step report; measured 8682 source lines.
+size internal/equipo 24050 - Grants, timeline, merges, kept work, check-db, notifications, places, GitHub owners, Design's specialist copy, waits, recovery and captures; measured 24050 source lines.
+size internal/wire 8682 - Protocols 31-35 (facts, unfinished work, evidence, files, places, diffs) and 36 Design: binding, options, render_file, captures, render records; measured 8682 source lines.
size internal/equipotest - 12684 GitHub connect value search, lifecycle and sweep-log contracts; Task 21 migration fixtures, Rastrillo asset contract, renderer pin link; measured 0/12684 source/test lines.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded);
time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s).
@@ -26,7 +26,7 @@ time internal/runner/provider/claude 45s Task 5 measured 32.430s for fake CLI se
time internal/runner/provider/codex 35s Plan 3 CI repair measured 24.464s for the full package (controller CI 27.908s).
time internal/runner/provider/pi 60s The real pinned Pi in bubblewrap against a fake TensorX: probes P1 to P5 (a hundred RPC turns), the hostile repository, and the pinned tree checked whole (about 160 MB); measured 22s locally.
time internal/runner/provider/opencode 90s The real pinned OpenCode in bubblewrap against a fake Go: probes, the hostile repository per source, termination, resume; the 260 MB binary hashed per launch. Measured 40s.
-size internal/runner/provider 5792 - Fable follow-up: base and diagnostic gates, preview isolation, provenance guards, the shared subscription family map (2026-11-24), and Design's executable policy (design_step, /render read-only); measured 5792 source lines.
+size internal/runner/provider 5792 - Base and diagnostic gates, preview isolation, provenance guards, the subscription family map, Design's design_step policy; measured 5792 source lines.
time internal/plan3test 300s Initial cap for combined browser and runner acceptance; measure at both usable stops.
@@ -38,7 +38,7 @@ time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full
perf GET /releases/* skip Verified runner release file downloads, not browser GET screens.
perf GET /install.sh skip Mac runners: the one-line bootstrap a terminal pipes to sh, not a browser screen.
time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s;
-size internal/runner/thin 31791 27934 Protocol 31 facts, 35 diffs, merge credential, publication guards, kept work, CI units, 34 places publish, GitHub token scans, waiting cards in the Assistant opening, the page renderer health, the paused work snapshot and render_page's step (sites, counts), 36 project proposals answered on older links and the Design step glue and its re-authorized launches, the Design prompt's exploration and brief and the bound continuation's framing, render_page's records on the step and every report that ends or advances an attempt, the snapshot within the call's deadline; measured 31791/27934.
+size internal/runner/thin 31791 27934 Protocols 31-35 glue, merges, publication, kept work, places, scans, renderer health, work snapshot, render_page counts and records, Design step, prompt and launches; measured 31791/27934.
time internal/thintest 240s Thin contract and page tests, the Assistant's and the models' included, share one harness. Measured 202s on a shared 16 CPU box (2026-11-13); CI runs two lanes.
time internal/runner/mac 30s Mac runners (Darwin worker): real process groups killed after a grace and proven gone (SIGTERM, SIGKILL, the marker sweep), and the probes run end to end with fake srt and xcodebuild, P6 killing.
time internal/runner/thin 45s Thin v1 slice 4 review: real git repositories for the merge and squash checks, a stalled fetch, and a 16 MiB candidate streamed through the review diff and the checks pack (about 5s).
@@ -56,7 +56,7 @@ perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for device
perf GET /api/v1/assistant/snapshot skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/messages skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/events skip Assistant event stream (Server-Sent Events), bearer-only and long-lived; not a screen.
-size internal/equipo/chat 40042 15852 File facts/diffs, previews, merge authority, unfinished work, CI feedback, notification receipts, Assistant files, places and where their cards land, waiting cards, 36 proposal project and Build's note, scoped specialists and their continuation, grants and step bindings, Design routing, the autonomy limit and the recovery card (any maker that stops resolving), Design's captures kept by the final report and Build's note, failovers within the autonomy limit, only the creator's acts reset it, and held Design work settled when its maker stops resolving, Design's render records kept on the step by their own attempt; measured 40042/15852.
+size internal/equipo/chat 40042 15852 Facts, previews, merges, unfinished work, CI, receipts, files, places, cards, specialists and grants, Design routing, autonomy limit, recovery, captures, render records; measured 40042/15852.
perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}.
perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}.
perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections.
@@ -71,7 +71,7 @@ perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one im
perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section.
time cmd/equipo-runner 60s TestReleaseRunnerHasNoFakeWorker builds the release runner and the thin package under testbuild (about 12s locally).
size internal/headless - 11873 Grant scenarios (#48); sign-in email at 1280 and 390; Assistant files end to end; the restart wait; the live site waits for a place; a card answer settles at the bottom; measured 11873 test lines.
-size internal/thintest - 37623 Protocol 31 contracts, 35 diffs, stuck tasks (the renderer health in status too), no-access merges, held retries, unfinished work, free rounds, previews, Assistant files, places and where their cards land, 36 Build's note, Design end to end and its refusals, the render audit seam; measured 37623 test lines.
+size internal/thintest - 37623 Protocol 31-35 contracts, stuck tasks, merges, retries, unfinished work, rounds, previews, files, places, 36 Build's note, Design end to end; measured 37623 test lines.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
diff --git a/internal/runner/renderpage/tool_test.go b/internal/runner/renderpage/tool_test.go
index d698503f..a080efcc 100644
--- a/internal/runner/renderpage/tool_test.go
+++ b/internal/runner/renderpage/tool_test.go
@@ -785,13 +785,15 @@ func TestCallIsAudited(t *testing.T) {
// TestCallDeadlineCoversWriting (branch review round 2, finding 5): the
// call's deadline holds through writing its captures. A write that runs
-// past it ends the call timeout, and this call's files are removed: none
-// is left for the model to read or for submit_candidate to name.
+// past it ends the call timeout: nothing more is written after it, and
+// this call's files are removed, so none is left for the model to read
+// or for submit_candidate to name. Under load the deadline may pass
+// before any write: the same holds.
func TestCallDeadlineCoversWriting(t *testing.T) {
before := captureWritten
t.Cleanup(func() { captureWritten = before })
- // Slow after the first file (the next is never written) and after
- // the last (all are written, then removed).
+ // Slow after the first file (the next must not be written) and after
+ // the last (all written, then removed).
for _, slow := range []string{"1-work-1.png", "1-work-2.png"} {
t.Run(slow, func(t *testing.T) {
shortCall(t, 150*time.Millisecond)
@@ -799,20 +801,22 @@ func TestCallDeadlineCoversWriting(t *testing.T) {
captureWritten = func(name string) {
wrote = append(wrote, name)
if name == slow {
+ // Well past the call's bound.
time.Sleep(250 * time.Millisecond)
}
}
r := newRig(t)
text, caps, err := r.call(t, workTwo)
timedOut(t, r, text, caps, err)
- if wrote[len(wrote)-1] != slow {
- t.Fatalf("written past the deadline: %v", wrote)
+ if i := slices.Index(wrote, slow); i >= 0 && i != len(wrote)-1 {
+ t.Fatalf("written after the deadline: %v", wrote)
}
if len(r.step.audits) != 1 || r.step.audits[0].Outcome != CodeTimeout || r.step.audits[0].Files != 0 {
t.Fatalf("records %+v", r.step.audits)
}
// A write within the deadline keeps every file.
captureWritten = before
+ callTimeout = render.CallTimeout
if _, caps, err := r.call(t, workTwo); err != nil || len(caps) != 2 || len(dirNames(t, r.step.dir)) != 2 {
t.Fatalf("a call within its deadline: %+v %v %v", caps, err, dirNames(t, r.step.dir))
}
diff --git a/internal/runner/thin/render_page_test.go b/internal/runner/thin/render_page_test.go
index bd882409..69a7c16f 100644
--- a/internal/runner/thin/render_page_test.go
+++ b/internal/runner/thin/render_page_test.go
@@ -207,7 +207,7 @@ func TestRenderPageThroughTheStep(t *testing.T) {
stateDir := t.TempDir()
gitDir, base := siteRepo(t, map[string]string{"release/preview.json": `{"output": "site"}`, "site/index.html": "<h1>Shop</h1>"})
calls := 0
- call := func() (string, []renderpage.Capture, error, *Engineer, stepRow) {
+ call := func() (string, []renderpage.Capture, *Engineer, stepRow, error) {
e, r := renderEngineer(t, stateDir)
tool := e.renderPage()
if tool != e.renderPage() {
@@ -215,9 +215,9 @@ func TestRenderPageThroughTheStep(t *testing.T) {
}
tool.Renderer, tool.Render = &readyRenderer{}, fakePageRender(&calls)
text, caps, err := e.renderCall(ctx, renderStep{row: r, tree: workspace.TaskTree{GitDir: gitDir}, base: base}, []byte(`{"tree": "base", "pages": [{"path": "/", "viewport": "phone"}]}`))
- return text, caps, err, e, r
+ return text, caps, e, r, err
}
- text, caps, err, e, r := call()
+ text, caps, e, r, err := call()
if err != nil || len(caps) != 1 || caps[0].File != "1-base-1.png" || !strings.Contains(text, "/render/1-base-1.png") {
t.Fatalf("%v %+v\n%s", err, caps, text)
}
@@ -229,7 +229,7 @@ func TestRenderPageThroughTheStep(t *testing.T) {
t.Fatalf("the render directory holds %v (%v)", entries, err)
}
e.O.State.Close()
- _, caps, err, _, _ = call()
+ _, caps, _, _, err = call()
if err != nil || len(caps) != 1 || caps[0].File != "2-base-1.png" || calls != 2 {
t.Fatalf("after a restart: %v %+v (%d renders)", err, caps, calls)
}
diff --git a/internal/wire/design_test.go b/internal/wire/design_test.go
index 8fe05050..7f1241eb 100644
--- a/internal/wire/design_test.go
+++ b/internal/wire/design_test.go
@@ -242,7 +242,7 @@ func TestValidOptions(t *testing.T) {
"markup": mutate(func(o []wire.DesignOption) { o[0].Name = "<b>Bold</b>" }),
"path": mutate(func(o []wire.DesignOption) { o[0].Name = "mockups/bold" }),
"invalid utf-8": mutate(func(o []wire.DesignOption) { o[0].Name = "Bold\xff" }),
- "format character": mutate(func(o []wire.DesignOption) { o[0].Name = "Bold‮grid" }),
+ "format character": mutate(func(o []wire.DesignOption) { o[0].Name = "Bold\u202egrid" }),
"same name": mutate(func(o []wire.DesignOption) { o[1].Name = "quiet EDITORIAL" }),
"same capture": mutate(func(o []wire.DesignOption) { o[1].Captures[0].ID = "1-work-1.png" }),
"same capture twice": mutate(func(o []wire.DesignOption) { o[0].Captures[1].ID = "1-work-1.png" }),