Skip to content

Server: Find asset files through one function, first data path winning - #387

Merged
lehni merged 1 commit into
mainfrom
fix/overlapping-asset-paths-storage
Oct 17, 2026
Merged

lehni merged 1 commit into
mainfrom
fix/overlapping-asset-paths-storage

Conversation

@lehni

@lehni lehni commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #385, which was merged before these review fixes were pushed.

  • Model._getAssetFiles() walks a record's asset files location by location, and the first declared data path wins. The counts on writes, getAssetReferences(), loading (_forEachAssetFile()) and signing (_mapAssetFiles()) all use it, so the ownership rule exists in one place instead of two.
  • Loaded files at places that overlapping data paths reach get the first path's storage. Before, the last one won, contrary to what Server: Count each asset location once with overlapping data paths #385's changelog and docs say.
  • Arrays nested inside file arrays ([a, [b]]) were walked recursively when loading. Now only one level is, as counts and references already did. Asset schemas can't produce nested arrays.
  • Tests: overlapping data paths on the same storage (counts, references, recount), and the storage of loaded files. The changelog entry of Server: Count each asset location once with overlapping data paths #385 is updated.

@lehni
lehni force-pushed the fix/overlapping-asset-paths-storage branch 3 times, most recently from 1ee4b27 to 66082d7 Compare October 17, 2026 12:03
- Walk a record's asset files location by location in _getAssetFiles(),
  used for counts, references, loading and signing
- Load files that overlapping data paths reach with the first path's
  storage, where the last one won
- Test overlapping data paths on the same storage
- Test loading and signing through real models instead of fake ones
@lehni
lehni force-pushed the fix/overlapping-asset-paths-storage branch from 66082d7 to e927e77 Compare October 17, 2026 12:10
@lehni
lehni merged commit 0a6f61a into main Oct 17, 2026
8 checks passed
@lehni
lehni deleted the fix/overlapping-asset-paths-storage branch October 17, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant