-
Notifications
You must be signed in to change notification settings - Fork 20
fix(cas): fall back from unwritable installation pools (backport of #349) #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bobtista
merged 1 commit into
release/alpha-4
from
backport/cas-pool-writable-fallback-alpha-4
Aug 3, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
GenHub/GenHub.Core/Interfaces/Common/IStorageWritabilityProbe.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| namespace GenHub.Core.Interfaces.Common; | ||
|
|
||
| /// <summary> | ||
| /// Determines whether GenHub can create storage at a filesystem location. | ||
| /// </summary> | ||
| public interface IStorageWritabilityProbe | ||
| { | ||
| /// <summary> | ||
| /// Checks whether a directory can be created at, or files written into, the given path. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// A successful check creates the storage directory when it does not already exist and leaves | ||
| /// that directory in place. Callers should account for this filesystem side effect. | ||
| /// </remarks> | ||
| /// <param name="storagePath">The storage path to check.</param> | ||
| /// <returns><c>true</c> when the location accepts writes; otherwise, <c>false</c>.</returns> | ||
| bool CanCreateStorageAt(string storagePath); | ||
|
|
||
| /// <summary> | ||
| /// Discards any cached result for a storage path so the next check probes the filesystem again. | ||
| /// </summary> | ||
| /// <param name="storagePath">The storage path to re-probe, or <c>null</c> to discard every cached result.</param> | ||
| void Invalidate(string? storagePath = null); | ||
| } |
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
19 changes: 19 additions & 0 deletions
19
GenHub/GenHub.Core/Interfaces/Storage/IInstallationCasPoolService.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using GenHub.Core.Models.GameInstallations; | ||
|
|
||
| namespace GenHub.Core.Interfaces.Storage; | ||
|
|
||
| /// <summary> | ||
| /// Selects and persists an effective installation CAS pool from detected installations. | ||
| /// </summary> | ||
| public interface IInstallationCasPoolService | ||
| { | ||
| /// <summary> | ||
| /// Ensures installation-pool settings reflect the currently detected installations. | ||
| /// </summary> | ||
| /// <param name="installations">The detected game installations.</param> | ||
| /// <param name="cancellationToken">A token that can cancel the settings update.</param> | ||
| /// <returns><c>true</c> when content acquisition may continue; otherwise, <c>false</c>.</returns> | ||
| Task<bool> EnsurePoolPathAsync( | ||
| IReadOnlyList<GameInstallation> installations, | ||
| CancellationToken cancellationToken = default); | ||
| } |
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUGGESTION:
ClonethrowsNullReferenceExceptionif the list is null.If a persisted
CasConfigurationdeserializesLegacyInstallationPoolRootPathsas null (e.g. hand-edited or corrupted settings), the spread[.. LegacyInstallationPoolRootPaths]throws here, and the equivalent[.. userCasConfig.LegacyInstallationPoolRootPaths]inCasModule.csruns during startup options binding. Guard the spread.Reply with
@kilocode-bot fix itto have Kilo Code address this issue.