oficina / equipo Public

Merge branch 'mac-checks-wait-sandbox' into main

Merge mac-checks-wait-sandbox: no bare Mac checks without consent

Until a Mac's P2 passes and it is untainted, its checks wait (Waiting
for the Mac's sandbox) and mac-recheck does not fire. Only the task's
creator can choose an unsandboxed run, behind a warning; consent is per
attempt and audited, enforced at placement and in the runner. Protocol
7, migration 0064. Hosted CI passed on 913dd9d.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 0a6405b7b8a473ac9863e0035e89936f32970ed3 parent 8d7f217parent 913dd9d
26 files changed, +836 −49
  • .rastrillo/budgets.txt +4 −4
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +8 −1
  • internal/equipo/app.go +1 −0
  • internal/equipo/chat/macrecheck.go +6 −3
  • internal/equipo/chat/macsandbox.go +134 −0
  • internal/equipo/chat/macsandbox_test.go +43 −0
  • internal/equipo/chat/review.go +3 −0
  • internal/equipo/chat/runner.go +4 −0
  • internal/equipo/chat/runners.go +30 −12
  • internal/equipo/chat/tasks.go +27 −3
  • internal/equipo/copy.go +9 −2
  • internal/equipo/migrations/0064_thin_checks_sandbox_consent.sql +5 −0
  • internal/equipo/migrations/schema.sql +1 −1
  • internal/equipo/templates/work_parts.html +1 −1
  • internal/equipo/work_pages.go +22 −0
  • internal/equipo/work_views.go +24 −2
  • internal/runner/thin/link.go +5 −0
  • internal/runner/thin/mac.go +30 −2
  • internal/runner/thin/mac_test.go +3 −2
  • internal/runner/thin/sandbox_consent_test.go +130 −0
  • internal/runner/thin/worker.go +6 −1
  • internal/thintest/placement_contract_test.go +6 −5
  • internal/thintest/sandbox_wait_contract_test.go +236 −0
  • internal/wire/runners.go +45 −6
  • internal/wire/runners_test.go +32 −1
  • internal/wire/tasks.go +21 −3

