Skip to content

refactor(files_sharing): clarify failed shared-storage cache handling#62485

Draft
joshtrichards wants to merge 1 commit into
masterfrom
jtr/refactor-fileSharing-failure-handling
Draft

refactor(files_sharing): clarify failed shared-storage cache handling#62485
joshtrichards wants to merge 1 commit into
masterfrom
jtr/refactor-fileSharing-failure-handling

Conversation

@joshtrichards

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Failed shared storage uses FailedCache’s synthetic root entry and is denied through normal permission checks.

This change acknowledges that ICache::get() can return false, caches that result, and makes isValid() explicitly deny access in that case. This prevents a cache miss from becoming a method call on false, while documenting why the normal FailedStorage path remains safe.

Changes:

  • Make source-root cache-entry handling explicit when a cache lookup returns false.
  • Reuse the cache installed during failed storage initialization.
  • Replace the missing-source test setup with a deterministic mocked getById() miss.
  • Verify missing-source shares are inaccessible without errors.

Depends on/related to: PR #62484

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: Copilot:GPT-5.6

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added 2. developing Work in progress feature: sharing feature: filesystem ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress AI assisted feature: filesystem feature: sharing ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants