Support numbered prerelease updates - #8
Merged
Conversation
📝 WalkthroughWalkthroughThe project advances to ChangesVersioning and release flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubUpdateService
participant GitHubReleasesApi
participant NuGetVersion
GitHubUpdateService->>GitHubReleasesApi: Query stable or prerelease releases
GitHubReleasesApi-->>GitHubUpdateService: Return release JSON
GitHubUpdateService->>NuGetVersion: Parse and compare SemVer versions
NuGetVersion-->>GitHubUpdateService: Return release precedence
GitHubUpdateService-->>GitHubUpdateService: Select newer trusted release
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This comment was marked as resolved.
This comment was marked as resolved.
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.
Summary
4.0.1-beta.1so existing4.0.0-betainstalls can discover it.Release sequence
After the bridge release, prerelease iterations reuse the same numeric target and increment the prerelease identifier instead of consuming patch versions.
Validation
dotnet build RatScanner.sln -c Releasedotnet test RatScanner.sln -c Release --no-build --no-restore— 203 passedGitHubUpdateServiceTests— alpha/beta/RC/stable/build-metadata coveragedotnet csharpier check .scripts/lint-markdown.ps1scripts/test-agent-docs.ps1— 11/11 passedscripts/check-agent-docs.ps1git diff --checkConfidence Score: 5/5
Safe to merge — the update logic is correct, thoroughly tested, and stable installs are protected from accidentally receiving prerelease builds at both the app layer and the GitHub release metadata layer.
The core SelectUpdateRelease logic handles all meaningful combinations (stable→stable, prerelease→prerelease, prerelease→stable) correctly and is backed by 200+ passing tests including five new scenario tests covering the exact channel-isolation contract. The only gap worth watching is the missing symmetric guard in the workflow for the operator error of publishing a prerelease version string to the latest channel, but even there the app-level IsNewerVersion check prevents stable users from receiving unwanted updates.
release.yml around the channel validation logic — a symmetric guard for the latest+prerelease-version case would close the remaining operator foot-gun.
Important Files Changed
Sequence Diagram
sequenceDiagram participant App as RatScanner App participant US as GitHubUpdateService participant GH as GitHub API App->>US: TryGetLatestReleaseAsync() US->>US: TryParseSemanticVersion(RatConfig.Version) alt current version is pre-release US->>GH: "GET /releases?per_page=100" GH-->>US: JSON array of all releases US->>US: "SelectUpdateRelease(includePrereleases=true)" US->>US: "Filter: draft=false, stable+prerelease allowed" US->>US: IsNewerVersion() — allows pre-release→pre-release and pre-release→stable US->>US: OrderByDescending(SemVer), pick highest else current version is stable US->>GH: GET /releases/latest GH-->>US: JSON object — latest non-draft non-prerelease release US->>US: "SelectUpdateRelease(includePrereleases=false)" US->>US: "Filter: draft=false, prerelease=false only" US->>US: IsNewerVersion() — blocks pre-release onto stable end US-->>App: LatestRelease? (or null) alt update available App->>US: TryApplyUpdate(release) US->>GH: Download RatScanner.zip (redirect-validated) US->>US: Extract, validate RatScanner.exe present US->>App: Spawn apply-update.ps1, return true App->>App: Exit endReviews (4): Last reviewed commit: "fix: address follow-up review findings" | Re-trigger Greptile
Context used: