Skip to content

perf(workspace): skip submodules for manager checkouts#68

Merged
nathanwhit merged 1 commit into
mainfrom
skip-manager-submodules
Jun 25, 2026
Merged

perf(workspace): skip submodules for manager checkouts#68
nathanwhit merged 1 commit into
mainfrom
skip-manager-submodules

Conversation

@nathanwhit

@nathanwhit nathanwhit commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

Skip submodule materialization for manager checkouts. A manager only reads the superproject to scope work and spawn workers — it never builds or runs the test suites that live in submodules — so add workspace.Spec.SkipSubmodules and set it when sess.Role == RoleManager. Coding workers (implementer/reviewer/validator) still get full submodules. A manager that ever needs one can git submodule update --init <path>.

Honest scope (corrected after measuring)

This started from "a new objective's manager sat ~6.5 min in queued" (prod e574fde2). I initially attributed that to submodule materialization — that was wrong. Measured on the warm-cache box, the actual git work for a full deno prep (incl. submodules) is ~44s, and the submodule update itself is only ~9s. The real dominant costs of a 6–8 min prod prep are:

  1. No SSH connection multiplexing — orcha runs each of a prep's ~50–60 git subcommands over a fresh SSH connection (~1.15s/handshake vs ~0.19s multiplexed). ~60–70s of pure handshake overhead per prep. (separate fix)
  2. The WPT mirror (159k files) is warmed every prep (~18.5s) even though it's always size-skipped from checkout. (separate fix)
  3. Box overload (load ~12 on 6 cores) amplifying everything.

So this PR is a real but modest win: it removes a manager's submodule git commands, the WPT warm, and the ~38k-file write from the manager's critical path. It does not by itself fix the 6-min worst case (that's the SSH-multiplexing + WPT-warm + load items above, which also help workers). Keeping it because managers genuinely don't need submodules and it's a clean reduction.

Test

  • New TestPrepareIsolated_SkipSubmodulesLeavesThemUninitialized: superproject checked out, submodule tree left unmaterialized.
  • internal/workspace + internal/orch suites green; go build ./... + go vet clean.

https://claude.ai/code/session_018CRsfX79dM42QC2BrW1vtZ

A new objective's manager blocked ~6.5 min on a full denoland/deno isolated checkout before it could even start running — pure dead time the user sees as a session 'queued for minutes'. Measured on the warm-cache box, the whole checkout MINUS submodules is ~3s (clone-from-cache 0.1s, upstream fetch 1s, full 14k-file/14G worktree 2.1s); essentially all of the remaining ~6m19s is submodule materialization (deno's std, node_compat and bench suites; the WPT suite is already skipped by size).

A manager only READS the superproject to scope work and spawn workers — it never builds or runs the suites those submodules carry. So skip submodule materialization for manager checkouts: prep drops from minutes to seconds. Coding workers (implementer/reviewer/validator) still get full submodules. A manager that ever needs one can 'git submodule update --init <path>' itself.

Adds workspace.Spec.SkipSubmodules, set in prepareIsolatedOn when sess.Role == RoleManager.

Claude-Session: https://claude.ai/code/session_018CRsfX79dM42QC2BrW1vtZ
@nathanwhit nathanwhit merged commit f1a45ec into main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant