Repository navigation
Verify efficiency 1/3: shared build cache across worktrees (#390) - #664
Merged
Merged
Conversation
Point every worktree of a repo at ~/.solenta/build-cache/<repo> so thread B reuses thread A's task results. Injected into the verify spawn and every agent CLI. Does not override env the user already set.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Aug 22, 2026
* feat(verify): affected-scope node --test selection (#390) Rewrite the verify command to the tests the diff touches when the runner is node --test. Docs-only diffs skip the suite; lockfiles, --all, unknown diffs, and compound npm scripts stay full-suite. Wired into the runner gate and Verify now. Post-merge verify is unchanged. * feat(verify): affected-scope turbo/nx/jest/vitest/pytest/go (#390) (#666) Add the remaining verify-command matchers on top of the node --test framework. Unknown runners and already-filtered commands stay full-suite. Co-authored-by: Willem <[email protected]> --------- Co-authored-by: Willem <[email protected]>
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.
First of three stacked PRs for #390. Self-contained: this one can land alone and does nothing to the verify command.
What
electron/verifyEfficiency.js—cacheEnv()points every worktree of a repo at one cache directory, so thread B reuses thread A's build output instead of rebuilding from scratch.The key is the main checkout, resolved through
git rev-parse --git-common-dir, so all worktrees of one clone land on the same~/.solenta/build-cache/<repo>-<sha1>. The sha1 of the realpath keeps two clones both namedappapart. Override the root withSOLENTA_BUILD_CACHE.turbo.jsonTURBO_CACHE_DIRnx.json/workspace.jsonNX_CACHE_DIRECTORY,NX_DAEMON=falseCargo.tomlCARGO_TARGET_DIR,SCCACHE_DIRCMakeLists.txt/.ccacheCCACHE_DIRNo marker means no vars. An already-set var is never overridden, so a project that configures its own cache wins.
NX_DAEMON=falseis deliberate: the nx daemon is keyed per workspace path and would defeat cache sharing across worktrees.Wired into two spawn paths —
runVerifyCommandinelectron/verify.js, andagentSpawnOptionsinelectron/proc.jsso agent CLIs building inside a worktree hit the same cache.Testing
npm run test:electron: 1939 pass / 0 fail, run from this branch alone.Reviewer note
agentSpawnOptionsnow does a synchronousgit rev-parse --git-common-diron every agent CLI spawn (memoised per cwd, 2s timeout) plus a fewexistsSynccalls. It is in the spawn hot path.On solenta itself this is a no-op — no turbo, nx, cargo or cmake here. The payoff is for other projects.
Part of #390. Stacked under it: 2/3 affected-scope core, 3/3 the remaining runners.