Skip to content

Refactor workspace info considered in remote fetch#57

Closed
BFladderbeanawa wants to merge 1 commit into
mainfrom
refactor-workspace-info-considered-in-remote-fetch
Closed

Refactor workspace info considered in remote fetch#57
BFladderbeanawa wants to merge 1 commit into
mainfrom
refactor-workspace-info-considered-in-remote-fetch

Conversation

@BFladderbeanawa

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 28, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/VersionCandidate to enable providers to expose version facts without making local compatibility decisions.
  • Implemented compatible selection in routing (FetchManyCompatible + SelectCompatibleVersion) using an injected upstream.CompatibilityFunc.
  • Wired install’s recursive resolver/planner to build a compatibility predicate from workspace.Workspace and 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)
}
@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 3823353 to 70f7eb8 Compare June 29, 2026 09:39
Copilot AI review requested due to automatic review settings June 29, 2026 09:39
@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 70f7eb8 to 989749b Compare June 29, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

}
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())
}
@Arcadi4 Arcadi4 force-pushed the main branch 2 times, most recently from b6d9699 to 18aff6e Compare June 29, 2026 09:56
@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 989749b to 87cc938 Compare June 29, 2026 11:43
Copilot AI review requested due to automatic review settings June 29, 2026 11:44
@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 87cc938 to 40acbde Compare June 29, 2026 11:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 40acbde to 29d4ca5 Compare June 29, 2026 11:46
Copilot AI review requested due to automatic review settings June 29, 2026 16:29
@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 29d4ca5 to 62d96cb Compare June 29, 2026 16:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 62d96cb to 1b8b6be Compare June 29, 2026 16:30
@Arcadi4 Arcadi4 requested a review from Copilot June 29, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Arcadi4 Arcadi4 self-requested a review June 29, 2026 16:36
@Arcadi4 Arcadi4 self-assigned this Jun 29, 2026
@Arcadi4 Arcadi4 force-pushed the refactor-workspace-info-considered-in-remote-fetch branch from 1b8b6be to b492bf5 Compare June 29, 2026 16:39
@Arcadi4

Arcadi4 commented Jul 4, 2026

Copy link
Copy Markdown
Member

Redesign version selectors first.

@Arcadi4 Arcadi4 closed this Jul 4, 2026
@Arcadi4 Arcadi4 deleted the refactor-workspace-info-considered-in-remote-fetch branch July 5, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants