Refactor workspace info considered in remote fetch#57
Closed
BFladderbeanawa wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors “compatible” version resolution so workspace-derived compatibility decisions happen in install/routing (caller orchestration) rather than inside upstream providers, by introducing a provider capability to list versions and a caller-injected compatibility predicate.
Changes:
- Added
upstream.VersionLister+VersionInfo/VersionCandidateto enable providers to expose version facts without making local compatibility decisions. - Implemented compatible selection in routing (
FetchManyCompatible+SelectCompatibleVersion) using an injectedupstream.CompatibilityFunc. - Wired install’s recursive resolver/planner to build a compatibility predicate from
workspace.Workspaceand pass it into routing.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| upstream/upstream_types.go | Adds version listing + compatibility predicate types/interfaces. |
| upstream/routing/routing_execution.go | Adds compatible-aware fetch path and shared selection/sorting logic. |
| upstream/providers/modrinth/modrinth.go | Implements ListVersions for Modrinth provider. |
| upstream/providers/modrinth/modrinth_data.go | Maps Modrinth version payload to upstream.VersionInfo. |
| upstream/providers/curseforge/curseforge.go | Implements ListVersions for CurseForge provider. |
| upstream/providers/curseforge/curseforge_data.go | Maps CurseForge file payload to upstream.VersionInfo (+ release/loader mapping). |
| upstream/AGENTS.md | Documents provider/caller boundary for POP compatibility resolution. |
| types/type_package.go | Introduces types.ReleaseType and helpers used for ordering. |
| opencode.json | Adds a configured remote MCP entry (token via env var). |
| install/install_recursive_resolve.go | Ensures install options defaults are applied and injects compatibility func into resolver. |
| install/install_recursive_provider_resolver.go | Routes fetch through compatible-aware fetch with injected predicate. |
| install/install_compatibility.go | Implements workspace-derived compatibility predicate (game version + loader). |
| install/install_batch.go | Injects compatibility func for batch planning path. |
| install/AGENTS.md | Documents install-side ownership of compatibility selection policy. |
| AGENTS.md | Elevates POP compatibility boundary to repo-level agent guidance. |
| .gitignore | Ignores .env.local. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+33
to
+37
| if gameVersion == "" || gameVersion == types.VersionUnknown || len(candidate.GameVersions) == 0 { | ||
| return true | ||
| } | ||
| return slices.Contains(candidate.GameVersions, gameVersion) | ||
| } |
3823353 to
70f7eb8
Compare
70f7eb8 to
989749b
Compare
| } | ||
| selected, ok := SelectCompatibleVersion(versions, isCompatible) | ||
| if !ok { | ||
| return id, fmt.Errorf("%w: %s", ErrNoProviderSucceeded, id.StringBase()) |
Comment on lines
+120
to
+122
| if !files[i].IsAvailable { | ||
| continue | ||
| } |
Comment on lines
+149
to
+154
| for _, version := range versions { | ||
| if version == nil { | ||
| continue | ||
| } | ||
| infos = append(infos, version.ToVersionInfo()) | ||
| } |
b6d9699 to
18aff6e
Compare
989749b to
87cc938
Compare
87cc938 to
40acbde
Compare
40acbde to
29d4ca5
Compare
29d4ca5 to
62d96cb
Compare
62d96cb to
1b8b6be
Compare
1b8b6be to
b492bf5
Compare
Member
|
Redesign version selectors first. |
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.
No description provided.