-
Notifications
You must be signed in to change notification settings - Fork 20
feat(gameprofiles): enable runtime content hot-swapping for active game sessions #375
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
Open
undead2146
wants to merge
44
commits into
community-outpost:development
Choose a base branch
from
undead2146:feat/content-hotswap
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
bc0f001
feat(gameprofiles): enable runtime content hot-swapping for active ga…
undead2146 d265e07
fix: address review feedback for runtime hotswap and user data integrity
undead2146 11ba704
fix: atomic live sync before profile update and block removal when ac…
undead2146 22647cd
fix: roll back live synchronization if profile persistence fails
undead2146 df45273
fix: report missing original manifests on rollback and record rollbac…
undead2146 a3f66f1
fix(userdata,gameprofiles): handle CAS materialization exceptions, us…
undead2146 b6e4311
fix(reconciliation): guard manifest removal on failed profiles, hoist…
undead2146 a6366f4
fix(ui): add edit pencil and action buttons to running profile card o…
undead2146 2fcf6a8
fix(userdata): return failure when live user data activation fails in…
undead2146 7c7d7f5
fix(userdata): enable patch hotswapping, deactivate lingering profile…
undead2146 1a03ba7
fix(userdata): restore previous live content and guard FirstError whe…
undead2146 116885c
fix(gameprofiles): prevent redundant game installation auto-resolve a…
undead2146 0f3267f
refactor(gameprofiles): use helper for installation dependency check …
undead2146 ea53217
fix(hotswap): address review comments across linker rollback, classif…
undead2146 bbd7cc1
fix(userdata): check return results of install and uninstall in Profi…
undead2146 77733e2
fix(userdata): rollback partial installations and uninstalls during l…
undead2146 9124914
fix(hotswap): serialize user-data sync per game and gate hotswap by m…
undead2146 675ffec
fix(gameprofiles): use CurrentProfileId in rollback log and fix style…
undead2146 ce881ee
fix(deepsource): resolve all 38 C# code review findings and rebase on…
undead2146 add1750
fix(test): resolve launcher harness timeout and remove redundant asyn…
undead2146 ceec442
test(userdata): mock CopyFromCasAsync in exception restoration test
undead2146 dc8f35b
fix(review): address review feedback and CI check findings
a349f73
fix(review): address Kilo Code review suggestions and strengthen test…
7f641e8
refactor(profiles): merge nested if conditions for game client valida…
7edc10c
fix(review): address review comments across linker, viewmodel, and tests
306d70e
refactor(profiles): decompose running profile validation into focused…
9279cd2
fix(review): resolve rebase conflicts and update review resolution in…
undead2146 01290aa
fix(workspace): guard IsHotswappable against manifests with unresolva…
undead2146 83a084b
feat(content): configure patch content to target userdata and allow h…
undead2146 b076871
fix(review): resolve 29 SonarCloud static analysis issues and update …
undead2146 942d349
fix(review): resolve remaining static analysis issues and refactor us…
undead2146 192c9ea
fix(content): route patch content to workspace, lock patches by defau…
undead2146 10a08f7
fix(userdata): ensure cleanup preserves restored original files on de…
undead2146 9501b93
fix(launching): fallback to launch attempt timestamp for short-lived …
undead2146 82e9ec6
fix(hotswap): address review feedback on live sync, launcher, setting…
undead2146 432c208
refactor(gameprofiles): simplify hotswap state refresh and reduce cog…
undead2146 ee386d2
fix(gameprofiles): remove redundant null-forgiving operator in profil…
undead2146 d78204d
fix(ui): backport PR 400 glassmorphic styling and vector icons withou…
undead2146 f6a72c9
fix(deliverer): use OpenArchive for SharpCompress 0.48.0 compatibility
undead2146 da31e50
fix(ui): address Kilo and CodeRabbit review findings and restore sema…
undead2146 59e427e
fix(ui): backport PR #400 translucent glass styling for Profile Setti…
undead2146 9e73a19
fix(reconciliation,userdata): fail bulk removal on blocked manifests …
undead2146 1666a52
fix(github,ui,wizard): resolve setup wizard cursor, info changelog ra…
undead2146 317bca6
refactor(github,update): simplify null check patterns and lambda expr…
undead2146 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
75 changes: 75 additions & 0 deletions
75
GenHub/GenHub.Core/Models/Workspace/ContentHotswapClassification.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,75 @@ | ||
| using System.Linq; | ||
| using GenHub.Core.Models.Enums; | ||
| using GenHub.Core.Models.Manifest; | ||
|
|
||
| namespace GenHub.Core.Models.Workspace; | ||
|
|
||
| /// <summary> | ||
| /// Classifies content types based on whether they can be safely hot-swapped during an active game session. | ||
| /// Hotswappable content is deployed to the user Documents directory and read dynamically by the game engine. | ||
| /// Locked content modifies game process executables, BIG archives in the workspace, or memory-sensitive assets. | ||
| /// </summary> | ||
| public static class ContentHotswapClassification | ||
| { | ||
| /// <summary> | ||
| /// Determines whether the specified content type can be hot-swapped while the game is running. | ||
| /// </summary> | ||
| /// <param name="contentType">The content type to evaluate.</param> | ||
| /// <returns><c>true</c> if the content type is hotswappable; otherwise, <c>false</c>.</returns> | ||
| public static bool IsHotswappable(ContentType contentType) | ||
| { | ||
| return contentType switch | ||
| { | ||
| ContentType.Map => true, | ||
| ContentType.MapPack => true, | ||
| ContentType.Replay => true, | ||
| _ => false, | ||
| }; | ||
| } | ||
|
undead2146 marked this conversation as resolved.
|
||
|
|
||
| /// <summary> | ||
| /// Determines whether the specified manifest can be hot-swapped while the game is running. | ||
| /// </summary> | ||
| /// <param name="manifest">The manifest to evaluate.</param> | ||
| /// <returns><c>true</c> if the manifest is hotswappable; otherwise, <c>false</c>.</returns> | ||
| public static bool IsHotswappable(ContentManifest manifest) | ||
| { | ||
| ArgumentNullException.ThrowIfNull(manifest); | ||
|
|
||
| if (!IsHotswappable(manifest.ContentType)) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| var files = ManifestVariantResolver.ResolveFiles(manifest); | ||
| if (files.Count == 0 && (manifest.Variants.Count > 0 || manifest.Files.Count > 0)) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| return files.All(f => | ||
| f.InstallTarget != ContentInstallTarget.Workspace && | ||
| f.InstallTarget != ContentInstallTarget.System); | ||
| } | ||
|
undead2146 marked this conversation as resolved.
|
||
|
|
||
| /// <summary> | ||
| /// Determines whether the specified content type is locked and cannot be modified during an active game session. | ||
| /// </summary> | ||
| /// <param name="contentType">The content type to evaluate.</param> | ||
| /// <returns><c>true</c> if the content type is locked during active sessions; otherwise, <c>false</c>.</returns> | ||
| public static bool IsLocked(ContentType contentType) | ||
| { | ||
| return !IsHotswappable(contentType); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Determines whether the specified manifest is locked and cannot be modified during an active game session. | ||
| /// </summary> | ||
| /// <param name="manifest">The manifest to evaluate.</param> | ||
| /// <returns><c>true</c> if the manifest is locked during active sessions; otherwise, <c>false</c>.</returns> | ||
| public static bool IsLocked(ContentManifest manifest) | ||
| { | ||
| ArgumentNullException.ThrowIfNull(manifest); | ||
| return !IsHotswappable(manifest); | ||
| } | ||
| } | ||
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.
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.
Uh oh!
There was an error while loading. Please reload this page.