Skip to content

Tidy the index fetcher - #75

Merged
MrJeranimo merged 3 commits into
mainfrom
fetcher-followup
Sep 3, 2026
Merged

Tidy the index fetcher#75
MrJeranimo merged 3 commits into
mainfrom
fetcher-followup

Conversation

@Maximilian-Nesslauer

Copy link
Copy Markdown
Member

snapshot_version was read as a uint to keep negatives out and then cast back to int, and the cast wraps for anything above int.MaxValue, so the value came out negative and passed the ceiling:

snapshot_version = 3000000000  ->  (int) = -1294967296  ->  accepted, cached copy replaced
snapshot_version = 4294967295  ->  (int) =          -1  ->  accepted, cached copy replaced

The rest:

  • SnapshotVersions.Highest replaces the hardcoded 1 and its two "change this later" comments. Useful for Read the index snapshot as a mod source #44
  • The body is already in memory, so it is parsed directly instead of through an undisposed MemoryStream, which also lets the check stop being async.
  • out _ for the three properties that are only checked for presence.
  • <GenerateAssemblyInfo>false</GenerateAssemblyInfo> comes back out of Borea.Storage.Tests. The duplicate attributes it was aimed at come from the fixture projects sitting inside the test project folder, and the Compile Remove on Fixtures\** from Read the installed game version from KSA.dll #57 already answers that. I removed the flag with both fixture obj/**/*.AssemblyInfo.cs files on disk.

- A value above int.MaxValue wrapped negative and passed the ceiling.
- Parse the body directly, so the check needs no cast, catch or await.
@Maximilian-Nesslauer Maximilian-Nesslauer added area:core Borea.Core, the domain model area:network Borea.Network, SpaceDock and other sources labels Sep 3, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Borea Sep 3, 2026
@Maximilian-Nesslauer Maximilian-Nesslauer moved this from Backlog to In review in Borea Sep 3, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 33807543850

Coverage increased (+0.004%) to 92.599%

Details

  • Coverage increased (+0.004%) from the base build.
  • Patch coverage: 13 of 13 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2147
Covered Lines: 2051
Line Coverage: 95.53%
Relevant Branches: 1096
Covered Branches: 952
Branch Coverage: 86.86%
Branches in Coverage %: Yes
Coverage Strength: 57.95 hits per line

💛 - Coveralls

@MrJeranimo MrJeranimo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for catching the things I missed

@MrJeranimo
MrJeranimo merged commit f0decb2 into main Sep 3, 2026
10 checks passed
@MrJeranimo
MrJeranimo deleted the fetcher-followup branch September 3, 2026 22:01
@github-project-automation github-project-automation Bot moved this from In review to Done in Borea Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core Borea.Core, the domain model area:network Borea.Network, SpaceDock and other sources

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants