Skip object store folder creation when no storage access - #9634
Merged
Martin-Molinero merged 1 commit intoJul 23, 2026
Conversation
LocalObjectStore.Initialize created the storage root directory unconditionally, before Controls were even assigned. On environments where the process lacks permission to the target path this threw an UnauthorizedAccessException even for jobs with no storage access at all. Now Controls are assigned first and the root directory is only created when StorageAccess is null or grants at least one of read/write/delete, matching the permission checks already guarding every disk operation. When access is fully denied the path is still normalized via Path.GetFullPath so later comparisons remain consistent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Description
LocalObjectStore.Initializecreated the storage root directory unconditionally, and did so beforeControlswere even assigned. On environments where the process lacks permission to the target path (e.g. a read-only/Storagemount), this threw anUnauthorizedAccessExceptionduring engine startup even for jobs that have no storage access at all:Changes
Controlsand_algorithmModebefore resolving the storage root.StorageAccessisnull(backwards-compatible default) or grants at least one of read/write/delete. This matches the permission checks that already guard every disk-touching operation (ContainsKey/ReadBytes/SaveBytes/Delete/enumeration), so when all permissions are false nothing ever reaches the folder.AlgorithmStorageRootis still normalized viaPath.GetFullPath(no filesystem write) so later path comparisons remain consistent with theFullName-normalized form used elsewhere.Related Issue
N/A