Add content hashes to asset URLs

Merged
HA
4mo ago
+299-8

Closes #6550.

Adds content-hash cache busting to rx.asset URLs by appending an 8-character SHA-256 query parameter based on the
asset file contents.

Example:
rx.asset("logo.svg") now returns /logo.svg?v=<hash>.

The hash changes only when the file content changes, allowing browsers to cache assets safely across deploys.

Implementation notes:

  • Applies to both local and shared assets.
  • Keeps AssetPathStr.importable_path unversioned so existing build-time import behavior is preserved.
  • Preserves backend-only behavior for missing local assets.
  • Adds regression coverage for hash changes and pickle/copy round trips.