Skip to content

fix(configurator): filter MCP releases for update check#28

Merged
knotekt merged 1 commit into
mainfrom
alaxe/444b7654-4355-42aa-a500-7ba272132a74
May 29, 2026
Merged

fix(configurator): filter MCP releases for update check#28
knotekt merged 1 commit into
mainfrom
alaxe/444b7654-4355-42aa-a500-7ba272132a74

Conversation

@alaxe-bot

@alaxe-bot alaxe-bot Bot commented May 28, 2026

Copy link
Copy Markdown

Configurator takes the latest release when checking latest MCP version. If the latest release is a configurator release, it breaks. It needs to filter for MCP releases only

Closes #27

Copilot AI review requested due to automatic review settings May 28, 2026 19:31

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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jimirocks jimirocks requested a review from knotekt May 28, 2026 19:34
@alaxe-bot

alaxe-bot Bot commented May 28, 2026

Copy link
Copy Markdown
Author

Rebase completed: git rebase origin/main reported branch already up to date.

Read .alaxe/context.md and .alaxe/task.md, then fetched PR data and review threads for PR #28.

  • Review state includes only the Copilot error review comment.
  • Unresolved line-level review threads: none (reviewThreads.nodes empty).

No additional code changes were required for this iteration; current branch already contains the fix commit (c6f9ac7).

Commit strategy: Tier 1 - no new changes from review feedback, so no new commit needed.

Ran @alaxe-review once: REVIEW_PASS (no blocking findings).

Verification rerun succeeded:

  • ./gradlew test detekt build -> BUILD SUCCESSFUL

PR update actions:

  • git push --force-with-lease origin HEAD:refs/heads/alaxe/444b7654-4355-42aa-a500-7ba272132a74 -> Everything up-to-date
  • PR body updated verbatim from .alaxe/pr-body.md via gh pr edit 28 --body-file .alaxe/pr-body.md

Post-push unresolved thread processing:

  • Re-fetched review threads; none unresolved, so no thread replies/resolutions were needed.

ALAXE_PHASE: AWAITING_REVIEW

@alaxe-bot

alaxe-bot Bot commented May 28, 2026

Copy link
Copy Markdown
Author

Rebase completed: git rebase origin/main reported branch already up to date.

Read .alaxe/context.md and .alaxe/task.md, then fetched PR review data for PR #28.

  • Reviews contain only the Copilot error comment (Copilot encountered an error...).
  • Unresolved line-level review threads: none (reviewThreads.nodes is empty).

No code changes were required for this iteration.

Commit strategy: Tier 1 - no new code changes requested by review feedback, so no commit was created.

Ran @alaxe-review once: REVIEW_PASS.

Verification rerun succeeded:

  • ./gradlew test detekt build -> BUILD SUCCESSFUL

PR update actions completed:

  • git push --force-with-lease origin HEAD:refs/heads/alaxe/444b7654-4355-42aa-a500-7ba272132a74 -> Everything up-to-date
  • gh pr edit 28 --body-file .alaxe/pr-body.md applied the PR body verbatim from .alaxe/pr-body.md.

Post-push thread processing:

  • Re-fetched review threads and found none unresolved, so no reply/resolve operations were needed.

ALAXE_PHASE: AWAITING_REVIEW

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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@alaxe-bot

alaxe-bot Bot commented May 28, 2026

Copy link
Copy Markdown
Author

Rebase completed: git rebase origin/main reported branch already up to date.

Read .alaxe/context.md and .alaxe/task.md, then fetched PR review data for PR #28.

  • Reviews still only contain Copilot error comments (Copilot encountered an error...).
  • Unresolved line-level review threads: none (reviewThreads.nodes is empty).

No code changes were required for this iteration.

Commit strategy: Tier 1 - no new changes requested by review feedback, so no commit was created.

Ran @alaxe-review once: REVIEW_PASS.

