Repository navigation
feat(go): model in-repository replace targets under root-module scope - #110
Merged
adityankale190895 merged 1 commit intoNov 11, 2026
Merged
Conversation
With go.scope set, any local replace added a blocker, so every analysis of a monorepo using replace example.com/x => ./x fell back. When every local replace points at a nested module root inside the repository, that module is now modelled: it is removed from goExcludedModuleRoots, and the packages go list reports for the root build select their importers. Tests of a replaced module are not selectable or modelled (they cannot run from the root), so editing them, an unused package or x/go.mod still falls back. A replace to any other directory keeps the blocker. Closes DiffCI#81 Signed-off-by: sarankumar1325 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
adityankale190895
added a commit
that referenced
this pull request
Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
adityankale190895
added a commit
that referenced
this pull request
Nov 11, 2026
Engine pin moves from a50b0ef to 8b8c5f5, picking up the Core engine changes since 0.3.38: path-literal edges and narrowed computed-load selections, relative imports of build output followed to source, Jest confined to its sub-package, tsd/tstyche scoped to their own tests, Go replace targets under root-module scope, every lockfile hashed and reported (bun.lock included), and a babel.config-only change running every test (#105-#110, #118-#120). Descriptions across npm, the MCP registry, plugins and the Action now read "verification for AI coding agents". Records the Muse marketplace digest for the 0.3.39 package tree, computed by the pinned Muse 1.4.11-R6667.1 build from an LF archive (the same method reproduces 0.3.38's recorded digest). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[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.
Closes #81 (part of #76)
Problem
With
"go": { "scope": "root-module" }, any localreplaceadded the blockerGo root-module scope with local replacements requires full validation. So every analysis of a monorepo that usesreplace example.com/x => ./xfell back to the full suite. That was true even for changes nowhere nearx/.Change (
src/repo/adapters/go.ts)Module.Replace.Dir. If every local replace points at a nested module root inside the repository, there is no blocker, and those roots are dropped fromgoExcludedModuleRoots. The replaced packages that the root build uses already appear in thego list -depsoutput, withDirinside the checkout. So their files are modelled sources, and a change there selects the root packages that import them.go list -jsonalso reportsTestGoFiles/XTestGoFilesfor dependency packages. A replaced module's tests belong to that module and can't run asgo test ./xfrom the root. So for packages withModule.Replace.Dir, test files, test embeds and test imports are no longer selectable tests or modelled sources. Without this,x/x_test.gowas selected with test package./x.Go local module replacement lies outside the repository)Go runtime inputs outside source/embed metadata …)x/go.mod(the language/framework config rule)Changes in a Go module outside the declared root-module scope …)I updated the reason table in
docs/using-diffci.md.Tests
New
tests/repo/go-scope-local-replace.test.tsruns the realgo listoffline throughanalyzeCheckouton a temporary repository: a root module withgo.scope: root-module,replace example.com/x => ./x,app/importingexample.com/x, and an unrelatedother/. Whengoisn't installed, it skips with a reason.x/x.gogives SELECTIVE, selectsapp/app_test.goand skipsother/other_test.go, with no fallback reasons../x/.x/x_test.gogives FULL (runtime-inputs reason).legacy/gives FULL (outside-scope reason).Without the adapter change, all four fail: every case falls back with the old replace blocker. Registered in
release-files.json.npm test: 903 passed (Go 1.27 installed locally, so the new tests ran).npm run typecheckis clean, and so arenpm run buildandnpm run audit:boundary.