Expected behavior
Our app flags 404s on SOME static assets. It should just serve out all assets are equal.
Actual behavior
404 for some static assets.
System configuration
We see this while migrating a Rails 6.1 Sprockets 4.0.3 Ruby 3.0.x to upstream versions (7.0, 4.1, 3.1).
Example App (Reproduction) - THIS IS IMPORTANT YOUR ISSUE LIKELY WILL NOT BE RESOLVED WITHOUT THIS
https://github.com/econya/sprockets_digest_muncher
The issue only happens if a pseudo "digest" is stripped from an existing asset file, e.g. file-notadigestbutmatchesregexp.txt becomes file.txt (related commit: 53ce8d6).
If now, file.txt really exists, this conflict will somehow grow into a RouteNotFound.
See https://github.com/econya/sprockets_digest_muncher for easy reproducible instructions (its a vanilla rails 7.0.1 app without any modifications, see commits)
Btw, the code references fingerprint and digest - I assume its the same? Also, the regexp differ, not sure if they should and if it doesnt make sense to move it into a constant.
It did not fail us earlier because our filenames contain letters outside of [a-f] ...