Repository navigation
Verify efficiency 2/3: affected-scope verify, node --test (#390) - #665
Merged
Merged
Conversation
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.
|
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
) 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]>
currentbits
added a commit
that referenced
this pull request
Aug 22, 2026
* feat(verify): share turbo/nx/cargo cache across worktrees (#390) 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. * Verify efficiency 2/3: affected-scope verify, node --test (#390) (#665) * 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]> --------- 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.
Second of three stacked PRs for #390. Based on #664, review that one first.
What
scopeVerifyCommand()rewrites the verify command to cover only what the diff touches. This PR adds the framework plus one runner —node --test, since that is what this repo actually uses. The other six runners are in 3/3.Changed paths come from the pre-existing
worktrees.listChangedPaths(exported here), diffed against the project default branch and including the working tree.npm run <script>is unwrapped throughpackage.jsonfirst, so a single-command script still matches a runner. Compound scripts containing;,&or|are left alone.When it does NOT scope
This is the whole safety story, so it is the part worth reviewing hardest. Falls back to the full suite when:
tsconfig/jsconfig,Dockerfile,CMakeLists.txt, or a CI workflow under.github/workflowsor.circleci--filter,--affected,--findRelatedTests,--testPathPattern,--all,vitest relatedchangedPathscomes back null — unknown means full, never emptyDocs-only diffs (
.md,.mdx,.rst,docs/,README/LICENSE/CHANGELOG…) short-circuit toexit 0.Visibility
A rewrite is never silent. The log is prefixed
[verify] affected scope(orno testable changes), and the rewritten command is what appears in theVerified: … passedevent and inVerifyResult.command.Testing
npm run test:electron: 1941 pass / 0 fail, run from this branch alone.Reviewer notes
candidateTests) is convention-based. It mapselectron/store.js→electron/test/store.test.jscorrectly, but misses this repo's renderer naming (src/components/Sidebar.tsx→test/sidebar.test.tsx), which simply falls back to the full suite. Missing a mapping is safe; a wrong mapping would not be.Part of #390.