oficina / equipo Public

Staging keeps in-app connections; size records for slice 1

The staging runners get their own accounts root, and a restage keeps
connections added in the app there; the suite person runs on the owner's
in-app Codex account as it does on claude-a. Size exemptions for the
thin runner, the chat store and the instance package, with reasons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev ea315e21bb741781f087fb2043e81152ba09d0d1 parent cd932ac
2 files changed, +27 −5
  • .rastrillo/budgets.txt +3 −3
  • scripts/staging-thin.py +24 −2

CI failed — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 0aea824a..222c4d01 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,7 +14,7 @@ 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 12100 - Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here.
+size internal/equipo 12400 - Connections slice 1 adds the Connections page, the switched line and the no_connection card and their copy (chat_connections.go, about 220 lines). Measured 12269. Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here.
size internal/equipotest - 13400 Task 21 repairs historical migration and conversation fixtures after Plan 3. Measured 13024 test lines; the 300s time ceiling is unchanged.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded); 60s gives 34 percent headroom. Shared baseline capture reduces repeated Go runs; retain the CI allowance for sandbox sentinels, timeout and child cleanup. 2026-11-07: loaded CI (host load about 24) measured 66.5s with the package unchanged by thin v1 slice 4 beyond optional check mounts; 90s keeps 35 percent headroom.
time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s). Parallel plan graphs and removal of repeated progress floods reduced their local targeted run from 146.920s to 30.784s; the original bug graph retains volume coverage. Keep 330s for journal, proxy, recovery and namespace integration, with 13 percent headroom.
@@ -35,7 +35,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.
time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s; niced serial reruns measured 5.773s and 5.750s. The added coordinator mount check has no repeated launches to remove; 15s leaves 38 percent headroom for namespace, process-exit and recovery assertions.
time internal/tryequipo 30s Release starter-set controller K3 records CI runs of 10.8s and 13.1s; 30s retains the guide integration checks with headroom on the shared runner.
-size internal/runner/thin 8500 - 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.
+size internal/runner/thin 10300 - 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 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 30s 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.
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 240s 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.
@@ -48,6 +48,6 @@ perf GET /api/v1/projects skip Thin v1 person API: bearer-only JSON for devices;
perf GET /api/v1/notebook skip Thin v1 person API: bearer-only JSON for devices; the browser reads the notebook through /conversation/notebook.
perf GET /api/v1/tasks skip Thin v1 person API: bearer-only JSON for devices; the browser reads tasks through /tasks.
perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads a task through /tasks/{id}.
-size internal/equipo/chat 6500 - Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep.
+size internal/equipo/chat 6900 - Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API and usage rows (connections.go, about 390 lines). Measured 6734. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep.
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}.
diff --git a/scripts/staging-thin.py b/scripts/staging-thin.py
index 529e65fc..dafa0070 100755
--- a/scripts/staging-thin.py
+++ b/scripts/staging-thin.py
@@ -275,10 +275,10 @@ def install(sha, release, root, unit_name, person, cookie_path, create):
unit = Path.home() / '.config/systemd/user' / unit_name
if unit.exists() and MARKER not in unit.read_text():
raise RuntimeError('refusing to replace an unrecognised ' + unit_name)
- for name in ['state', 'work', 'scratch', 'sessions', 'config']:
+ for name in ['state', 'work', 'scratch', 'sessions', 'config', 'accounts']:
(root / name).mkdir(parents=True, exist_ok=True, mode=0o700)
binding = dict(claude_a(), person_id=person)
- private(root / 'config/bindings.json', json.dumps([binding]))
+ private(root / 'config/bindings.json', json.dumps([binding] + added_in_app(root, person)))
source = read_env(PROD_ENV)
env = {k: v for k, v in source.items() if k in {
'EQUIPO_CLAUDE_PATH', 'EQUIPO_CODEX_PATH', 'EQUIPO_CODEX_CODE_MODE_HOST_PATH', 'EQUIPO_BWRAP_PATH',
@@ -290,6 +290,7 @@ def install(sha, release, root, unit_name, person, cookie_path, create):
EQUIPO_SCRATCH_ROOT=str(root / 'scratch'), EQUIPO_ACCOUNT_BINDINGS_PATH=str(root / 'config/bindings.json'),
EQUIPO_AMADAN_CREDENTIAL_PATH=source['EQUIPO_AMADAN_CREDENTIAL_PATH'],
EQUIPO_TOOL_PROXY_PATH=str(release / 'equipo-tool-proxy'),
+ EQUIPO_ACCOUNTS_ROOT=str(root / 'accounts'),
EQUIPO_RUNNER_CREATE_REPOS='1' if create else '0')
private(root / 'service.env', ''.join(f'{k}={json.dumps(v)}\n' for k, v in sorted(env.items())))
unit.parent.mkdir(parents=True, exist_ok=True)
@@ -308,6 +309,24 @@ def install(sha, release, root, unit_name, person, cookie_path, create):
print(unit_name, sha, 'started')
+def added_in_app(root, person):
+ """Connections added in the app (Connections slice 1) live in the
+ staging root's own accounts directory and survive a restage. The
+ suite person runs on the owner's in-app Codex account the way it runs
+ on claude-a: the same home, read in place, never copied."""
+ def kept(path, home_root):
+ try:
+ rows = json.loads(path.read_text())
+ except (FileNotFoundError, ValueError):
+ return []
+ return [b for b in rows if b.get('local_id') != 'claude-a' and Path(b.get('provider_home', '/')).parent == home_root]
+ own = kept(root / 'config/bindings.json', root / 'accounts')
+ if root == SUITE_ROOT:
+ owner = [dict(b, person_id=person) for b in kept(ROOT / 'config/bindings.json', ROOT / 'accounts') if b.get('provider') == 'codex']
+ own = [b for b in own if b.get('provider') != 'codex'] + owner
+ return own
+
+
def enrol(release, env, cookie_path):
cookie = cookie_path.read_text().strip()
proc = subprocess.Popen([str(release / 'equipo-runner'), 'enrol'], env=dict(env, PATH=os.environ['PATH'], HOME=str(Path.home())), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
@@ -349,6 +368,9 @@ def suite(only=''):
# Slice 4c: what the person says in the live merge witness
# (a repository whose own checks pass; Equipo merges it).
EQUIPO_STAGING_MERGE_WITNESS=os.environ.get('EQUIPO_STAGING_MERGE_WITNESS', ''),
+ # Connections slice 1: what the suite person says in the live
+ # coordinator turn that should run on Codex (claude-a limited).
+ EQUIPO_STAGING_CONN_WITNESS=os.environ.get('EQUIPO_STAGING_CONN_WITNESS', ''),
EQUIPO_HEADLESS_REPORT=str(ROOT / 'report.json'))
run(['go', 'test', './internal/headless', '-run', '^TestStaging$', '-count=1', '-v', '-timeout', '90m'], env=env, timeout=5600)
print(json.dumps(json.loads((ROOT / 'report.json').read_text()), indent=2))