oficina / equipo Public

M8 against the staging line: real older runner and instance

TestMixedVersions builds thin-v1-composer at 0797ad0 from git history.
Its runner (the real older thin.Run) against this instance speaks
protocol 1, takes the sample task to done, and every frame it is sent
is exactly protocol 1 (Encode at protocol 1 drops nothing). This
runner against that instance falls back once, logs it, and takes the
same task to done; a worker cannot enrol there (fixed diagnostic, no
runner or enrolment created) and the primary still answers. The build
is cached only where EQUIPO_M8_CACHE points.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 921918ca78de7ffb4c8eed7a26a191cc910ec433 parent 23b0b31
2 files changed, +12 −29
  • .rastrillo/budgets.txt +1 −1
  • internal/headless/m8_test.go +11 −28

CI cancelled — superseded by a newer push — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 8fba6da5..cb61ed14 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -38,7 +38,7 @@ time internal/tryequipo 30s Release starter-set controller K3 records CI runs of
size internal/runner/thin 14900 - Mac runners slices A and B add protocol negotiation (link.go), the capability report, the start authorization, the pack relay (relay.go), the primary's publication, the worker executor (worker.go) and the test-build fake worker, about 2700 lines on the same step engine. Composer attachments add the chunked receipt with exactly-once writes, the read-only desk delivery and its checks (files.go, about 230 lines), image blocks and localImage inputs, the attachment read through read_file; measured 11736. Connections slice 1 Astra round 1 adds the Codex step path (codexstep.go: Engineering and Review on the pinned app-server in the implement and inspect containment, about 300 lines); measured 11345. Connections slice 1 (after Astra round 1) also keeps a durable ledger of each turn's write tools so a later attempt never repeats one (effects.go), the waiting state between attempts and usage rows per attempt, about 500 lines more; measured 10590 before gate 1d. Connections slice 1 adds the Codex coordinator beside the Claude one (codex.go: the pinned app-server over JSON-RPC in the converse containment, sharing the coordinator base, desk, tool socket and session table), the connection registry over the bindings with health and provider limits (conns.go), in-app sign-in attempts (connector.go) and turn failover and holding (failover.go), about 1500 lines; the pure parts (the choice function, limit parsing, the app-server client, the sign-in flows) live in internal/runner/connect. Measured 10097. Thin v1 UX1 adds step activity lines from the specialist's stream, the repository head and checks gate in the index and project-tagged notes (about 120 lines); measured 8615 with slice 4c's review fixes. Thin v1 slice 4c adds the merge step (mergestep.go, about 190 lines) and the rebase round beside the slice 4b ask fixes. Thin v1 slice 3 adds Engineering steps beside the coordinator: the durable step state and engine (step.go) and the executor that checks out the task tree, runs the CLI in the implement containment, commits and pushes (engineer.go), about 800 lines sharing the coordinator's launch, tool socket and account selection. Measured 5686 source lines. Splitting would export the launch internals; revisit at the slice 7 sweep. Slice 4 adds checks and review on a candidate (judge.go) and the merge watch (merge.go), about 800 lines, sharing the Engineer launch path; measured 6808, 7035 after review round 1 (branch head watch, deadlines, streamed outputs). Slice 4b keeps Engineering and Review sessions and answers the creator's questions from them (ask.go: kept-session and ask state, read-only git tools, the answer stream), about 700 lines on the same launch path.
time internal/thintest 110s Mac runners slices A and B add role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 8s). Housekeeping slice 1 adds six contract tests (combine, Undo round trips and the race, Pause, auto-disable, quiet hours, restart while claimed; about 6s); the package measured 67.7s beside other packages locally, so 75s. Thin v1 slice 4c adds the merge, adoption, cancel and retention contract tests (CI measured 35.7s). Thin v1 contract tests: a real instance and a scripted runner per test, fixtures replayed against every request, frame and event. Slice 3 adds the task, step-sync and grant contracts; CI measured 14.805s. 30s keeps room for the slice 4 review contracts. UX1 adds step activity, task source and duplicates, coordinator merging and project facts (four contracts, about 6s); the package measured 34s locally under load, so 40s. UX1's inner screens gallery (two owners, seven tasks, every page) adds about 3s; measured 40.9s locally under load, so 60s.
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). Measured 17.8s locally under load. Slice 4b review adds a 16 MiB git output bound, an injected index-pack failure and stall (3s deadline) and held-answer tests; measured 30.3s locally under load. 45s keeps 33 percent headroom.
-time internal/headless 480s Connections slice 1 after Astra round 1 adds attempts that wait for a connection, Review on a refused credential, Codex Engineering and Review and the preference (about 90s more; loaded CI measured 6m42s). It first adds TestHeadlessConnections (usage rows, failover, Codex coordinator, device code, Claude sign-in, failure kinds, cancel and sign-out, writes replayed, Engineering and Review moving connection, the waiting turn): eleven scenarios, about 55 to 100s locally. Thin v1 headless suite: real instance, runner and bubblewrap per scenario (spec 7, under two minutes). Slice 4 adds the review and checks scenarios (4_review with its fix rounds, branch move and merge; 4_checks_honest); loaded CI measured 170s on 2026-11-07. Slice 4b adds 4b_ask (about 12s); loaded CI measured 182.9s. 240s keeps 30 percent headroom.
+time internal/headless 720s Mac runners add TestMacWorker (M1, M2, M4, M5 with the fake worker; about 25s) and TestMixedVersions (M8: builds the staging line's headless test binary from git history, about 60 to 150s cold, then both pairs, about 20s). Connections slice 1 after Astra round 1 adds attempts that wait for a connection, Review on a refused credential, Codex Engineering and Review and the preference (about 90s more; loaded CI measured 6m42s). It first adds TestHeadlessConnections (usage rows, failover, Codex coordinator, device code, Claude sign-in, failure kinds, cancel and sign-out, writes replayed, Engineering and Review moving connection, the waiting turn): eleven scenarios, about 55 to 100s locally. Thin v1 headless suite: real instance, runner and bubblewrap per scenario (spec 7, under two minutes). Slice 4 adds the review and checks scenarios (4_review with its fix rounds, branch move and merge; 4_checks_honest); loaded CI measured 170s on 2026-11-07. Slice 4b adds 4b_ask (about 12s); loaded CI measured 182.9s. 240s keeps 30 percent headroom.
perf GET /api/v1/turns/{id} skip Thin v1 person API: bearer-only JSON for devices, not a browser screen.
perf GET /api/v1/events skip Thin v1 person event stream (Server-Sent Events), long-lived by design; not a screen.
perf GET /api/runner/stream skip Thin v1 runner WebSocket, bearer-only and long-lived; not a browser screen.
diff --git a/internal/headless/m8_test.go b/internal/headless/m8_test.go
index fdf17b9b..a6d7d08d 100644
--- a/internal/headless/m8_test.go
+++ b/internal/headless/m8_test.go
@@ -5,7 +5,6 @@ import (
"context"
"database/sql"
"encoding/json"
- "io"
"log/slog"
"os"
"os/exec"
@@ -22,10 +21,12 @@ import (
)
// slice4 is the protocol 1 release the mixed-version tests run against:
-// thin v1 slice 4c, the release staging serves and this branch starts
+// the staging line (thin-v1-composer at 0797ad0: slice 4c with
+// connections, housekeeping and attachments), which this branch upgrades
// from. (The spec names ca0a65c, slice 4 itself; its wire predates the
-// 4b and 4c frame fields, a skew that release already has.)
-const slice4 = "2d1edaf08eedce9c1add0d6de584cdd7debddff0"
+// 4b, 4c and connections frame fields, a skew those releases already
+// have.)
+const slice4 = "0797ad0762da8c3a8ebde6664583c77c9f9c34a2"
// oldInstanceTest is added to the slice 4 tree when its test binary is
// built: an instance of that release, in its own process, until stdin
@@ -64,18 +65,13 @@ var oldOnce sync.Mutex
// oldBinary is the slice 4 headless test binary (the real slice 4 runner
// and, with the overlay above, instance), built from git history once
-// and kept in the user cache (EQUIPO_M8_CACHE overrides; a read-only
-// cache falls back to the test's own directory).
+// and kept in EQUIPO_M8_CACHE when it is set (CI keeps it as an
+// artifact), else in the test's own directory.
func oldBinary(t *testing.T) string {
t.Helper()
oldOnce.Lock()
defer oldOnce.Unlock()
cache := os.Getenv("EQUIPO_M8_CACHE")
- if cache == "" {
- if dir, err := os.UserCacheDir(); err == nil {
- cache = filepath.Join(dir, "equipo-m8")
- }
- }
if cache == "" || os.MkdirAll(filepath.Join(cache, slice4), 0700) != nil {
cache = t.TempDir()
}
@@ -179,22 +175,10 @@ func TestMixedVersions(t *testing.T) {
t.Fatalf("unparsable frame %s", raw)
}
kinds[f.Type]++
- if !wire.Speaks(wire.Protocol1, f.Type) {
- t.Fatalf("protocol 1 runner sent %s", raw)
- }
- for _, field := range []string{`"needs"`, `"runner_id":"`, `"protocol"`, `"role"`, `"release"`, `"step_id":"","attempt"`} {
- if f.Type != wire.FrameWelcome && field == `"runner_id":"` {
- if f.Type == wire.FrameDispatch && bytes.Contains(f.Data, []byte(field)) {
- t.Fatalf("dispatch with runner_id at protocol 1: %s", raw)
- }
- continue
- }
- if f.Type != wire.FrameWelcome && field != `"needs"` {
- continue
- }
- if bytes.Contains(f.Data, []byte(field)) && field != `"runner_id":"` {
- t.Fatalf("protocol 2 field %s at protocol 1: %s", field, raw)
- }
+ // Exactly the protocol 1 frame: nothing Encode would drop.
+ old, err := wire.Encode(f, wire.Protocol1)
+ if err != nil || !bytes.Equal(old.Data, f.Data) {
+ t.Fatalf("a protocol 1 runner was sent more than protocol 1: %v %s", err, raw)
}
}
if kinds[wire.FrameDispatch] < 3 || kinds[wire.FrameWelcome] < 1 {
@@ -301,4 +285,3 @@ func (l *lockedBuffer) String() string {
return l.b.String()
}
-var _ = io.Discard