fix(setup): re-derive entry point and package manager on SDK override - #782
Open
ffantl-ld wants to merge 1 commit into
Open
fix(setup): re-derive entry point and package manager on SDK override#782ffantl-ld wants to merge 1 commit into
ffantl-ld wants to merge 1 commit into
Conversation
ffantl-ld
force-pushed
the
fix/setup-rederive-on-override
branch
2 times, most recently
from
August 17, 2026 16:58
75ca625 to
3e622b5
Compare
3 tasks
ffantl-ld
force-pushed
the
fix/setup-rederive-on-override
branch
2 times, most recently
from
August 18, 2026 15:29
47efc96 to
4129348
Compare
Choosing an SDK by hand replaced the detected entry point with that SDK's bare default in the working directory, so a project whose entry file was src/index.js got a second index.js created beside it. The package manager was left describing the language detection guessed first, so a Ruby install never ran bundle add. Both are now re-derived for the chosen SDK from one shared table of entry-point candidates, which detection also reads. Snippet-only SDKs have no entry point, so the final screen no longer names an empty path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ffantl-ld
force-pushed
the
fix/setup-rederive-on-override
branch
from
August 19, 2026 14:12
4129348 to
b94d3d1
Compare
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.
Requirements
Related issues
REL-15430 — found in the
ldcli setupbug bash. Also closes known issues #9 (package manager not re-derived) and #8 (empty file path on the final screen) from the bug bash page.Stacked on #781, which targets
setup-ld(#776) and touches the same files.Describe the solution you've provided
$PWD. Previously a project whose entry file wassrc/index.jsgot a secondindex.jscreated beside it, and the package manager still described the language detection guessed first — so a Ruby install never ranbundle add.Describe alternatives you've considered
pnpmcannot install a gem, and carrying it forward is what suppressedbundle add.Additional context
TestWizard_OverrideSDK_DoesNotReuseDetectedEntryPointasserted that the package manager survives an override, which encoded known issue #9 as expected behaviour. Its expectation is updated to the re-derived value.Testing approaches
go test ./...passes.EntryPointFor(finds an existing file, suggests a fallback, empty for snippet-only SDKs) andPackageManagerFor(Bundler vs bare gem, node lockfile, uv, manual-install SDKs).src/index.js, overridden tonode-server, now resolves to the existing file rather than creating a sibling.setup detectreportssrc/index.jsfor that project shape. The override itself is TUI-only and is covered by the model-level test rather than by hand.Note
Overview
When someone overrides auto-detected SDK in
ldcli setup, the wizard now re-derives entry point and package manager for the chosen SDK instead of keeping values from the first detection. That stops wrong installs (e.g.pnpmfor Ruby) and wrong injection targets (e.g. appending Ruby init into a Nodeindex.js).Shared detection logic: Entry-point candidate lists for Node, Python, and Ruby live in a single
sdkEntryPointstable used by both filesystem detection and the override path, so detection and manual SDK choice agree on where code goes.UI: Manual-setup messages use
addCodeToso snippet-only SDKs don’t show an empty “add to” path.Tests cover override scenarios (
src/index.jsresolution, package manager re-derivation) and the newEntryPointFor/PackageManagerForhelpers.Reviewed by Cursor Bugbot for commit b94d3d1. Bugbot is set up for automated code reviews on this repo. Configure here.