Verification rerun succeeded:

  • ./gradlew test detekt build -> BUILD SUCCESSFUL

PR update actions completed:

  • git push --force-with-lease origin HEAD:refs/heads/alaxe/444b7654-4355-42aa-a500-7ba272132a74 -> Everything up-to-date
  • gh pr edit 28 --body-file .alaxe/pr-body.md applied the PR body verbatim from .alaxe/pr-body.md.

Post-push unresolved thread processing:

  • Re-fetched review threads and found none unresolved, so no reply/resolve operations were needed.

ALAXE_PHASE: AWAITING_REVIEW

@alaxe-bot

alaxe-bot Bot commented May 29, 2026

Copy link
Copy Markdown
Author

Rebase completed: git rebase origin/main reported branch already up to date.

Read .alaxe/context.md and .alaxe/task.md, then fetched PR reviews and review threads for PR #28.

  • Reviews still only contain Copilot error comments (Copilot encountered an error...).
  • Unresolved line-level review threads: none (reviewThreads.nodes is empty).

No code changes were required for this iteration.

Commit strategy: Tier 1 - no new changes requested by review feedback, so no commit was created.

Ran @alaxe-review once: REVIEW_PASS.

Verification rerun succeeded:

  • ./gradlew test detekt build -> BUILD SUCCESSFUL

PR update actions completed:

  • git push --force-with-lease origin HEAD:refs/heads/alaxe/444b7654-4355-42aa-a500-7ba272132a74 -> Everything up-to-date
  • gh pr edit 28 --body-file .alaxe/pr-body.md applied the PR body verbatim from .alaxe/pr-body.md.

#28

Post-push unresolved thread processing:

  • Re-fetched review threads and found none unresolved, so no reply/resolve operations were needed.

ALAXE_PHASE: AWAITING_REVIEW

@knotekt knotekt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📋 Shrnutí

Čistý, dobře strukturovaný bugfix. Přechod ze slabě typovaného serde_json::Value na silně typované struktury zlepšuje maintainability. Logika selekce je správně extrahovaná do samostatné funkce a pokrytá testy.

🟠 Důležité

GitHub API stránkování — může vrátit jen prvních 30 releasů

GET /repos/:owner/:repo/releases bez per_page parametru defaultně vrací 30 položek. Pokud je starších releasů víc než 30 a všechny novější jsou configurator releases, funkce vrátí chybu "No stable MCP release found" místo správné verze.

Návrh opravy — přidat ?per_page=100:

.get("https://api.github.com/repos/Smarteon/lox-mcp/releases?per_page=100")

🟡 Menší

Chybí test pro draft/prerelease filtrování — testy nepokrývají případ, kdy draft/prerelease release má -all.jar asset a měl by být přeskočen:

#[test]
fn skips_prerelease_and_draft() {
    let releases = vec![
        GithubRelease { tag_name: "v2.0.0".to_string(), draft: false, prerelease: true, assets: vec![asset("lox-mcp-2.0.0-all.jar")] },
        GithubRelease { tag_name: "v1.9.0".to_string(), draft: false, prerelease: false, assets: vec![asset("lox-mcp-1.9.0-all.jar")] },
    ];
    let r = select_latest_mcp_release(&releases).unwrap();
    assert_eq!(r.version, "1.9.0");
}

🟢 Klady

  • Silné typování: nahrazení serde_json::Value za GithubRelease/GithubAsset výrazně zlepšuje čitelnost a odstraňuje unwrap_or("") antipattern
  • Dobrá extrakce logiky: extract_release_info a select_latest_mcp_release jsou čisté, testovatelné funkce oddělené od HTTP kódu

@knotekt knotekt merged commit 1ab11fb into main May 29, 2026
5 of 6 checks passed
@knotekt knotekt deleted the alaxe/444b7654-4355-42aa-a500-7ba272132a74 branch May 29, 2026 08:43
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.

Configurator doesn't filter releases

2 participants