perf(workspace): skip submodules for manager checkouts#68
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.SkipSubmodulesand set it whensess.Role == RoleManager. Coding workers (implementer/reviewer/validator) still get full submodules. A manager that ever needs one cangit 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 submoduleupdateitself is only ~9s. The real dominant costs of a 6–8 min prod prep are: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
TestPrepareIsolated_SkipSubmodulesLeavesThemUninitialized: superproject checked out, submodule tree left unmaterialized.internal/workspace+internal/orchsuites green;go build ./...+go vetclean.https://claude.ai/code/session_018CRsfX79dM42QC2BrW1vtZ