CI passed — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 6d0722e6..6b88f18a 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 17037 - Empty repositories merged onto main: measured 17037. The access card picks its grant line and namespace from the card's name (GrantHow, about 6 lines). The paste box's look adds its three labels (Prompt, Text, Command) and pasteBox, which gives the renderer Copy's icons (about 13 lines); measured 17031. Token row facts merged onto main: measured 17018. Token row facts add the row's stated email and usage line (rowFacts), the email route and its field, connections.js keeping an open field across refreshes, their CSS and 8 strings (about 90 lines); measured 17009. Merge authority merged onto Machines in Settings and stale thinking lines: measured 16914. Stale thinking lines (the queued note in chat_page.go and chat.html, the refresh and turn ownership in chat-stream.js, about 60 lines) merged onto Machines in Settings: measured 16725. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. 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 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. 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. Merge authority thin v1 adds the project page's "How Equipo merges" section and form (merge_policy_page.go, about 90 lines) and 86 strings; measured 16568 with main (spend-1, the four UI branches) merged. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. 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 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. 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 17089 - Mac checks wait for the sandbox: the waiting line and summary, the decision card with Run outside the sandbox and its warning, its route and handler, and 7 strings (about 51 lines, with the sandbox_unproven reason); measured 17089. Empty repositories merged onto main: measured 17037. The access card picks its grant line and namespace from the card's name (GrantHow, about 6 lines). The paste box's look adds its three labels (Prompt, Text, Command) and pasteBox, which gives the renderer Copy's icons (about 13 lines); measured 17031. Token row facts merged onto main: measured 17018. Token row facts add the row's stated email and usage line (rowFacts), the email route and its field, connections.js keeping an open field across refreshes, their CSS and 8 strings (about 90 lines); measured 17009. Merge authority merged onto Machines in Settings and stale thinking lines: measured 16914. Stale thinking lines (the queued note in chat_page.go and chat.html, the refresh and turn ownership in chat-stream.js, about 60 lines) merged onto Machines in Settings: measured 16725. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. 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 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. 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. Merge authority thin v1 adds the project page's "How Equipo merges" section and form (merge_policy_page.go, about 90 lines) and 86 strings; measured 16568 with main (spend-1, the four UI branches) merged. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. 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 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. 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.
@@ -34,7 +34,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; 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.
-size internal/runner/thin 16948 8600 Mac Xcode scratch: the Mac host test pins the gate's environment (the runner user's HOME kept, no scratch home; 6 lines); measured 16948/8600. Empty repositories merged onto main: measured 16948/8594. Empty repositories: the index lists a reachable repository with no commits as empty, DefaultBranch tells that from no access (lsRemote), reads of it say so, and the handshake hello keeps empty entries back until a protocol 6 welcome (about 52 lines); their tests (index_empty_test.go, the handshake hello at protocols 5 and 6, startLinkWith; about 183 lines). Token row facts merged onto main: measured 16896/8411. Token row facts read the check's rate limit and record it as a turn's (TokenCheck, the Verify wiring, about 40 lines); measured 16614. The leftover helper's debug line adds 3 lines: measured 16572. The Mac host's hang fix and probe pacing add the process group and its kill (procgroup_unix.go, procgroup_other.go), the bounded wait for a command's output, and the untrusted report's rerun decision with its tool fingerprint (about 165 lines); measured 16569. Runner startup logs add the info lines a silent start is pinned to a phase by (startup phases, the Mac host's xcode-select and capability commands, slow-command warnings, the probes, and the link's connecting, hello and welcome lines: startPhase, openRunner, watchSlow and logged, about 155 lines); measured 16405. Merge authority thin v1 adds the review's measured change facts (facts.go: raw and numstat listings, modes, signing lines, the revert tree check, about 230 lines), the merge_request confirmation and the merge's provenance; measured 16196 with spend-1 merged. Spend 1 resumes a fix round in Engineering's kept session on its healthy connection (fixSession, fixPlan, fixPrompt, keptCommit, about 90 lines); measured 15873. Claude's sign-in by a link's review round 1 contains its setup-token in a recorded namespace (the contained terminal, its proven stop and the start's recovery before a home goes, about 130 lines); measured 15787. Claude's sign-in by a link adds the runner's own setup-token attempt, the code's sealed delivery with its crash boundaries and the shared token commit (signin.go, about 300 lines, less the removed terminal watcher); measured 15655. Claude setup tokens add sealed delivery, the token check, Check again and recovery (token.go, tokencheck.go, about 700 lines) beside the composer and Mac lines; measured 15239. Astra round 2 moves the attachment quota to admission: arriving files counted by declared size, admissions protecting a file until its message names it, room made from the oldest unprotected files, refusal as runner_storage_full, and a sweep that stops when protection cannot be read (about 150 lines); measured 12191. 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. Mac P2 diagnostics hand the probes' host runner.log's WARN (macHost.warn, 8 lines) and pin it with a test (12 lines): measured 16854/8411. Mac probe deadlines bound the booted simctl list, move the worker's wait for the probes out of its lock (hold) and warn when a probe run reaches its limit (about 24 lines); their tests (mac_stall_test.go: a fake xcrun that never answers, probes stalled while an update applies, about 270 lines) beside the Mac host they drive: measured 16846/8399. Release slice 1 merged onto main: measured 16822/8130. Release slice 1 (hosted checks) adds the hub's hosted CI verdict for checks: the deferred one-read poll with its persisted deadline, the one-snapshot verdict, the failing units and the restart case (judge_hosted.go, about 200 lines) and the forge's CI reads (forge.go, about 40); measured 16821. Its tests (judge_hosted_test.go, about 270 lines) take the package's tests to 8113, beside the step engine they drive. The leftover helper's debug line adds 3 lines: measured 16572. The Mac host's hang fix and probe pacing add the process group and its kill (procgroup_unix.go, procgroup_other.go), the bounded wait for a command's output, and the untrusted report's rerun decision with its tool fingerprint (about 165 lines); measured 16569. Runner startup logs add the info lines a silent start is pinned to a phase by (startup phases, the Mac host's xcode-select and capability commands, slow-command warnings, the probes, and the link's connecting, hello and welcome lines: startPhase, openRunner, watchSlow and logged, about 155 lines); measured 16405. Merge authority thin v1 adds the review's measured change facts (facts.go: raw and numstat listings, modes, signing lines, the revert tree check, about 230 lines), the merge_request confirmation and the merge's provenance; measured 16196 with spend-1 merged. Spend 1 resumes a fix round in Engineering's kept session on its healthy connection (fixSession, fixPlan, fixPrompt, keptCommit, about 90 lines); measured 15873. Claude's sign-in by a link's review round 1 contains its setup-token in a recorded namespace (the contained terminal, its proven stop and the start's recovery before a home goes, about 130 lines); measured 15787. Claude's sign-in by a link adds the runner's own setup-token attempt, the code's sealed delivery with its crash boundaries and the shared token commit (signin.go, about 300 lines, less the removed terminal watcher); measured 15655. Claude setup tokens add sealed delivery, the token check, Check again and recovery (token.go, tokencheck.go, about 700 lines) beside the composer and Mac lines; measured 15239. Astra round 2 moves the attachment quota to admission: arriving files counted by declared size, admissions protecting a file until its message names it, room made from the oldest unprotected files, refusal as runner_storage_full, and a sweep that stops when protection cannot be read (about 150 lines); measured 12191. 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. The paste box house rule merged onto the runner logs: measured 16573. The leftover helper's debug line adds 3 lines: measured 16572. The Mac host's hang fix and probe pacing add the process group and its kill (procgroup_unix.go, procgroup_other.go), the bounded wait for a command's output, and the untrusted report's rerun decision with its tool fingerprint (about 165 lines); measured 16569. Runner startup logs add the info lines a silent start is pinned to a phase by (startup phases, the Mac host's xcode-select and capability commands, slow-command warnings, the probes, and the link's connecting, hello and welcome lines: startPhase, openRunner, watchSlow and logged, about 155 lines); measured 16405. Merge authority thin v1 adds the review's measured change facts (facts.go: raw and numstat listings, modes, signing lines, the revert tree check, about 230 lines), the merge_request confirmation and the merge's provenance; measured 16196 with spend-1 merged. Spend 1 resumes a fix round in Engineering's kept session on its healthy connection (fixSession, fixPlan, fixPrompt, keptCommit, about 90 lines); measured 15873. Claude's sign-in by a link's review round 1 contains its setup-token in a recorded namespace (the contained terminal, its proven stop and the start's recovery before a home goes, about 130 lines); measured 15787. Claude's sign-in by a link adds the runner's own setup-token attempt, the code's sealed delivery with its crash boundaries and the shared token commit (signin.go, about 300 lines, less the removed terminal watcher); measured 15655. Claude setup tokens add sealed delivery, the token check, Check again and recovery (token.go, tokencheck.go, about 700 lines) beside the composer and Mac lines; measured 15239. Astra round 2 moves the attachment quota to admission: arriving files counted by declared size, admissions protecting a file until its message names it, room made from the oldest unprotected files, refusal as runner_storage_full, and a sweep that stops when protection cannot be read (about 150 lines); measured 12191. 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.
+size internal/runner/thin 16986 8731 Mac checks wait for the sandbox: macChecks.Run refuses unproven without the dispatch's consent, the consent context, the worker's refusal report and the link's protocol 7 gate (about 38 lines), and their tests (sandbox_consent_test.go, about 131 lines); measured 16986/8731. Mac Xcode scratch: the Mac host test pins the gate's environment (the runner user's HOME kept, no scratch home; 6 lines); measured 16948/8600. Empty repositories merged onto main: measured 16948/8594. Empty repositories: the index lists a reachable repository with no commits as empty, DefaultBranch tells that from no access (lsRemote), reads of it say so, and the handshake hello keeps empty entries back until a protocol 6 welcome (about 52 lines); their tests (index_empty_test.go, the handshake hello at protocols 5 and 6, startLinkWith; about 183 lines). Token row facts merged onto main: measured 16896/8411. Token row facts read the check's rate limit and record it as a turn's (TokenCheck, the Verify wiring, about 40 lines); measured 16614. The leftover helper's debug line adds 3 lines: measured 16572. The Mac host's hang fix and probe pacing add the process group and its kill (procgroup_unix.go, procgroup_other.go), the bounded wait for a command's output, and the untrusted report's rerun decision with its tool fingerprint (about 165 lines); measured 16569. Runner startup logs add the info lines a silent start is pinned to a phase by (startup phases, the Mac host's xcode-select and capability commands, slow-command warnings, the probes, and the link's connecting, hello and welcome lines: startPhase, openRunner, watchSlow and logged, about 155 lines); measured 16405. Merge authority thin v1 adds the review's measured change facts (facts.go: raw and numstat listings, modes, signing lines, the revert tree check, about 230 lines), the merge_request confirmation and the merge's provenance; measured 16196 with spend-1 merged. Spend 1 resumes a fix round in Engineering's kept session on its healthy connection (fixSession, fixPlan, fixPrompt, keptCommit, about 90 lines); measured 15873. Claude's sign-in by a link's review round 1 contains its setup-token in a recorded namespace (the contained terminal, its proven stop and the start's recovery before a home goes, about 130 lines); measured 15787. Claude's sign-in by a link adds the runner's own setup-token attempt, the code's sealed delivery with its crash boundaries and the shared token commit (signin.go, about 300 lines, less the removed terminal watcher); measured 15655. Claude setup tokens add sealed delivery, the token check, Check again and recovery (token.go, tokencheck.go, about 700 lines) beside the composer and Mac lines; measured 15239. Astra round 2 moves the attachment quota to admission: arriving files counted by declared size, admissions protecting a file until its message names it, room made from the oldest unprotected files, refusal as runner_storage_full, and a sweep that stops when protection cannot be read (about 150 lines); measured 12191. 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. Mac P2 diagnostics hand the probes' host runner.log's WARN (macHost.warn, 8 lines) and pin it with a test (12 lines): measured 16854/8411. Mac probe deadlines bound the booted simctl list, move the worker's wait for the probes out of its lock (hold) and warn when a probe run reaches its limit (about 24 lines); their tests (mac_stall_test.go: a fake xcrun that never answers, probes stalled while an update applies, about 270 lines) beside the Mac host they drive: measured 16846/8399. Release slice 1 merged onto main: measured 16822/8130. Release slice 1 (hosted checks) adds the hub's hosted CI verdict for checks: the deferred one-read poll with its persisted deadline, the one-snapshot verdict, the failing units and the restart case (judge_hosted.go, about 200 lines) and the forge's CI reads (forge.go, about 40); measured 16821. Its tests (judge_hosted_test.go, about 270 lines) take the package's tests to 8113, beside the step engine they drive. The leftover helper's debug line adds 3 lines: measured 16572. The Mac host's hang fix and probe pacing add the process group and its kill (procgroup_unix.go, procgroup_other.go), the bounded wait for a command's output, and the untrusted report's rerun decision with its tool fingerprint (about 165 lines); measured 16569. Runner startup logs add the info lines a silent start is pinned to a phase by (startup phases, the Mac host's xcode-select and capability commands, slow-command warnings, the probes, and the link's connecting, hello and welcome lines: startPhase, openRunner, watchSlow and logged, about 155 lines); measured 16405. Merge authority thin v1 adds the review's measured change facts (facts.go: raw and numstat listings, modes, signing lines, the revert tree check, about 230 lines), the merge_request confirmation and the merge's provenance; measured 16196 with spend-1 merged. Spend 1 resumes a fix round in Engineering's kept session on its healthy connection (fixSession, fixPlan, fixPrompt, keptCommit, about 90 lines); measured 15873. Claude's sign-in by a link's review round 1 contains its setup-token in a recorded namespace (the contained terminal, its proven stop and the start's recovery before a home goes, about 130 lines); measured 15787. Claude's sign-in by a link adds the runner's own setup-token attempt, the code's sealed delivery with its crash boundaries and the shared token commit (signin.go, about 300 lines, less the removed terminal watcher); measured 15655. Claude setup tokens add sealed delivery, the token check, Check again and recovery (token.go, tokencheck.go, about 700 lines) beside the composer and Mac lines; measured 15239. Astra round 2 moves the attachment quota to admission: arriving files counted by declared size, admissions protecting a file until its message names it, room made from the oldest unprotected files, refusal as runner_storage_full, and a sweep that stops when protection cannot be read (about 150 lines); measured 12191. 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. The paste box house rule merged onto the runner logs: measured 16573. The leftover helper's debug line adds 3 lines: measured 16572. The Mac host's hang fix and probe pacing add the process group and its kill (procgroup_unix.go, procgroup_other.go), the bounded wait for a command's output, and the untrusted report's rerun decision with its tool fingerprint (about 165 lines); measured 16569. Runner startup logs add the info lines a silent start is pinned to a phase by (startup phases, the Mac host's xcode-select and capability commands, slow-command warnings, the probes, and the link's connecting, hello and welcome lines: startPhase, openRunner, watchSlow and logged, about 155 lines); measured 16405. Merge authority thin v1 adds the review's measured change facts (facts.go: raw and numstat listings, modes, signing lines, the revert tree check, about 230 lines), the merge_request confirmation and the merge's provenance; measured 16196 with spend-1 merged. Spend 1 resumes a fix round in Engineering's kept session on its healthy connection (fixSession, fixPlan, fixPrompt, keptCommit, about 90 lines); measured 15873. Claude's sign-in by a link's review round 1 contains its setup-token in a recorded namespace (the contained terminal, its proven stop and the start's recovery before a home goes, about 130 lines); measured 15787. Claude's sign-in by a link adds the runner's own setup-token attempt, the code's sealed delivery with its crash boundaries and the shared token commit (signin.go, about 300 lines, less the removed terminal watcher); measured 15655. Claude setup tokens add sealed delivery, the token check, Check again and recovery (token.go, tokencheck.go, about 700 lines) beside the composer and Mac lines; measured 15239. Astra round 2 moves the attachment quota to admission: arriving files counted by declared size, admissions protecting a file until its message names it, room made from the oldest unprotected files, refusal as runner_storage_full, and a sweep that stops when protection cannot be read (about 150 lines); measured 12191. 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 180s Mac runners slices A and B add role, scoping, migration, placement, withdrawal, transfer and publication contracts, and Astra round 1 eight transition contracts (about 15s; the package measured 126s locally under load). 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/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 a waiting test two seconds after it starts. About 6s alone; loaded CI measured 12.5s.
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.
@@ -49,7 +49,7 @@ perf GET /api/v1/notebook skip Thin v1 person API: bearer-only JSON for devices;
perf GET /api/v1/thinking skip Thin v1 person API: bearer-only JSON for devices; the browser reads thinking words on /settings/thinking.
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 14333 - Empty repositories merged onto main: measured 14333. Empty repositories: the read gate answers empty and not read yet, find covers repositories on the runner's list, and the access card names a namespace only from ns/repo (AccessName, GrantNamespace; about 58 lines). Token row facts merged onto main: measured 14275. Token row facts add the stated email's store write with its shape check and the row facts read (StatedEmailShape, SetStatedEmail, ConnectionRowFacts, about 95 lines); measured 14195. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. 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. The duplicate keep rule merged onto main: measured 14175. The duplicate combine keeps the decided task: the housekeeping view reads each task's newest merge card and marks it Decided (about 12 lines); measured 14110. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. 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. Release slice 1 (hosted checks) adds the hosted CI offer, the binding's acceptance inside the step report's transaction, the hosted sandbox rule and the fix round's failing units (about 65 lines); measured 14160. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. 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 14519 - Mac checks wait for the sandbox: placement holds checks off a Mac whose sandbox is not proven (waiting_sandbox), the refusal puts them back to wait, a newly proven hello places them, recheckMac skips an unproven Mac, and RunUnsandboxed records and audits the creator's choice (macsandbox.go; about 186 lines); measured 14519. Empty repositories merged onto main: measured 14333. Empty repositories: the read gate answers empty and not read yet, find covers repositories on the runner's list, and the access card names a namespace only from ns/repo (AccessName, GrantNamespace; about 58 lines). Token row facts merged onto main: measured 14275. Token row facts add the stated email's store write with its shape check and the row facts read (StatedEmailShape, SetStatedEmail, ConnectionRowFacts, about 95 lines); measured 14195. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. 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. The duplicate keep rule merged onto main: measured 14175. The duplicate combine keeps the decided task: the housekeeping view reads each task's newest merge card and marks it Decided (about 12 lines); measured 14110. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. 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. Release slice 1 (hosted checks) adds the hosted CI offer, the binding's acceptance inside the step report's transaction, the hosted sandbox rule and the fix round's failing units (about 65 lines); measured 14160. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. 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}.
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.
@@ -62,5 +62,5 @@ perf GET /conversation/attachments/{id}/preview skip Composer attachments: an 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 Mac runners slice B: TestReleaseRunnerHasNoFakeWorker builds the release runner exactly as make release-runner does and the thin package under the testbuild tag (measured 11.9s locally with a warm cache).
size internal/headless - 9099 Empty repositories merged onto main: measured 9099. Empty repositories add scenario 3_empty_repo through the real runner (grantEmpty, GrantEmpty and Indexed controls; about 87 lines). The paste box's look adds TestBrowserPasteBoxLook (one unit at 1280 and 390, light and dark: the bar inside the box, the labels, the prompt wrapped in the body font, the command scrolling, the tick and Copied without the bar moving; about 60 lines) and the streaming icon check; measured 9012. Copy's drive records what paste.js hands the clipboard API and the execCommand fallback on every run, and reads the real clipboard back only where the browser grants it (CI's Chromium refused it; about 34 lines); measured 8949. Copy's real clipboard drive and the stale page reload merged onto token row facts: measured 8915. They add browser_paste_copy_test.go (about 166 lines: both replies and the fallback through the real clipboard, the older page that reloads when quiet, the composer that holds it, the place kept and no loop); measured 8845. Token row facts merged onto main: measured 8749. Token row facts add TestHeadlessTokenCheckHeadroom (a check's windows and a quota-refused check through the real runner and fake CLI, about 70 lines); measured 8593. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The duplicate keep rule merged onto main: measured 8679. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Release slice 1 merged onto main: measured 8679. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090.
-size internal/thintest - 14247 Empty repositories merged onto main: measured 14247. Empty repositories add TestContractEmptyRepository and TestAccessName and extend the grant card page test to a named namespace (about 138 lines). Token row facts merged onto main: measured 14109. Token row facts add the token row's page and browser tests (token_row_pages_test.go, token_row_browser_test.go, about 225 lines); measured 13902. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The duplicate keep rule merged onto main: measured 13885. The duplicate combine keeps the decided task adds staging's Woodstar pair as a contract through the real store (TestContractCombineKeepsDecided, about 60 lines); measured 13747. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Release slice 1 merged onto main: measured 13823. Release slice 1 (hosted checks) adds its contracts (hosted_checks_contract_test.go: the pass that asks, the failure's fix round, every binding rule, the protocol 4 runner; about 140 lines); measured 13816. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness.
+size internal/thintest - 14484 Mac checks wait for the sandbox: the staging sequence through placement and the page, a proven sandbox and a refusal, and the Mac re-check (sandbox_wait_contract_test.go, about 237 lines); measured 14484. Empty repositories merged onto main: measured 14247. Empty repositories add TestContractEmptyRepository and TestAccessName and extend the grant card page test to a named namespace (about 138 lines). Token row facts merged onto main: measured 14109. Token row facts add the token row's page and browser tests (token_row_pages_test.go, token_row_browser_test.go, about 225 lines); measured 13902. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The duplicate keep rule merged onto main: measured 13885. The duplicate combine keeps the decided task adds staging's Woodstar pair as a contract through the real store (TestContractCombineKeepsDecided, about 60 lines); measured 13747. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Release slice 1 merged onto main: measured 13823. Release slice 1 (hosted checks) adds its contracts (hosted_checks_contract_test.go: the pass that asks, the failure's fix round, every binding rule, the protocol 4 runner; about 140 lines); measured 13816. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness.
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}.
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index e2263ac7..81ab8551 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -5866,7 +5866,7 @@ records remain unchanged.
| `runner.enrol.failed` | Adding this machine to Equipo failed: %s | Mac runners (Darwin worker) | COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `runner.mac.not_logged_in` | Log in as %s on this Mac (fast user switching) and keep it logged in, then run this again. | Mac runners (Darwin worker) | COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `runner.mac.homes_unknown` | Equipo could not check the other home folders on this Mac, so it stopped. Ask an administrator to check that /Users can be listed, then paste the command again. | Mac runners (Darwin worker) | COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
-| `runner.tainted` | A check has run outside the sandbox on this Mac, so its checks are always labelled that way from now on. To start clean, install the runner again as a new Mac user. | Mac runners (Darwin worker) | COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `runner.tainted` | A check has run outside the sandbox on this Mac, so Equipo no longer trusts its sandbox. Checks on this Mac wait until the task's creator chooses to run them outside the sandbox. To start clean, install the runner again as a new Mac user. | Mac runners: checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `runner.mac.still_running` | The runner already on this Mac did not stop, so nothing was changed. Log out of this user and back in, then paste the command again. | Mac runners (Darwin worker) | COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `runner.needs_primary` | This Mac can only run checks for your main runner. Add your main runner first, then open this Mac's link again. | Mac runners (Darwin worker) | COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `runner.mac.no_srt` | The checks sandbox could not be downloaded and installed. Checks will run outside the sandbox and say so. Run the install command again to retry. | Mac runners (Darwin worker) | COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
@@ -5908,6 +5908,13 @@ records remain unchanged.
| `chat.merge.not.sensitive` | it touches %s (%s) | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.merge.not.signing` | it changes signing or version settings | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.merge.not.ships` | merging to %s's main branch ships to users | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `work.checks.waiting_sandbox` | Waiting for the Mac's sandbox | Mac checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `work.decide.sandbox_why` | Checks are waiting for the Mac's sandbox. They run automatically once %s passes its sandbox check, unless the Mac is tainted. | Mac checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `work.decide.sandbox_ask` | Wait, or run them outside the sandbox? | Mac checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `work.decide.unsandboxed` | Run outside the sandbox | Mac checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `work.decide.unsandboxed_warning` | This runs the checks on %s outside the sandbox. They can read anything that account can. The Mac is then marked tainted. | Mac checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `work.decide.unsandboxed_confirm` | Run them outside the sandbox | Mac checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `work.reason.sandbox_unproven` | the Mac's sandbox is not proven yet | Mac checks wait for the sandbox (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.merge.not.ships_unknown` | I don't know yet whether merging to %s's main branch ships to users | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.merge.not.policy` | I ask before every merge in this project | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.merge.not.revert` | it doesn't exactly revert %s | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
diff --git a/internal/equipo/app.go b/internal/equipo/app.go
index 36589fa0..2ef4c27a 100644
--- a/internal/equipo/app.go
+++ b/internal/equipo/app.go
@@ -222,6 +222,7 @@ func RouterWithStore(d *db.DB, cfg Config, mailer mail.Sender, logger *slog.Logg
r.Post("/conversation/tasks/{id}/retry", a.workTaskAction(true))
r.Post("/conversation/tasks/{id}/cancel", a.workTaskAction(false))
r.Post("/conversation/tasks/{id}/recover", a.workTaskRecover)
+ r.Post("/conversation/tasks/{id}/unsandboxed", a.workTaskUnsandboxed)
r.Post("/tasks/{id}/duplicate", a.workDuplicate)
r.Post("/projects/{id}/star", a.workStar)
r.Post("/tasks/{id}/uncombine", a.workUncombine)
diff --git a/internal/equipo/chat/macrecheck.go b/internal/equipo/chat/macrecheck.go
index 86304d72..d7fbed84 100644
--- a/internal/equipo/chat/macrecheck.go
+++ b/internal/equipo/chat/macrecheck.go
@@ -13,7 +13,9 @@ import (
// The checks are placed afresh on that exact candidate through the usual
// placement (nextStep), so a pass merges under the slice 4c policy
// (advance grants it) and a failure takes the fix round. Once per
-// candidate per runner: a reconnect of the same runner runs nothing.
+// candidate per runner: a reconnect of the same runner runs nothing. A
+// Mac whose sandbox is not proven runs nothing again (macsandbox.go);
+// its first hello saying it is proven looks again.
func (t *txn) recheckMac(person, runner string) error {
rs, err := t.runners(person)
if err != nil {
@@ -33,8 +35,9 @@ func (t *txn) recheckMac(person, runner string) error {
relay = true
}
}
- if mac == nil || !relay && runner != primary {
- // Not a Mac, or placement would end on the primary again.
+ if mac == nil || !relay && runner != primary || !mac.sandboxProven() {
+ // Not a Mac, placement would end on the primary again, or the
+ // Mac's sandbox is not proven.
return nil
}
var tasks []taskRecord
diff --git a/internal/equipo/chat/macsandbox.go b/internal/equipo/chat/macsandbox.go
new file mode 100644
index 00000000..b9ea5fca
--- /dev/null
+++ b/internal/equipo/chat/macsandbox.go
@@ -0,0 +1,134 @@
+package chat
+
+import (
+ "context"
+ "encoding/json"
+ "slices"
+ "strconv"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Checks never run outside a Mac's sandbox unless a person chose it.
+// A Mac whose sandbox is not proven (its hello says other than seatbelt:
+// probe P2 did not deny every hostile attempt, or the runner tainted
+// itself) or that the instance holds tainted gets no checks: they wait
+// (wire.PlacementSandbox) and run by themselves once its sandbox is
+// proven. Only the task's creator, through the task's own Run outside
+// the sandbox (a page with a confirm, never a coordinator tool), may
+// choose otherwise, for one attempt on one Mac; the choice is recorded
+// on the step (who and when) and audited. The worker refuses too
+// (sandbox_unproven) when a dispatch carries no such choice.
+
+// sandboxProven reports whether checks may run on r in its sandbox: not
+// a Mac, or a Mac whose hello says seatbelt and that the instance holds
+// untainted.
+func (r runnerInfo) sandboxProven() bool {
+ if !slices.Contains(r.tags(), wire.TagMacOS) {
+ return true
+ }
+ return r.Hello.Sandbox == wire.SandboxSeatbelt && !r.Tainted
+}
+
+// unsandboxedChosen reports whether the task's creator chose to run the
+// step's current attempt on runner outside the sandbox.
+func unsandboxedChosen(s stepRecord, runner string) bool {
+ return s.UnsandboxedBy != "" && s.UnsandboxedAt != nil && s.UnsandboxedAttempt == s.Attempt && s.UnsandboxedRunner == runner && runner != ""
+}
+
+// stepRunnerLabel names where a step's attempt runs, or the Mac it waits
+// for while it waits for that Mac's sandbox.
+func (t *txn) stepRunnerLabel(s stepRecord) string {
+ if s.Placement == wire.PlacementSandbox {
+ return t.runnerLabel(s.SandboxRunner)
+ }
+ return t.runnerLabel(s.RunnerID)
+}
+
+// helloSandbox is the sandbox a stored hello says ("" when none).
+func helloSandbox(raw string) string {
+ var h struct {
+ Sandbox string `json:"sandbox"`
+ }
+ if raw == "" || json.Unmarshal([]byte(raw), &h) != nil {
+ return ""
+ }
+ return h.Sandbox
+}
+
+// sandboxUnproven records a worker's word that its sandbox is not proven
+// (it refused checks, sandbox_unproven): its stored hello no longer says
+// seatbelt, so placement waits until its next hello says so again.
+func (t *txn) sandboxUnproven(runner string) error {
+ var r runnerSessionRecord
+ if err := t.db.Where("runner_id = ?", runner).First(&r).Error; err != nil {
+ return err
+ }
+ if helloSandbox(r.Hello) != wire.SandboxSeatbelt {
+ return nil
+ }
+ var h wire.Hello
+ if err := json.Unmarshal([]byte(r.Hello), &h); err != nil {
+ return err
+ }
+ h.Sandbox = wire.SandboxNone
+ raw, err := json.Marshal(h)
+ if err != nil {
+ return err
+ }
+ return t.db.Model(&runnerSessionRecord{}).Where("runner_id = ?", runner).Update("hello", string(raw)).Error
+}
+
+// RunUnsandboxed is the task creator's choice, from the task's Run
+// outside the sandbox and its confirm, to run the checks waiting for a
+// Mac's sandbox on that Mac outside it: only that step's attempt, only on
+// that Mac, recorded (who and when) and audited in the same write. The
+// Mac is then tainted by the run. Nothing else (no coordinator tool,
+// automatic retry, fix round or housekeeping) ever records it.
+func (s *Store) RunUnsandboxed(ctx context.Context, person, id, stepID string, attempt int64) error {
+ return s.tx(ctx, func(t *txn) error {
+ if err := s.authority.CurrentPerson(ctx, t.db); err != nil {
+ return err
+ }
+ if err := t.hkForbid("unsandboxed"); err != nil {
+ return err
+ }
+ if err := t.isOwner(person); err != nil {
+ return err
+ }
+ k, err := t.loadTask(id)
+ if err != nil {
+ return err
+ }
+ if k.Creator != person {
+ return ErrForbidden
+ }
+ if wire.FinalStage(k.Stage) || k.CancelRequested {
+ return ErrTaskEnded
+ }
+ st, found, err := t.latestStep(k.ID)
+ if err != nil {
+ return err
+ }
+ // Only the attempt the person saw waiting: a choice never carries
+ // to another attempt or another Mac.
+ if !found || st.ID != stepID || st.Attempt != attempt || st.Specialist != wire.SpecialistChecks || st.State != wire.StepQueued || st.Placement != wire.PlacementSandbox || st.SandboxRunner == "" || st.Person != person {
+ return ErrNotRetryable
+ }
+ now := t.now()
+ st.UnsandboxedBy, st.UnsandboxedAt, st.UnsandboxedAttempt, st.UnsandboxedRunner = person, &now, st.Attempt, st.SandboxRunner
+ if s.authority.Audit != nil {
+ if err := s.authority.Audit(t.db, person, "task.checks_unsandboxed", st.ID+"/"+strconv.FormatInt(st.Attempt, 10)+"@"+st.SandboxRunner); err != nil {
+ return err
+ }
+ }
+ since := st.WaitingSince
+ if err := t.dispatchStep(&k, &st); err != nil {
+ return err
+ }
+ if st.Placement != "" {
+ st.WaitingSince = since
+ }
+ return t.saveStep(&st, &k)
+ })
+}
diff --git a/internal/equipo/chat/macsandbox_test.go b/internal/equipo/chat/macsandbox_test.go
new file mode 100644
index 00000000..9930b1a4
--- /dev/null
+++ b/internal/equipo/chat/macsandbox_test.go
@@ -0,0 +1,43 @@
+package chat
+
+import (
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// A person's choice to run outside the sandbox holds for the one attempt
+// on the one Mac it names, and only once recorded with who and when. A
+// Mac's sandbox counts only when its hello says seatbelt and the
+// instance holds it untainted; a runner that is not a Mac is unaffected.
+func TestUnsandboxedChoiceIsPerAttemptAndMac(t *testing.T) {
+ at := time.Now()
+ s := stepRecord{Attempt: 2, UnsandboxedBy: "owner@example.com", UnsandboxedAt: &at, UnsandboxedAttempt: 2, UnsandboxedRunner: "MAC"}
+ if !unsandboxedChosen(s, "MAC") {
+ t.Fatal("the recorded choice does not hold")
+ }
+ if unsandboxedChosen(s, "OTHER") || unsandboxedChosen(s, "") {
+ t.Fatal("a choice carried to another Mac")
+ }
+ next := s
+ next.Attempt = 3
+ if unsandboxedChosen(next, "MAC") {
+ t.Fatal("a choice carried to the next attempt")
+ }
+ unrecorded := s
+ unrecorded.UnsandboxedAt = nil
+ if unsandboxedChosen(unrecorded, "MAC") || unsandboxedChosen(stepRecord{Attempt: 2}, "MAC") {
+ t.Fatal("a choice without who and when")
+ }
+ mac := func(sandbox string, tainted bool) runnerInfo {
+ return runnerInfo{Protocol: wire.Protocol7, Tainted: tainted, Hello: wire.Hello{Sandbox: sandbox, Capabilities: &wire.Capabilities{Tags: []string{wire.TagMacOS, wire.TagXcode}}}}
+ }
+ if !mac(wire.SandboxSeatbelt, false).sandboxProven() || mac(wire.SandboxNone, false).sandboxProven() || mac("", false).sandboxProven() || mac(wire.SandboxSeatbelt, true).sandboxProven() {
+ t.Fatal("a Mac's sandbox judged wrongly")
+ }
+ linux := runnerInfo{Protocol: wire.Protocol7, Hello: wire.Hello{Sandbox: wire.SandboxBubblewrap, Capabilities: &wire.Capabilities{Tags: []string{wire.TagLinux}}}}
+ if !linux.sandboxProven() {
+ t.Fatal("a runner that is not a Mac held back")
+ }
+}
diff --git a/internal/equipo/chat/review.go b/internal/equipo/chat/review.go
index 760fd271..b29550a6 100644
--- a/internal/equipo/chat/review.go
+++ b/internal/equipo/chat/review.go
@@ -101,6 +101,9 @@ func (p progress) needsYou(k taskRecord) string {
if p.last.State == wire.StepFailed && p.last.Reason == "machine_removed" && !p.last.Terminated {
return wire.NeedsMachineRemoved
}
+ if p.last.Specialist == wire.SpecialistChecks && p.last.State == wire.StepQueued && p.last.Placement == wire.PlacementSandbox {
+ return wire.NeedsMacSandbox
+ }
if p.last.Specialist == wire.SpecialistEngineering && p.last.State == wire.StepDone && p.last.Publication == wire.PublicationFailed {
return wire.NeedsRetry
}
diff --git a/internal/equipo/chat/runner.go b/internal/equipo/chat/runner.go
index 6f886197..144c533a 100644
--- a/internal/equipo/chat/runner.go
+++ b/internal/equipo/chat/runner.go
@@ -155,6 +155,8 @@ func (s *Store) Heartbeat(ctx context.Context, l Lease, hello wire.Hello) error
return err
}
online := r.Connected && t.now().Sub(r.SeenAt) < runnerOnline
+ // A Mac whose sandbox is proven now: checks waiting for it run.
+ proven := helloSandbox(r.Hello) != wire.SandboxSeatbelt && helloSandbox(string(raw)) == wire.SandboxSeatbelt
r.Hello, r.SeenAt, r.Connected = string(raw), t.now(), true
if !online {
r.Revision++
@@ -181,6 +183,8 @@ func (s *Store) Heartbeat(ctx context.Context, l Lease, hello wire.Hello) error
if err := t.runnerEvent(l.Runner.Person, r); err != nil {
return err
}
+ }
+ if !online || proven {
if err := t.placeWaiting(l.Runner.Person); err != nil {
return err
}
diff --git a/internal/equipo/chat/runners.go b/internal/equipo/chat/runners.go
index 5cf64a95..e9fb8416 100644
--- a/internal/equipo/chat/runners.go
+++ b/internal/equipo/chat/runners.go
@@ -231,8 +231,10 @@ type runnerInfo struct {
ID, Role, Label string
Seq int64
Online bool
- // Removing: being removed; it gets no new work.
+ // Removing: being removed; it gets no new work. Tainted: the instance
+ // holds that a check ran outside the sandbox on it.
Removing bool
+ Tainted bool
Protocol int
Revision int64
SeenAt time.Time
@@ -261,14 +263,15 @@ func (t *txn) runners(person string) ([]runnerInfo, error) {
ID, Role, Label string
Seq int64
Removing bool
+ Tainted bool
}
- if err := t.db.Raw(`SELECT id, coalesce(role, '') AS role, coalesce(label, '') AS label, rowid AS seq, removing_at IS NOT NULL AS removing FROM runners
+ if err := t.db.Raw(`SELECT id, coalesce(role, '') AS role, coalesce(label, '') AS label, rowid AS seq, removing_at IS NOT NULL AS removing, tainted_at IS NOT NULL AS tainted FROM runners
WHERE person = ? AND revoked_at IS NULL ORDER BY rowid`, person).Scan(&rows).Error; err != nil {
return nil, err
}
out := make([]runnerInfo, 0, len(rows))
for _, r := range rows {
- info := runnerInfo{ID: r.ID, Role: wire.RolePrimary, Label: r.Label, Seq: r.Seq, Removing: r.Removing}
+ info := runnerInfo{ID: r.ID, Role: wire.RolePrimary, Label: r.Label, Seq: r.Seq, Removing: r.Removing, Tainted: r.Tainted}
if r.Role == wire.RoleWorker {
info.Role = wire.RoleWorker
}
@@ -412,13 +415,16 @@ func encodeList(v []string) string {
// fewest steps, ties by enrolment order. A fitting runner that is offline
// leaves the step waiting (placed false). When no runner has ever had the
// tags, or the primary cannot relay a pack (protocol 1), the step goes to
-// the primary without needs and ends honestly there (needs_macos).
+// the primary without needs and ends honestly there (needs_macos). A Mac
+// whose sandbox is not proven gets checks only with the person's choice
+// for this attempt on it (macsandbox.go); when it is the only one online
+// that fits, the step waits for its sandbox (placed false).
func (t *txn) place(k *taskRecord, s *stepRecord) (placed bool, err error) {
primary, err := t.s.authority.PrimaryRunner(t.db, s.Person)
if err != nil {
return false, err
}
- s.Placement, s.WaitingSince = "", nil
+ s.Placement, s.WaitingSince, s.SandboxRunner = "", nil, ""
switch s.Specialist {
case wire.SpecialistEngineering:
s.Needs = ""
@@ -478,9 +484,15 @@ func (t *txn) place(k *taskRecord, s *stepRecord) (placed bool, err error) {
// Nobody can: the primary judges it and says why (needs_macos).
return true, nil
}
- var chosen *runnerInfo
+ var chosen, unproven *runnerInfo
for i := range fit {
r := &fit[i]
+ if !r.sandboxProven() && !unsandboxedChosen(*s, r.ID) {
+ if r.Online && unproven == nil {
+ unproven = r
+ }
+ continue
+ }
switch {
case r.ID == primary:
chosen = r
@@ -495,6 +507,9 @@ func (t *txn) place(k *taskRecord, s *stepRecord) (placed bool, err error) {
if chosen == nil {
now := t.now()
s.RunnerID, s.Placement, s.WaitingSince = "", wire.PlacementWaiting, &now
+ if unproven != nil {
+ s.Placement, s.SandboxRunner = wire.PlacementSandbox, unproven.ID
+ }
return false, nil
}
s.RunnerID = chosen.ID
@@ -587,10 +602,11 @@ func (s *Store) Authorize(ctx context.Context, l Lease, stepID string, attempt i
}
// placeWaiting places the person's steps waiting for a runner, when one
-// that fits may have come online.
+// that fits may have come online, or for a Mac's sandbox, when it may be
+// proven now.
func (t *txn) placeWaiting(person string) error {
var rows []stepRecord
- if err := t.db.Where("person = ? AND placement = ? AND state = ?", person, wire.PlacementWaiting, wire.StepQueued).Order("created_at").Find(&rows).Error; err != nil {
+ if err := t.db.Where("person = ? AND placement IN ? AND state = ?", person, []string{wire.PlacementWaiting, wire.PlacementSandbox}, wire.StepQueued).Order("created_at").Find(&rows).Error; err != nil {
return err
}
for i := range rows {
@@ -602,11 +618,11 @@ func (t *txn) placeWaiting(person string) error {
if wire.FinalStage(k.Stage) || k.CancelRequested {
continue
}
- since := s.WaitingSince
+ since, was, mac := s.WaitingSince, s.Placement, s.SandboxRunner
if err := t.dispatchStep(&k, &s); err != nil {
return err
}
- if s.Placement == wire.PlacementWaiting {
+ if s.Placement == was && s.SandboxRunner == mac {
// Still waiting: the clock does not restart.
s.WaitingSince = since
if err := t.db.Model(&stepRecord{}).Where("id = ?", s.ID).Update("waiting_since", since).Error; err != nil {
@@ -629,7 +645,7 @@ func (t *txn) placeWaiting(person string) error {
func (s *Store) Place(ctx context.Context) error {
return s.tx(ctx, func(t *txn) error {
var persons []string
- if err := t.db.Model(&stepRecord{}).Where("state IN ? AND (placement = ? OR runner_id IN (SELECT id FROM runners WHERE role = ?))", []string{wire.StepQueued, wire.StepRunning}, wire.PlacementWaiting, wire.RoleWorker).Distinct().Pluck("person", &persons).Error; err != nil {
+ if err := t.db.Model(&stepRecord{}).Where("state IN ? AND (placement IN ? OR runner_id IN (SELECT id FROM runners WHERE role = ?))", []string{wire.StepQueued, wire.StepRunning}, []string{wire.PlacementWaiting, wire.PlacementSandbox}, wire.RoleWorker).Distinct().Pluck("person", &persons).Error; err != nil {
return err
}
for _, p := range persons {
@@ -664,7 +680,9 @@ func (t *txn) offline(person string) error {
if err != nil {
return err
}
- if wire.FinalStage(k.Stage) || k.CancelRequested || s.Withdrawn {
+ if wire.FinalStage(k.Stage) || k.CancelRequested || s.Withdrawn || s.Placement == wire.PlacementSandbox {
+ // Waiting for a Mac's sandbox is not a runner offline: it waits
+ // until the sandbox is proven or the person chooses.
continue
}
if s.Placement == wire.PlacementWaiting {
diff --git a/internal/equipo/chat/tasks.go b/internal/equipo/chat/tasks.go
index 17cd2316..a5faf876 100644
--- a/internal/equipo/chat/tasks.go
+++ b/internal/equipo/chat/tasks.go
@@ -190,6 +190,16 @@ type stepRecord struct {
// HostedCI is the binding of a checks verdict taken from the hub's
// hosted CI (wire.HostedResult JSON; ChecksSandbox is then hosted).
HostedCI string
+ // SandboxRunner is the Mac checks wait for while Placement is
+ // waiting_sandbox. Unsandboxed*: the task creator's choice (who and
+ // when) to run attempt UnsandboxedAttempt on UnsandboxedRunner
+ // outside the sandbox (macsandbox.go); it holds for that attempt on
+ // that Mac only.
+ SandboxRunner string
+ UnsandboxedBy string
+ UnsandboxedAt *time.Time
+ UnsandboxedAttempt int64
+ UnsandboxedRunner string
}
func (stepRecord) TableName() string { return "chat_steps" }
@@ -398,7 +408,7 @@ func (t *txn) taskView(k taskRecord) (wire.Task, error) {
}
for _, s := range steps {
sv := stepViewSwitched(s)
- sv.RunnerLabel = t.runnerLabel(s.RunnerID)
+ sv.RunnerLabel = t.stepRunnerLabel(s)
v.Steps = append(v.Steps, sv)
if s.Pushed {
v.URL = BranchURL(p.Repo, k.Branch)
@@ -503,7 +513,7 @@ func (t *txn) saveStep(s *stepRecord, k *taskRecord) error {
}
s.Revision++
s.UpdatedAt = t.now()
- if err := t.db.Model(&stepRecord{}).Where("id = ?", s.ID).Select("state", "reason", "attempt", "base_sha", "candidate_sha", "pushed", "terminated", "summary", "log_tail", "started_at", "finished_at", "revision", "updated_at", "headline", "family", "account", "verdict", "review_label", "findings", "checks", "gate", "exit_code", "output", "republish", "from_attempt", "askable", "rebase", "from_base", "from_candidate", "merge_sha", "merge_into", "merge_strategy", "without_checks", "switched", "activity", "runner_id", "needs", "placement", "waiting_since", "refused_by", "withdrawn", "termination_kind", "publication", "publication_id", "apple", "checks_sandbox", "change_facts", "decided_by", "merge_source", "merge_parents", "hosted_ci").Updates(s).Error; err != nil {
+ if err := t.db.Model(&stepRecord{}).Where("id = ?", s.ID).Select("state", "reason", "attempt", "base_sha", "candidate_sha", "pushed", "terminated", "summary", "log_tail", "started_at", "finished_at", "revision", "updated_at", "headline", "family", "account", "verdict", "review_label", "findings", "checks", "gate", "exit_code", "output", "republish", "from_attempt", "askable", "rebase", "from_base", "from_candidate", "merge_sha", "merge_into", "merge_strategy", "without_checks", "switched", "activity", "runner_id", "needs", "placement", "waiting_since", "refused_by", "withdrawn", "termination_kind", "publication", "publication_id", "apple", "checks_sandbox", "change_facts", "decided_by", "merge_source", "merge_parents", "hosted_ci", "sandbox_runner", "unsandboxed_by", "unsandboxed_at", "unsandboxed_attempt", "unsandboxed_runner").Updates(s).Error; err != nil {
return err
}
members, err := t.members()
@@ -512,7 +522,7 @@ func (t *txn) saveStep(s *stepRecord, k *taskRecord) error {
}
for _, m := range members {
sv := stepViewSwitched(*s)
- sv.RunnerLabel = t.runnerLabel(s.RunnerID)
+ sv.RunnerLabel = t.stepRunnerLabel(*s)
if err := t.event(m, wire.EventStep, "step", s.ID, s.Revision, "", "", s.Attempt, sv); err != nil {
return err
}
@@ -799,6 +809,9 @@ func (t *txn) dispatchStep(k *taskRecord, s *stepRecord) error {
return err
}
cmd.RunnerID = s.RunnerID
+ // The person's recorded choice to run this attempt on this Mac
+ // outside the sandbox (protocol 7; Encode drops it for older peers).
+ cmd.Unsandboxed = s.Specialist == wire.SpecialistChecks && unsandboxedChosen(*s, s.RunnerID)
// The primary may take the hub's hosted CI verdict for checks (a
// protocol 5 runner; Encode drops the offer for older ones).
cmd.HostedChecks = s.Specialist == wire.SpecialistChecks && s.RunnerID == primary
@@ -969,6 +982,17 @@ func (t *txn) stepReport(l Lease, v *wire.StepReport) error {
return err
}
return t.saveStep(&s, &k)
+ case v.State == wire.StepFailed && v.Reason == wire.ReasonSandboxUnproven && s.Specialist == wire.SpecialistChecks && role == wire.RoleWorker:
+ // The Mac ran nothing: its sandbox is not proven and nobody
+ // chose to run outside it. Never a failure and no taint: the
+ // next attempt waits for its sandbox.
+ if err := t.sandboxUnproven(l.Runner.RunnerID); err != nil {
+ return err
+ }
+ if err := t.replace(&k, &s); err != nil {
+ return err
+ }
+ return t.saveStep(&s, &k)
}
}
now := t.now()
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index cef04a86..700a994e 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -626,6 +626,7 @@ var pageCopy = map[string]string{
"work.reason.withdrawn": "it was withdrawn before it started", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.reason.transfer_refused": "the work could not move between runners", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.reason.runner_offline": "the runner it needs was offline too long", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.reason.sandbox_unproven": "the Mac's sandbox is not proven yet", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.reason.unknown": "the runner reported a problem this version of Equipo does not recognise", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.pushed": "Pushed %s at %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"work.open": "Open on Amadan", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
@@ -1194,6 +1195,12 @@ var pageCopy = map[string]string{
"work.decide.mac.merge": "Merge now", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.decide.mac.wait": "Wait for a Mac", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.decide.mac_set_up": "Set up a Mac", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.checks.waiting_sandbox": "Waiting for the Mac's sandbox", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.decide.sandbox_why": "Checks are waiting for the Mac's sandbox. They run automatically once %s passes its sandbox check, unless the Mac is tainted.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.decide.sandbox_ask": "Wait, or run them outside the sandbox?", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.decide.unsandboxed": "Run outside the sandbox", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.decide.unsandboxed_warning": "This runs the checks on %s outside the sandbox. They can read anything that account can. The Mac is then marked tainted.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.decide.unsandboxed_confirm": "Run them outside the sandbox", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.ask_about": "Ask about this", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.ask_about.draft": "About “%s”: ", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"work.recent.noted": "noted", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
@@ -1411,8 +1418,8 @@ var pageCopy = map[string]string{
"conversation.routed": "Reply added to the task thread.",
// COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"runner.title": "Machines",
- // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "runner.tainted": "A check has run outside the sandbox on this Mac, so its checks are always labelled that way from now on. To start clean, install the runner again as a new Mac user.",
+ // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "runner.tainted": "A check has run outside the sandbox on this Mac, so Equipo no longer trusts its sandbox. Checks on this Mac wait until the task's creator chooses to run them outside the sandbox. To start clean, install the runner again as a new Mac user.",
// COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"runner.needs_primary": "This Mac can only run checks for your main runner. Add your main runner first, then open this Mac's link again.",
// COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
diff --git a/internal/equipo/migrations/0064_thin_checks_sandbox_consent.sql b/internal/equipo/migrations/0064_thin_checks_sandbox_consent.sql
new file mode 100644
index 00000000..0a2fdcdd
--- /dev/null
+++ b/internal/equipo/migrations/0064_thin_checks_sandbox_consent.sql
@@ -0,0 +1,5 @@
+ALTER TABLE chat_steps ADD COLUMN sandbox_runner text;
+ALTER TABLE chat_steps ADD COLUMN unsandboxed_by text;
+ALTER TABLE chat_steps ADD COLUMN unsandboxed_at datetime;
+ALTER TABLE chat_steps ADD COLUMN unsandboxed_attempt integer;
+ALTER TABLE chat_steps ADD COLUMN unsandboxed_runner text;
diff --git a/internal/equipo/migrations/schema.sql b/internal/equipo/migrations/schema.sql
index 877f63cb..55ae3e23 100644
--- a/internal/equipo/migrations/schema.sql
+++ b/internal/equipo/migrations/schema.sql
@@ -598,7 +598,7 @@ CREATE INDEX chat_card_task ON chat_cards(task_id);
CREATE TABLE chat_project_attachments (project_id text, kind text, ref text, name text, created_at datetime, PRIMARY KEY (project_id, kind, ref));
CREATE TABLE chat_tasks (id text PRIMARY KEY, project_id text, title text, brief text, stage text, branch text, base_sha text, creator text, turn_id text, cancel_requested numeric, revision integer, created_at datetime, updated_at datetime, watching text, moved_from text, branch_head text, merge_asked text, merged_sha text, merged_into text, merge_strategy text, merged_without_checks numeric, merged_at datetime, ready_sha text, merge_eligible text, done_at datetime, duplicate_of text, folded_into text, folded_stage text, folded_at datetime, engineering_runner text, merge_hold text, merge_verified numeric, revert_of text, revert_sha text);
CREATE INDEX chat_task_project ON chat_tasks(project_id);
-CREATE TABLE chat_steps (id text PRIMARY KEY, task_id text, idx integer, specialist text, person text, state text, reason text, attempt integer, base_sha text, candidate_sha text, pushed numeric, terminated numeric, summary text, log_tail text, started_at datetime, finished_at datetime, revision integer, created_at datetime, updated_at datetime, round integer, family text, account text, verdict text, review_label text, findings text, checks text, gate text, exit_code integer, output text, republish numeric, from_attempt integer, askable numeric, rebase numeric, from_base text, from_candidate text, merge_sha text, merge_into text, merge_strategy text, without_checks numeric, activity text, switched text, headline text, runner_id text, needs text, placement text, waiting_since datetime, refused_by text, withdrawn numeric, termination_kind text, publication text, publication_id text, apple numeric, checks_sandbox text, recheck_by text, change_facts text, decided_by text, merge_source text, merge_parents text, hosted_ci text);
+CREATE TABLE chat_steps (id text PRIMARY KEY, task_id text, idx integer, specialist text, person text, state text, reason text, attempt integer, base_sha text, candidate_sha text, pushed numeric, terminated numeric, summary text, log_tail text, started_at datetime, finished_at datetime, revision integer, created_at datetime, updated_at datetime, round integer, family text, account text, verdict text, review_label text, findings text, checks text, gate text, exit_code integer, output text, republish numeric, from_attempt integer, askable numeric, rebase numeric, from_base text, from_candidate text, merge_sha text, merge_into text, merge_strategy text, without_checks numeric, activity text, switched text, headline text, runner_id text, needs text, placement text, waiting_since datetime, refused_by text, withdrawn numeric, termination_kind text, publication text, publication_id text, apple numeric, checks_sandbox text, recheck_by text, change_facts text, decided_by text, merge_source text, merge_parents text, hosted_ci text, sandbox_runner text, unsandboxed_by text, unsandboxed_at datetime, unsandboxed_attempt integer, unsandboxed_runner text);
CREATE INDEX chat_step_task ON chat_steps(task_id);
CREATE TABLE chat_task_entries (id text PRIMARY KEY, task_id text, idempotency_key text, kind text, author text, text text, repo text, path text, line integer, created_at datetime, headline text, folded_from text);
CREATE INDEX chat_entry_task ON chat_task_entries(task_id);
diff --git a/internal/equipo/templates/work_parts.html b/internal/equipo/templates/work_parts.html
index 98d7776e..bd2ca467 100644
--- a/internal/equipo/templates/work_parts.html
+++ b/internal/equipo/templates/work_parts.html
@@ -30,7 +30,7 @@
{{if $.Head}}{{template "mono" $t.Mono}}<div equipo-d-title><a href="/tasks/{{$t.ID}}">{{$t.Title}}</a><span equipo-quiet>{{$t.Project}} · {{template "source" $t}}</span></div>{{end}}
<p equipo-d-why>{{.Why}}</p>
<p equipo-d-ask>{{.Ask}}</p>
-<div equipo-d-actions>{{with .Card}}<form method="post" action="/conversation/cards/{{.ID}}/answer"><input type="hidden" name="revision" value="{{.Revision}}"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="task" value="{{$t.ID}}">{{range $.Task.Decision.Choices}}<button equipo-btn{{if .Primary}} data-primary{{end}} type="submit" name="choice" value="{{.Value}}" data-merge-choice="{{.Value}}">{{.Label}}</button>{{end}}</form>{{end}}{{if .Fold}}<form method="post" action="/tasks/{{$t.ID}}/duplicate"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="of" value="{{$t.Dup.ID}}"><button equipo-btn data-primary type="submit" data-task-duplicate>{{copy "work.decide.fold"}}</button></form>{{end}}{{if .Recover}}<form method="post" action="/conversation/tasks/{{$t.ID}}/recover"><input type="hidden" name="from" value="{{$.From}}"><button equipo-btn data-primary type="submit" data-task-recover>{{copy "work.recover"}}</button></form>{{end}}{{if .Retry}}<form method="post" action="/conversation/tasks/{{$t.ID}}/retry"><input type="hidden" name="from" value="{{$.From}}"><button {{if .Fold}}equipo-link{{else}}equipo-btn data-primary{{end}} type="submit" data-task-retry>{{copy "work.retry"}}</button></form>{{end}}{{if .Talk}}<a equipo-btn href="/conversation">{{copy "work.decide.talk"}}</a>{{end}}{{if .Cancel}}<form method="post" action="/conversation/tasks/{{$t.ID}}/cancel"><input type="hidden" name="from" value="{{$.From}}"><button equipo-link type="submit" data-task-cancel>{{copy "work.decide.cancel"}}</button></form>{{end}}{{with .Hint}}<span equipo-quiet>{{.}}</span>{{end}}<span equipo-d-quiet>{{if .Mac}}<a equipo-link href="/conversation/settings/machines/add" data-set-up-mac>{{copy "work.decide.mac_set_up"}}</a>{{end}}<a equipo-link href="/conversation?about={{$t.ID}}" data-ask-about>{{copy "work.ask_about"}}</a></span></div>
+<div equipo-d-actions>{{with .Card}}<form method="post" action="/conversation/cards/{{.ID}}/answer"><input type="hidden" name="revision" value="{{.Revision}}"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="task" value="{{$t.ID}}">{{range $.Task.Decision.Choices}}<button equipo-btn{{if .Primary}} data-primary{{end}} type="submit" name="choice" value="{{.Value}}" data-merge-choice="{{.Value}}">{{.Label}}</button>{{end}}</form>{{end}}{{if .Fold}}<form method="post" action="/tasks/{{$t.ID}}/duplicate"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="of" value="{{$t.Dup.ID}}"><button equipo-btn data-primary type="submit" data-task-duplicate>{{copy "work.decide.fold"}}</button></form>{{end}}{{if .Recover}}<form method="post" action="/conversation/tasks/{{$t.ID}}/recover"><input type="hidden" name="from" value="{{$.From}}"><button equipo-btn data-primary type="submit" data-task-recover>{{copy "work.recover"}}</button></form>{{end}}{{with .Unsandboxed}}<details equipo-mach-confirm data-unsandboxed><summary equipo-btn>{{copy "work.decide.unsandboxed"}}</summary><div><p>{{.Warning}}</p><form method="post" action="/conversation/tasks/{{$t.ID}}/unsandboxed"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="step" value="{{.Step}}"><input type="hidden" name="attempt" value="{{.Attempt}}"><button equipo-btn data-danger type="submit" data-task-unsandboxed>{{copy "work.decide.unsandboxed_confirm"}}</button></form></div></details>{{end}}{{if .Retry}}<form method="post" action="/conversation/tasks/{{$t.ID}}/retry"><input type="hidden" name="from" value="{{$.From}}"><button {{if .Fold}}equipo-link{{else}}equipo-btn data-primary{{end}} type="submit" data-task-retry>{{copy "work.retry"}}</button></form>{{end}}{{if .Talk}}<a equipo-btn href="/conversation">{{copy "work.decide.talk"}}</a>{{end}}{{if .Cancel}}<form method="post" action="/conversation/tasks/{{$t.ID}}/cancel"><input type="hidden" name="from" value="{{$.From}}"><button equipo-link type="submit" data-task-cancel>{{copy "work.decide.cancel"}}</button></form>{{end}}{{with .Hint}}<span equipo-quiet>{{.}}</span>{{end}}<span equipo-d-quiet>{{if .Mac}}<a equipo-link href="/conversation/settings/machines/add" data-set-up-mac>{{copy "work.decide.mac_set_up"}}</a>{{end}}<a equipo-link href="/conversation?about={{$t.ID}}" data-ask-about>{{copy "work.ask_about"}}</a></span></div>
</div>{{end}}{{end}}
{{define "star-toggle"}}{{$p := .P}}<form method="post" action="/projects/{{$p.ID}}/star" equipo-star-form><input type="hidden" name="starred" value="{{if $p.Star.On}}0{{else}}1{{end}}"><input type="hidden" name="from" value="{{.From}}"><button type="submit" equipo-star{{if $p.Star.On}} aria-pressed="true"{{if $p.Star.Auto}} data-auto{{end}}{{else}} aria-pressed="false"{{end}} aria-label="{{$p.Star.Label}}" title="{{$p.Star.Who}}" data-star-toggle>{{icon "star"}}</button></form>{{end}}
{{define "project-facts"}}{{with .StackLine}}<span>{{if $.PhoneStack}}{{icon "phone"}}{{else}}{{icon "code"}}{{end}}{{.}}</span>{{end}}{{with .Repos}}<span data-repos>{{icon "git"}}{{if eq (len .) 1}}{{copy "work.project.one_repo"}}{{else}}{{printf (copy "work.project.repos") (len .)}}{{end}}</span>{{end}}{{with .ChecksLine}}<span data-tone="{{if $.Checks.Here}}positive{{else}}warning{{end}}" data-checks-fact>{{if $.Checks.Here}}{{icon "check-circle"}}{{else}}{{icon "help-circle"}}{{end}}{{.}}</span>{{end}}{{end}}
diff --git a/internal/equipo/work_pages.go b/internal/equipo/work_pages.go
index 08bc0626..f27add42 100644
--- a/internal/equipo/work_pages.go
+++ b/internal/equipo/work_pages.go
@@ -7,6 +7,7 @@ import (
"net/http"
"regexp"
"slices"
+ "strconv"
"strings"
"time"
@@ -167,6 +168,9 @@ func taskLineOf(t wire.Task, viewer string) taskLine {
switch s.Specialist {
case wire.SpecialistChecks:
v.ChecksLine = copyText("work.checks.running")
+ if s.Placement == wire.PlacementSandbox {
+ v.ChecksLine = copyText("work.checks.waiting_sandbox")
+ }
case wire.SpecialistReview:
v.ReviewLine = copyText("work.review.running")
}
@@ -190,6 +194,8 @@ func taskLineOf(t wire.Task, viewer string) taskLine {
switch t.NeedsYou {
case wire.NeedsFixRounds, wire.NeedsReviewBlocked, wire.NeedsMergeConflict:
v.StageLine = copyText("work.needs." + t.NeedsYou)
+ case wire.NeedsMacSandbox:
+ v.StageLine = copyText("work.checks.waiting_sandbox")
case wire.NeedsBranchMoved:
// What was checked and reviewed is not what the branch holds now:
// none of it is shown beside the branch's link.
@@ -652,6 +658,22 @@ func (a *application) workTaskRecover(w http.ResponseWriter, r *http.Request) {
})
}
+// workTaskUnsandboxed is the confirm of Run outside the sandbox: the
+// task's creator chooses to run the checks waiting for a Mac's sandbox
+// on that Mac outside it, for the attempt the page showed (step and
+// attempt); a session's own action, never a device's or a tool's.
+func (a *application) workTaskUnsandboxed(w http.ResponseWriter, r *http.Request) {
+ id := chi.URLParam(r, "id")
+ step := r.PostFormValue("step")
+ attempt, perr := strconv.ParseInt(r.PostFormValue("attempt"), 10, 64)
+ a.chatActionTo(w, r, workBack(r, id), func(ctx context.Context, address string) error {
+ if perr != nil || step == "" || attempt < 1 {
+ return chat.ErrInvalid
+ }
+ return a.store.Chat().RunUnsandboxed(ctx, address, id, step, attempt)
+ })
+}
+
func (a *application) workTaskAction(retry bool) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
id := chi.URLParam(r, "id")
diff --git a/internal/equipo/work_views.go b/internal/equipo/work_views.go
index 087b0f83..f0adb64f 100644
--- a/internal/equipo/work_views.go
+++ b/internal/equipo/work_views.go
@@ -100,6 +100,18 @@ type decisionView struct {
Recover bool
// Mac: checks wait for a Mac; the card links setting one up.
Mac bool
+ // Unsandboxed offers the creator Run outside the sandbox, behind a
+ // confirm with its warning, for checks waiting for a Mac's sandbox.
+ Unsandboxed *unsandboxedOffer
+}
+
+// unsandboxedOffer is Run outside the sandbox for one attempt of a
+// checks step waiting for the Mac's sandbox, and the warning its confirm
+// shows.
+type unsandboxedOffer struct {
+ Step string
+ Attempt int64
+ Warning string
}
// waitsForMac: approved and ready, with checks that could not run
@@ -142,7 +154,7 @@ func needsViewer(t wire.Task, viewer string, card *wire.Card) bool {
return false
}
switch t.NeedsYou {
- case wire.NeedsRetry, wire.NeedsReviewBlocked, wire.NeedsFixRounds, wire.NeedsBranchMoved, wire.NeedsMergeConflict, wire.NeedsMachineRemoved:
+ case wire.NeedsRetry, wire.NeedsReviewBlocked, wire.NeedsFixRounds, wire.NeedsBranchMoved, wire.NeedsMergeConflict, wire.NeedsMachineRemoved, wire.NeedsMacSandbox:
return true
case wire.NeedsMerge:
return card != nil
@@ -153,7 +165,7 @@ func needsViewer(t wire.Task, viewer string, card *wire.Card) bool {
// needsSomeone is the same for any creator, for "Waiting for Nora".
func needsSomeone(t wire.Task) bool {
switch t.NeedsYou {
- case wire.NeedsRetry, wire.NeedsReviewBlocked, wire.NeedsFixRounds, wire.NeedsBranchMoved, wire.NeedsMergeConflict, wire.NeedsMachineRemoved:
+ case wire.NeedsRetry, wire.NeedsReviewBlocked, wire.NeedsFixRounds, wire.NeedsBranchMoved, wire.NeedsMergeConflict, wire.NeedsMachineRemoved, wire.NeedsMacSandbox:
return !wire.FinalStage(t.Stage)
}
return false
@@ -522,6 +534,14 @@ func decisionOf(t wire.Task, v taskLine) *decisionView {
d.Tone, d.Why, d.Ask, d.Talk, d.Cancel = "attention", copyText("work.decide.conflict_why"), copyText("work.decide.talk_ask"), true, v.Cancel
case wire.NeedsMachineRemoved:
d.Tone, d.Why, d.Recover, d.Cancel = "attention", copyText("work.needs.machine_removed"), v.Recover, v.Cancel
+ case wire.NeedsMacSandbox:
+ // Not a failure: the checks wait, and run by themselves once the
+ // Mac's sandbox is proven. Only the creator may choose otherwise.
+ s := t.Steps[len(t.Steps)-1]
+ d.Why, d.Ask, d.Cancel = fmt.Sprintf(copyText("work.decide.sandbox_why"), s.RunnerLabel), copyText("work.decide.sandbox_ask"), v.Cancel
+ if v.Mine && s.RunnerLabel != "" {
+ d.Unsandboxed = &unsandboxedOffer{Step: s.ID, Attempt: s.Attempt, Warning: fmt.Sprintf(copyText("work.decide.unsandboxed_warning"), s.RunnerLabel)}
+ }
}
return d
}
@@ -563,6 +583,8 @@ func summaryOf(t wire.Task, v taskLine) string {
return copyText("work.summary.ready")
case t.Stage == wire.StageReadyToMerge:
return copyText("work.summary.ready_waiting")
+ case t.NeedsYou == wire.NeedsMacSandbox:
+ return copyText("work.checks.waiting_sandbox") + "."
case needsSomeone(t):
return fmt.Sprintf(copyText("work.summary.needs"), v.StageLine, waiter)
case t.Coordinator != nil:
diff --git a/internal/runner/thin/link.go b/internal/runner/thin/link.go
index 3e400f64..448ef079 100644
--- a/internal/runner/thin/link.go
+++ b/internal/runner/thin/link.go
@@ -672,6 +672,11 @@ func (l *Link) read(ctx context.Context, c *websocket.Conn) (time.Duration, erro
}
l.Engine.Wake(v.Person)
case *wire.DispatchCommand:
+ if proto, _ := l.Spoken(); proto < wire.ProtocolSandboxConsent {
+ // An older instance never carries the person's choice to run
+ // outside the sandbox: its dispatch is no consent.
+ v.Unsandboxed = false
+ }
if err = l.State.AcceptDispatch(ctx, f.ID, *v); err != nil {
return 0, err
}
diff --git a/internal/runner/thin/mac.go b/internal/runner/thin/mac.go
index 9dd25d4b..a1e81c74 100644
--- a/internal/runner/thin/mac.go
+++ b/internal/runner/thin/mac.go
@@ -71,16 +71,44 @@ func (m *macChecks) pick() *mac.Gate {
func (m *macChecks) Sandbox() string { return m.pick().Sandbox }
-// Run taints the runner before a check runs outside the sandbox: what
-// it runs could change anything this user may.
+// Run runs a check outside the sandbox (bare, or srt unproven) only when
+// the person chose that for this attempt (unsandboxedChosen); otherwise
+// it runs nothing, taints nothing and says sandbox_unproven, which the
+// instance turns back into waiting for the Mac's sandbox. It taints the
+// runner before a check runs outside the sandbox: what it runs could
+// change anything this user may.
func (m *macChecks) Run(ctx context.Context, attempt, dir string, argv []string, limit time.Duration, record func(string) error) gateResult {
g := m.pick()
if g.Sandbox != wire.SandboxSeatbelt {
+ if !unsandboxedChosen(ctx) {
+ return gateResult{reason: wire.ReasonSandboxUnproven, terminated: true, sandbox: g.Sandbox}
+ }
m.taint.Set()
}
return macGate{g}.Run(ctx, attempt, dir, argv, limit, record)
}
+// unsandboxedKey carries an attempt's recorded choice to run outside the
+// sandbox from its dispatch (DispatchCommand.Unsandboxed, protocol 7) to
+// the gate that runs it.
+type unsandboxedKey struct{}
+
+// withUnsandboxed is ctx for an attempt whose dispatch carried the
+// person's choice to run outside the sandbox (chosen).
+func withUnsandboxed(ctx context.Context, chosen bool) context.Context {
+ if !chosen {
+ return ctx
+ }
+ return context.WithValue(ctx, unsandboxedKey{}, true)
+}
+
+// unsandboxedChosen reports whether the person chose to run this attempt
+// outside the sandbox.
+func unsandboxedChosen(ctx context.Context) bool {
+ chosen, _ := ctx.Value(unsandboxedKey{}).(bool)
+ return chosen
+}
+
// Verify settles a recorded attempt the same way whatever confined it.
func (m *macChecks) Verify(id string) bool { return m.bare.Verify(id) }
diff --git a/internal/runner/thin/mac_test.go b/internal/runner/thin/mac_test.go
index 2ed0fded..8d808329 100644
--- a/internal/runner/thin/mac_test.go
+++ b/internal/runner/thin/mac_test.go
@@ -389,8 +389,9 @@ func TestMacTaintIsSticky(t *testing.T) {
if err := os.MkdirAll(tree, 0700); err != nil {
t.Fatal(err)
}
- // No report yet: the check runs outside the sandbox, which taints.
- if res := m.Run(context.Background(), "checks-t-1", tree, []string{"/bin/true"}, time.Minute, func(string) error { return nil }); res.sandbox != wire.SandboxNone || !m.taint.Tainted() {
+ // No report yet: the check the person chose to run outside the
+ // sandbox runs there, which taints.
+ if res := m.Run(withUnsandboxed(context.Background(), true), "checks-t-1", tree, []string{"/bin/true"}, time.Minute, func(string) error { return nil }); res.sandbox != wire.SandboxNone || !m.taint.Tainted() {
t.Fatalf("%+v tainted=%v", res, m.taint.Tainted())
}
if _, err := os.Stat(file); err != nil {
diff --git a/internal/runner/thin/sandbox_consent_test.go b/internal/runner/thin/sandbox_consent_test.go
new file mode 100644
index 00000000..e181a39e
--- /dev/null
+++ b/internal/runner/thin/sandbox_consent_test.go
@@ -0,0 +1,130 @@
+package thin
+
+import (
+ "context"
+ "encoding/json"
+ "os"
+ "path/filepath"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/runner/mac"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// A Mac whose sandbox is not proven runs nothing outside it unless the
+// dispatch carries the person's choice: no report (bare) or a report
+// whose P2 failed (srt, unproven) refuses with sandbox_unproven, runs
+// nothing and taints nothing. With the choice it runs bare and taints.
+func TestMacChecksRefuseUnprovenWithoutConsent(t *testing.T) {
+ tree := filepath.Join(t.TempDir(), "tree")
+ if err := os.MkdirAll(tree, 0700); err != nil {
+ t.Fatal(err)
+ }
+ newChecks := func(t *testing.T, probes *macProbes) *macChecks {
+ return &macChecks{probes: probes, taint: loadTaint(filepath.Join(t.TempDir(), "tainted")), srt: "/x/srt", sandboxed: &mac.Gate{Sandbox: wire.SandboxSeatbelt}, unproven: &mac.Gate{SRT: "/x/srt", Sandbox: wire.SandboxNone}, bare: &mac.Gate{Sandbox: wire.SandboxNone, Env: []string{"PATH=/usr/bin:/bin"}}}
+ }
+ run := func(ctx context.Context, m *macChecks) (gateResult, int) {
+ recorded := 0
+ res := m.Run(ctx, "checks-t-1", tree, []string{"/bin/true"}, time.Minute, func(string) error { recorded++; return nil })
+ return res, recorded
+ }
+
+ // No report yet: the bare gate.
+ bare := newChecks(t, newProbeRig(t).p)
+ if bare.pick() != bare.bare {
+ t.Fatal("rig: not bare")
+ }
+ res, recorded := run(context.Background(), bare)
+ if res.reason != wire.ReasonSandboxUnproven || !res.terminated || recorded != 0 || bare.taint.Tainted() {
+ t.Fatalf("bare without consent: %+v recorded %d tainted %v", res, recorded, bare.taint.Tainted())
+ }
+
+ // P2 failed but the fixture built under srt: unproven, still refused.
+ x := newProbeRig(t)
+ x.verdict = wire.ProbeFailed
+ x.started(t)
+ unproven := newChecks(t, x.p)
+ if unproven.pick() != unproven.unproven {
+ t.Fatal("rig: not unproven")
+ }
+ res, recorded = run(context.Background(), unproven)
+ if res.reason != wire.ReasonSandboxUnproven || recorded != 0 || unproven.taint.Tainted() {
+ t.Fatalf("unproven without consent: %+v recorded %d tainted %v", res, recorded, unproven.taint.Tainted())
+ }
+
+ // The person chose it for this attempt: it runs bare and taints.
+ res, recorded = run(withUnsandboxed(context.Background(), true), bare)
+ if res.reason != "" || res.sandbox != wire.SandboxNone || recorded == 0 || !bare.taint.Tainted() {
+ t.Fatalf("bare with consent: %+v recorded %d tainted %v", res, recorded, bare.taint.Tainted())
+ }
+ if withUnsandboxed(context.Background(), false) != context.Background() || unsandboxedChosen(context.Background()) {
+ t.Fatal("no choice carried as one")
+ }
+}
+
+// consentGate is a gate that records whether each run carried the
+// person's choice, and refuses like an unproven Mac without it.
+type consentGate struct {
+ stubGate
+ chosen []bool
+}
+
+func (g *consentGate) Run(ctx context.Context, a, dir string, argv []string, l time.Duration, record func(string) error) gateResult {
+ g.chosen = append(g.chosen, unsandboxedChosen(ctx))
+ if !unsandboxedChosen(ctx) {
+ return gateResult{reason: wire.ReasonSandboxUnproven, terminated: true, sandbox: wire.SandboxNone}
+ }
+ return g.stubGate.Run(ctx, a, dir, argv, l, record)
+}
+
+// The worker carries the dispatch's choice to the gate, and a refusal is
+// its own report: failed sandbox_unproven, terminated, with no checks
+// outcome, so the instance puts the step back to wait.
+func TestWorkerCarriesSandboxConsent(t *testing.T) {
+ x := newWorkerRig(t)
+ g := &consentGate{stubGate: stubGate{sandbox: wire.SandboxNone}}
+ x.w.Gate = g
+ x.chunk(t, "c1", x.header(), x.pack, 0, 1, "")
+ rep := x.run()
+ if rep.State != wire.StepFailed || rep.Reason != wire.ReasonSandboxUnproven || !rep.Termination || rep.Checks != "" || rep.ExitCode != nil || len(g.chosen) != 1 || g.chosen[0] {
+ t.Fatalf("refused attempt %+v chosen %v", rep, g.chosen)
+ }
+ x.r.Attempt, x.r.Unsandboxed = 2, true
+ h := x.header()
+ h.ID = "tr_2"
+ x.chunk(t, "c2", h, x.pack, 0, 1, "")
+ rep = x.run()
+ if rep.State != wire.StepDone || rep.Checks != wire.ChecksPassed || rep.ChecksSandbox != wire.SandboxNone || len(g.chosen) != 2 || !g.chosen[1] {
+ t.Fatalf("chosen attempt %+v chosen %v", rep, g.chosen)
+ }
+}
+
+// Mixed versions: a dispatch on a connection below protocol 7 is never
+// consent, whatever it carries; at protocol 7 the choice is kept.
+func TestOlderProtocolDispatchIsNoConsent(t *testing.T) {
+ for _, protocol := range []int{wire.ProtocolEmptyRepos, wire.ProtocolSandboxConsent} {
+ inst := newFakeInstance(t)
+ _, state, _, _ := startLink(t, inst.url, &stubCoordinator{})
+ c := <-inst.conns
+ read(t, c, wire.FrameHello)
+ welcome, _ := json.Marshal(wire.Frame{ID: "w-1", Type: wire.FrameWelcome, Data: json.RawMessage(`{"generation":3,"runner_id":"RUNNER1","protocol":` + itoa(int64(protocol)) + `,"role":"primary"}`)})
+ write(t, c, welcome)
+ read(t, c, wire.FrameSync)
+ d := wire.DispatchCommand{Person: "owner@example.com", TaskID: "tk1", StepID: "s1", Attempt: 1, Specialist: wire.SpecialistChecks, Repo: "amadan.net/oficina/sample", Branch: "equipo/tk1", Findings: []wire.Finding{}, Unsandboxed: true}
+ f, err := wire.NewFrame("c9", wire.FrameDispatch, d)
+ if err != nil {
+ t.Fatal(err)
+ }
+ raw, _ := json.Marshal(f)
+ write(t, c, raw)
+ read(t, c, wire.FrameAck)
+ r, ok, err := state.nextStep(context.Background())
+ if err != nil || !ok {
+ t.Fatalf("protocol %d: dispatch not kept: %v", protocol, err)
+ }
+ if want := protocol >= wire.ProtocolSandboxConsent; r.Unsandboxed != want {
+ t.Fatalf("protocol %d: consent %v, want %v", protocol, r.Unsandboxed, want)
+ }
+ }
+}
diff --git a/internal/runner/thin/worker.go b/internal/runner/thin/worker.go
index 0d0e1ce1..1892a6b6 100644
--- a/internal/runner/thin/worker.go
+++ b/internal/runner/thin/worker.go
@@ -187,9 +187,14 @@ func (w *Worker) Exec(ctx context.Context, r stepRow, progress func(wire.StepRep
if limit <= 0 {
limit = DefaultMaxStep
}
- res := w.Gate.Run(ctx, "checks/"+stepKey(r), tree.Dir, g.argv, limit, func(id string) error {
+ res := w.Gate.Run(withUnsandboxed(ctx, r.Unsandboxed), "checks/"+stepKey(r), tree.Dir, g.argv, limit, func(id string) error {
return w.State.setStepNamespace(context.WithoutCancel(ctx), r, id)
})
+ if res.reason == wire.ReasonSandboxUnproven {
+ // Nothing ran: the Mac's sandbox is not proven and nobody chose
+ // to run outside it. The instance puts the step back to wait.
+ return end(wire.StepFailed, wire.ReasonSandboxUnproven)
+ }
rep.TerminationKind, rep.ChecksSandbox = wire.TerminationProcessGroup, res.sandbox
rep.Gate, rep.Output, rep.LogTail = g.name, res.output, lastLines(res.output, stepTailLines, wire.MaxLogTail)
if !res.terminated {
diff --git a/internal/thintest/placement_contract_test.go b/internal/thintest/placement_contract_test.go
index 720d7eee..37651b76 100644
--- a/internal/thintest/placement_contract_test.go
+++ b/internal/thintest/placement_contract_test.go
@@ -543,8 +543,8 @@ func (r *runnersRig) macChecks(w *peer, title, sandbox string) wire.Task {
}
// The taint is the instance's to keep: once a worker reports checks run
-// outside the sandbox, every later check of that runner is labelled so,
-// whatever it says; its welcome says it is tainted (so a runner whose
+// outside the sandbox, no later check is placed on it in the sandbox,
+// whatever it says (they wait for its sandbox); its welcome says it is tainted (so a runner whose
// file was deleted takes it back); a hello saying tainted is enough too.
func TestContractWorkerTaintIsSticky(t *testing.T) {
r := newRunnersRig(t)
@@ -558,9 +558,10 @@ func TestContractWorkerTaintIsSticky(t *testing.T) {
if k := r.macChecks(w, "second", wire.SandboxNone); k.ChecksSandbox != wire.SandboxNone {
t.Fatalf("outside the sandbox: %q", k.ChecksSandbox)
}
- if k := r.macChecks(w, "third", wire.SandboxSeatbelt); k.ChecksSandbox != wire.SandboxNone {
- t.Fatalf("a tainted runner's checks labelled %q", k.ChecksSandbox)
- }
+ // Tainted, so its sandbox is not trusted again, whatever its hello
+ // says: the next checks wait for it instead of running.
+ third, _ := r.candidate("third", true)
+ r.waitsForSandbox(w, third, 1)
again := r.dialWorker(token, "Tito Studio", w.fr.Welcome.Generation)
if !again.fr.Welcome.Tainted {
t.Fatal("the welcome does not say tainted")
diff --git a/internal/thintest/sandbox_wait_contract_test.go b/internal/thintest/sandbox_wait_contract_test.go
new file mode 100644
index 00000000..36130d38
--- /dev/null
+++ b/internal/thintest/sandbox_wait_contract_test.go
@@ -0,0 +1,236 @@
+package thintest
+
+import (
+ "net/http"
+ "net/url"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/equipo"
+ "amadan.net/oficina/equipo/internal/equipo/chat"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// macHello is a Mac worker's hello at protocol 7 with sandbox (seatbelt
+// when probe P2 denied every hostile attempt, none otherwise).
+func macHello(generation int64, label, sandbox string) wire.Hello {
+ h := WorkerHello(generation)
+ h.Protocol, h.Label, h.Sandbox = wire.ProtocolSandboxConsent, label, sandbox
+ return h
+}
+
+// newMac enrols and connects a protocol 7 Mac worker saying sandbox.
+func (r *runnersRig) newMac(label, sandbox string) *peer {
+ r.t.Helper()
+ token := r.inst.EnrolRunner(r.t).Token
+ fr, err := DialRunnerHello(r.ctx, r.inst.URL, token, macHello(0, label, sandbox))
+ if err != nil {
+ r.t.Fatal(err)
+ }
+ r.t.Cleanup(fr.Close)
+ r.creds[fr] = [2]string{token, label}
+ return &peer{t: r.t, r: r.toolRig, fr: fr}
+}
+
+func (r *runnersRig) taintedRunner(id string) bool {
+ r.t.Helper()
+ var n int
+ if err := r.inst.DB.Writer().QueryRow("SELECT count(*) FROM runners WHERE id = ? AND tainted_at IS NOT NULL", id).Scan(&n); err != nil {
+ r.t.Fatal(err)
+ }
+ return n == 1
+}
+
+// waitsForSandbox checks a task's checks wait for the Mac's sandbox at
+// attempt, nothing sent anywhere: never a failure.
+func (r *runnersRig) waitsForSandbox(w *peer, task string, attempt int64) wire.Step {
+ r.t.Helper()
+ s := r.checksStep(task)
+ k, err := r.client.Task(r.ctx, task)
+ if err != nil {
+ r.t.Fatal(err)
+ }
+ if s.State != wire.StepQueued || s.Placement != wire.PlacementSandbox || s.RunnerID != "" || s.Attempt != attempt || s.RunnerLabel == "" || k.NeedsYou != wire.NeedsMacSandbox || k.Checks == wire.ChecksFailed {
+ r.t.Fatalf("checks not waiting for the Mac's sandbox: %+v needs %q", s, k.NeedsYou)
+ }
+ w.none(wire.FrameDispatch, 200*time.Millisecond)
+ r.primary.none(wire.FrameSendPack, 0)
+ return s
+}
+
+// The staging sequence (task tks6kwzzdngr, 2026-11-11): a Mac re-check's
+// attempt ends runner_restarted, the Mac's P2 no longer passes (hello
+// sandbox none), and then the coordinator's start_task and the task's
+// Retry come. Nothing is dispatched, nothing runs outside the sandbox and
+// the Mac stays untainted: the checks wait for the Mac's sandbox, past
+// the offline limit, never a failure. Only the creator's own choice (the
+// page's Run outside the sandbox, its confirm, for that attempt) sends
+// them, carrying the consent, audited; a teammate, a stale attempt or a
+// coordinator cannot. Running them taints the Mac.
+func TestContractChecksWaitForTheMacsSandbox(t *testing.T) {
+ r := newRunnersRig(t)
+ w := r.newMac("Tito Studio", wire.SandboxSeatbelt)
+ task, sha := r.candidate("iOS swipe", true)
+ _, body := w.expect(wire.FrameDispatch)
+ d := body.(*wire.DispatchCommand)
+ if d.Unsandboxed {
+ t.Fatalf("a proven Mac's dispatch carried consent: %+v", d)
+ }
+ r.relay(w, []byte("PACK swipe"))
+ if !w.lease(d.StepID, 1) {
+ t.Fatal("start refused")
+ }
+ w.send(wire.FrameStep, wire.StepReport{TaskID: task, StepID: d.StepID, Attempt: 1, State: wire.StepFailed, Reason: "runner_restarted", Termination: true, TerminationKind: wire.TerminationProcessGroup, Findings: []wire.Finding{}})
+ w.heartbeat(macHello(0, "Tito Studio", wire.SandboxNone))
+
+ if res := r.call("again", wire.ToolStartTask, map[string]string{"task": task, "brief": "go"}); !res.IsError {
+ t.Fatalf("start_task on a started task: %+v", res)
+ }
+ if acc, err := r.client.RetryTask(r.ctx, task); err != nil || acc.Attempt != 2 {
+ t.Fatalf("retry %+v %v", acc, err)
+ }
+ s := r.waitsForSandbox(w, task, 2)
+ if s.RunnerLabel != "Tito Studio" || r.taintedRunner(w.fr.Welcome.RunnerID) {
+ t.Fatalf("waits for %q, or waiting tainted the Mac", s.RunnerLabel)
+ }
+ clock := time.Now().UTC().Add(chat.OfflineLimit + time.Minute)
+ r.inst.Store.Chat().SetClock(func() time.Time { return clock })
+ w.heartbeat(macHello(0, "Tito Studio", wire.SandboxNone))
+ if err := r.inst.Store.Chat().Place(r.ctx); err != nil {
+ t.Fatal(err)
+ }
+ r.waitsForSandbox(w, task, 2)
+ r.inst.Store.Chat().SetClock(func() time.Time { return time.Now().UTC() })
+ w.heartbeat(macHello(0, "Tito Studio", wire.SandboxNone))
+
+ // Nobody but the creator, for exactly the attempt shown, from the page.
+ owner := r.inst.Cookie()
+ personToolRig(t, r.toolRig, "mate@example.com", equipo.RoleOwner)
+ mate := r.inst.SessionFor(t, "mate@example.com")
+ choose := func(who *http.Cookie, attempt string) int {
+ status, _ := r.post(who, "/conversation/tasks/"+task+"/unsandboxed", url.Values{"from": {"task"}, "step": {s.ID}, "attempt": {attempt}})
+ return status
+ }
+ if status := choose(mate, "2"); status != 403 {
+ t.Fatalf("a teammate chose for the creator: %d", status)
+ }
+ if status := choose(owner, "1"); status != 409 {
+ t.Fatalf("a stale attempt's choice: %d", status)
+ }
+ r.waitsForSandbox(w, task, 2)
+ if r.taintedRunner(w.fr.Welcome.RunnerID) {
+ t.Fatal("waiting tainted the Mac")
+ }
+
+ // The task page says it waits and offers the choice behind a warning.
+ page := r.get(owner, "/tasks/"+task, 200)
+ for _, want := range []string{"Waiting for the Mac", "data-task-unsandboxed", `action="/conversation/tasks/` + task + `/unsandboxed"`, "This runs the checks on Tito Studio outside the sandbox. They can read anything that account can. The Mac is then marked tainted."} {
+ if !strings.Contains(page, want) {
+ t.Fatalf("task page lacks %q: %s", want, page)
+ }
+ }
+ if status := choose(owner, "2"); status != 303 {
+ t.Fatalf("run outside the sandbox from the page: %d", status)
+ }
+ _, body = w.expect(wire.FrameDispatch)
+ d = body.(*wire.DispatchCommand)
+ if d.StepID != s.ID || d.Attempt != 2 || !d.Unsandboxed || d.CandidateSHA != sha {
+ t.Fatalf("chosen dispatch %+v", d)
+ }
+ var by, runner string
+ var attempt int64
+ if err := r.inst.DB.Writer().QueryRow("SELECT unsandboxed_by, unsandboxed_attempt, unsandboxed_runner FROM chat_steps WHERE id = ? AND unsandboxed_at IS NOT NULL", s.ID).Scan(&by, &attempt, &runner); err != nil || by != Owner || attempt != 2 || runner != w.fr.Welcome.RunnerID {
+ t.Fatalf("choice not recorded: %q %d %q %v", by, attempt, runner, err)
+ }
+ var audits int
+ if err := r.inst.DB.Writer().QueryRow("SELECT count(*) FROM audit_events WHERE kind = 'task.checks_unsandboxed'").Scan(&audits); err != nil || audits != 1 {
+ t.Fatalf("choice not audited: %d %v", audits, err)
+ }
+ r.relay(w, []byte("PACK swipe again"))
+ if !w.lease(d.StepID, 2) {
+ t.Fatal("chosen attempt refused")
+ }
+ pass := passed(task, d.StepID, 2, sha)
+ pass.ChecksSandbox = wire.SandboxNone
+ w.send(wire.FrameStep, pass)
+ r.expect(wire.FrameDispatch) // review on the primary
+ if !r.taintedRunner(w.fr.Welcome.RunnerID) {
+ t.Fatal("checks run outside the sandbox did not taint the Mac")
+ }
+ if k, _ := r.client.Task(r.ctx, task); k.ChecksSandbox != wire.SandboxNone {
+ t.Fatalf("not labelled outside the sandbox: %+v", k)
+ }
+ // Tainted now: the next task's checks wait, whatever the hello says.
+ w.heartbeat(macHello(0, "Tito Studio", wire.SandboxSeatbelt))
+ next, _ := r.candidate("iOS next", true)
+ r.waitsForSandbox(w, next, 1)
+}
+
+// When the Mac's P2 passes, checks waiting for its sandbox run in it on
+// their own, without consent. A Mac that refuses unproven checks
+// (sandbox_unproven, its hello out of date) puts the step back to wait:
+// a new attempt, no failure, no taint, and its next hello saying it is
+// proven sends it again.
+func TestContractChecksRunOnceTheSandboxIsProven(t *testing.T) {
+ r := newRunnersRig(t)
+ w := r.newMac("Tito Studio", wire.SandboxNone)
+ task, sha := r.candidate("iOS swipe", true)
+ r.waitsForSandbox(w, task, 1)
+ w.heartbeat(macHello(0, "Tito Studio", wire.SandboxSeatbelt))
+ _, body := w.expect(wire.FrameDispatch)
+ d := body.(*wire.DispatchCommand)
+ if d.TaskID != task || d.Attempt != 1 || d.Unsandboxed || d.CandidateSHA != sha {
+ t.Fatalf("dispatch once proven %+v", d)
+ }
+ r.relay(w, []byte("PACK swipe"))
+ w.send(wire.FrameStep, wire.StepReport{TaskID: task, StepID: d.StepID, Attempt: 1, State: wire.StepFailed, Reason: wire.ReasonSandboxUnproven, Termination: true, TerminationKind: wire.TerminationProcessGroup, Findings: []wire.Finding{}})
+ r.waitsForSandbox(w, task, 2)
+ if s := r.checksStep(task); s.Reason != "" || r.taintedRunner(w.fr.Welcome.RunnerID) {
+ t.Fatalf("the refusal counted or tainted: %+v", s)
+ }
+ w.heartbeat(macHello(0, "Tito Studio", wire.SandboxSeatbelt))
+ _, body = w.expect(wire.FrameDispatch)
+ if d := body.(*wire.DispatchCommand); d.Attempt != 2 || d.Unsandboxed {
+ t.Fatalf("dispatch once proven again %+v", d)
+ }
+}
+
+// The automatic Mac re-check never fires for a Mac whose sandbox is not
+// proven: enrolling and coming back place no step; the first hello saying
+// it is proven re-checks.
+func TestContractMacRecheckWaitsForTheSandbox(t *testing.T) {
+ r := newRunnersRigAt(t, wire.ProtocolMergeFacts)
+ task, sha, _ := r.waitingForMac("Swipe back on iOS")
+ w := r.newMac("Tito Studio", wire.SandboxNone)
+ w.none(wire.FrameDispatch, 200*time.Millisecond)
+ w = r.reconnectPeerHello(w, macHello(w.fr.Welcome.Generation, "Tito Studio", wire.SandboxNone))
+ w.none(wire.FrameDispatch, 200*time.Millisecond)
+ if runs := r.checksRuns(task); len(runs) != 1 {
+ t.Fatalf("an unproven Mac re-ran the checks: %+v", runs)
+ }
+ if r.taintedRunner(w.fr.Welcome.RunnerID) {
+ t.Fatal("tainted")
+ }
+ w.heartbeat(macHello(0, "Tito Studio", wire.SandboxSeatbelt))
+ d := macRecheck(t, w, task, sha)
+ if d.Unsandboxed {
+ t.Fatalf("re-check carried consent %+v", d)
+ }
+}
+
+// reconnectPeerHello dials a runner again with its credential and hello.
+func (r *runnersRig) reconnectPeerHello(p *peer, h wire.Hello) *peer {
+ r.t.Helper()
+ c, ok := r.creds[p.fr]
+ if !ok {
+ r.t.Fatal("unknown peer")
+ }
+ fr, err := DialRunnerHello(r.ctx, r.inst.URL, c[0], h)
+ if err != nil {
+ r.t.Fatal(err)
+ }
+ r.t.Cleanup(fr.Close)
+ r.creds[fr] = c
+ return &peer{t: r.t, r: r.toolRig, fr: fr}
+}
diff --git a/internal/wire/runners.go b/internal/wire/runners.go
index 3a919985..11ab5255 100644
--- a/internal/wire/runners.go
+++ b/internal/wire/runners.go
@@ -17,7 +17,9 @@ import (
// row's Turns (ProtocolSpend). 4 adds what merge authority needs (spec
// 2026-11-11, ProtocolMergeFacts): the review's change facts, the merge's
// provenance, the merge request's own confirmation naming the attempt,
-// and a revert's target. Code asks for a capability by name, never by
+// and a revert's target. 7 adds the person's choice to run a Mac's
+// checks outside the sandbox (ProtocolSandboxConsent). Code asks for a
+// capability by name, never by
// number. Each end speaks the lower of the two on each connection and
// encodes every frame for it with Encode; nothing an older peer does not
// know ever reaches it.
@@ -28,6 +30,7 @@ const (
Protocol4 = 4
Protocol5 = 5
Protocol6 = 6
+ Protocol7 = 7
// ProtocolSpend is the first protocol with a fix round's Feedback and
// a usage row's Turns; Encode drops both below it.
ProtocolSpend = Protocol3
@@ -44,7 +47,14 @@ const (
// drops those entries below it, so an older instance sees the catalog
// it always did.
ProtocolEmptyRepos = Protocol6
- ProtocolCurrent = ProtocolEmptyRepos
+ // ProtocolSandboxConsent is the first protocol with the person's
+ // choice to run a Mac's checks outside the sandbox
+ // (DispatchCommand.Unsandboxed) and the worker's refusal to run them
+ // otherwise (ReasonSandboxUnproven). Encode drops the choice below it,
+ // so an older peer never carries consent, and turns the refusal into
+ // placement_refused, which an older instance places elsewhere.
+ ProtocolSandboxConsent = Protocol7
+ ProtocolCurrent = ProtocolSandboxConsent
)
// Runner roles. A person's first runner is the primary: the coordinator,
@@ -232,8 +242,13 @@ func Covers(tags, needs []string) bool {
}
// Placement of a step: "" placed on its runner; waiting_runner while the
-// only runners that fit are offline.
-const PlacementWaiting = "waiting_runner"
+// only runners that fit are offline; waiting_sandbox while the only Macs
+// online that fit have not proven their sandbox (probe P2) or are
+// tainted, and nobody chose to run the checks outside it.
+const (
+ PlacementWaiting = "waiting_runner"
+ PlacementSandbox = "waiting_sandbox"
+)
// Publication of a worker's Engineering candidate: only the primary
// publishes (pushes) it.
@@ -372,7 +387,8 @@ func Speaks(protocol int, kind string) bool { return protocol >= Protocol2 || !p
var ErrProtocol = errors.New("wire: frame not in this protocol")
// Encode returns f as the given protocol speaks it. Below
-// ProtocolEmptyRepos a hello's empty repositories are dropped; below
+// ProtocolSandboxConsent the sandbox consent and refusal are dropped;
+// below ProtocolEmptyRepos a hello's empty repositories are dropped; below
// ProtocolHostedChecks the hosted checks fields too; below
// ProtocolMergeFacts the merge authority fields too; below
// ProtocolSpend the spend fields too; at protocol 1 it is exactly the
@@ -390,8 +406,11 @@ func Encode(f Frame, protocol int) (Frame, error) {
return Frame{}, err
}
changed := false
+ if protocol < ProtocolSandboxConsent {
+ changed = downgradeSandboxConsent(body)
+ }
if h, ok := body.(*Hello); ok && protocol < ProtocolEmptyRepos {
- changed = WithoutEmptyRepos(h)
+ changed = WithoutEmptyRepos(h) || changed
}
if protocol < ProtocolHostedChecks {
changed = downgradeHostedChecks(body) || changed
@@ -416,6 +435,26 @@ func Encode(f Frame, protocol int) (Frame, error) {
return f, nil
}
+// downgradeSandboxConsent clears a dispatch's consent to run outside the
+// sandbox (an older peer never carries one), and says a worker's refusal
+// to run unproven as placement_refused, which an older instance knows:
+// it places the step elsewhere, never counts a failure and never taints.
+func downgradeSandboxConsent(body any) bool {
+ switch v := body.(type) {
+ case *DispatchCommand:
+ set := v.Unsandboxed
+ v.Unsandboxed = false
+ return set
+ case *StepReport:
+ if v.Reason != ReasonSandboxUnproven {
+ return false
+ }
+ v.Reason = "placement_refused"
+ return true
+ }
+ return false
+}
+
// downgradeHostedChecks clears a body's ProtocolHostedChecks fields
// (omitempty). It reports whether the body had any.
func downgradeHostedChecks(body any) bool {
diff --git a/internal/wire/runners_test.go b/internal/wire/runners_test.go
index 8da0c9ca..a304086e 100644
--- a/internal/wire/runners_test.go
+++ b/internal/wire/runners_test.go
@@ -333,7 +333,38 @@ func TestEncodeBelowProtocol6DropsEmptyRepos(t *testing.T) {
if wire.WithoutEmptyRepos(&cut) {
t.Fatal("a second cut reported a change")
}
- if wire.ProtocolCurrent != wire.ProtocolEmptyRepos || wire.ProtocolEmptyRepos != 6 || wire.ProtocolHostedChecks != 5 {
+ if wire.ProtocolCurrent != wire.ProtocolSandboxConsent || wire.ProtocolSandboxConsent != 7 || wire.ProtocolEmptyRepos != 6 || wire.ProtocolHostedChecks != 5 {
t.Fatalf("current protocol %d", wire.ProtocolCurrent)
}
}
+
+// Protocol 7 carries the person's choice to run a Mac's checks outside
+// the sandbox, and the worker's refusal without it. Below 7 the choice is
+// gone (an older peer is never consent) and the refusal is
+// placement_refused, which an older instance places elsewhere: never a
+// failure, never a taint. Other reasons and dispatches are unchanged.
+func TestEncodeBelowProtocol7DropsSandboxConsent(t *testing.T) {
+ d, _ := wire.NewFrame("c1", wire.FrameDispatch, wire.DispatchCommand{TaskID: "tk1", StepID: "s1", Attempt: 2, Specialist: wire.SpecialistChecks, Findings: []wire.Finding{}, Unsandboxed: true})
+ if same, err := wire.Encode(d, wire.ProtocolSandboxConsent); err != nil || !bytes.Equal(same.Data, d.Data) || !strings.Contains(string(d.Data), `"unsandboxed":true`) {
+ t.Fatalf("changed at protocol 7: %s %v", d.Data, err)
+ }
+ for _, p := range []int{wire.ProtocolEmptyRepos, wire.ProtocolHostedChecks, wire.Protocol2} {
+ old, err := wire.Encode(d, p)
+ if err != nil || strings.Contains(string(old.Data), "unsandboxed") {
+ t.Fatalf("protocol %d dispatch: %s %v", p, old.Data, err)
+ }
+ }
+ r, _ := wire.NewFrame("p1", wire.FrameStep, wire.StepReport{TaskID: "tk1", StepID: "s1", Attempt: 2, State: wire.StepFailed, Reason: wire.ReasonSandboxUnproven, Termination: true, Findings: []wire.Finding{}})
+ old, err := wire.Encode(r, wire.ProtocolEmptyRepos)
+ var rep wire.StepReport
+ if err != nil || wire.Strict(old.Data, &rep) != nil || rep.Reason != "placement_refused" || rep.State != wire.StepFailed || !rep.Termination {
+ t.Fatalf("refusal at protocol 6: %s %v", old.Data, err)
+ }
+ if !wire.StepReasons[wire.ReasonSandboxUnproven] {
+ t.Fatal("protocol 7 instance does not know the refusal")
+ }
+ other, _ := wire.NewFrame("p2", wire.FrameStep, wire.StepReport{TaskID: "tk1", StepID: "s1", Attempt: 2, State: wire.StepFailed, Reason: "runner_restarted", Termination: true, Findings: []wire.Finding{}})
+ if same, err := wire.Encode(other, wire.ProtocolEmptyRepos); err != nil || !bytes.Equal(same.Data, other.Data) {
+ t.Fatalf("another reason changed: %v", err)
+ }
+}
diff --git a/internal/wire/tasks.go b/internal/wire/tasks.go
index 091a7aa8..1e1f3b0a 100644
--- a/internal/wire/tasks.go
+++ b/internal/wire/tasks.go
@@ -113,6 +113,10 @@ const (
// NeedsRunnerOffline: the only runner that can do the next step has
// been offline for 30 minutes.
NeedsRunnerOffline = "runner_offline"
+ // NeedsMacSandbox: checks wait for the Mac's sandbox; they run by
+ // themselves once it is proven, or the creator may choose to run them
+ // outside it.
+ NeedsMacSandbox = "mac_sandbox"
)
// MaxRebaseRounds is how many times Engineering is sent to put the change
@@ -274,7 +278,8 @@ type Step struct {
// reports any. It stays after the step ends (its last lines).
Activity []ActivityLine `json:"activity"`
// Runners: where the attempt runs (RunnerLabel for people; the house
- // rule mentions it only when it is not the primary), what it needs,
+ // rule mentions it only when it is not the primary; while Placement is
+ // waiting_sandbox, the Mac it waits for), what it needs,
// whether it waits for a runner, how its end was proven, and the
// publication of a worker's Engineering candidate.
RunnerID string `json:"runner_id"`
@@ -636,6 +641,11 @@ type DispatchCommand struct {
// hub's own CI verdict on the candidate, when the repository's hosted
// CI is on (release slice 1). An older runner never gets it.
HostedChecks bool `json:"hosted_checks,omitempty"`
+ // Protocol 7: Unsandboxed is the task creator's recorded choice to
+ // run this attempt's checks on this Mac outside the sandbox. Without
+ // it a Mac whose sandbox is not proven refuses the checks
+ // (ReasonSandboxUnproven) and runs nothing.
+ Unsandboxed bool `json:"unsandboxed,omitempty"`
}
// WatchMergeCommand watches a task's branch for its candidate landing on
@@ -878,8 +888,11 @@ var StepReasons = map[string]bool{
// refused; the runner that fits was offline too long (checks).
"placement_refused": true,
"withdrawn": true,
- "transfer_refused": true,
- "runner_offline": true,
+ // The Mac's sandbox is not proven and nobody chose to run outside it:
+ // nothing ran (protocol 7).
+ ReasonSandboxUnproven: true,
+ "transfer_refused": true,
+ "runner_offline": true,
// machine_removed: the runner was removed while the step may have been
// running; nothing proves its end (only Recover settles it).
"machine_removed": true,
@@ -891,6 +904,11 @@ var StepReasons = map[string]bool{
// ReasonUnknown stands in for a step reason the instance does not know.
const ReasonUnknown = "unknown"
+// ReasonSandboxUnproven is a Mac worker's refusal to run checks outside a
+// sandbox it has not proven, without the person's choice: nothing ran and
+// the Mac is not tainted. The instance puts the step back to wait.
+const ReasonSandboxUnproven = "sandbox_unproven"
+
// Coordinator tools for tasks.
const (
ToolRecordTask = "record_task"