Fix missing guns on gear page caused by CDN-poisoned manifest shards - #619
Merged
Conversation
Cloudflare cached April-era inventoryitem shards 4-7 under the current ?v= URL during the June 10 deploy: requests arrived mid-rsync while the origin still had the old files, and the 30-day max-age locked the stale mix in place. Any item landing in shards 4-7 of the new manifest (e.g. Someday, hash 3232203524) failed getInventoryItem and was dropped from the gear page. Clients also persisted the bad mix into IndexedDB keyed by manifest version. - Suffix package.json "manifest" with -r2 so clients fetch fresh URLs (new Cloudflare cache key) and re-download into a fresh IndexedDB key; the value is only ever used as a cache key - Deploy in two rsync phases (assets first, index.html + --delete second) so clients can never request new ?v= URLs before the files behind them are fully uploaded - Document new-workspace setup (npm install, manifest:fetch) and the manifest:fetch clobber gotcha in CLAUDE.md Co-Authored-By: Claude Fable 5 <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.
Bug
Weapons added since April (e.g. Someday, hash 3232203524) don't load on the gear page. The parser logs
Skipping - no desc: <hash>because the hash is missing from the assembled InventoryItem manifest table.Root cause
Production serves a mixed-generation set of InventoryItem shards:
During the June 10 10:53 UTC deploy, Cloudflare received requests for the new
?v=244019.26.05.29...asset URLs at 10:55:03 — mid-rsync. Shards 0–3 had already been replaced on the origin; 4–7 hadn't, so Cloudflare cached the April files (originlast-modified: 15 Apr 2026) under the new URLs withmax-age=2592000(expires July 10). The origin itself is correct — verified by fetching shard 4 with a cache-busting query param (returns the proper 4,862-item file,last-modifiedJune 10)."Someday" lands in shard 5 of the new manifest, so it (and roughly half of the ~5,500 entries added since April) resolves to
undefinedand gets dropped. Affected browsers also persisted the bad mix into IndexedDB keyed by the manifest version, so a CDN purge alone wouldn't heal them.Fix
manifestwith-r2(and bump version to 32.0.2). The value is only used as a cache key (URL?v=+ IndexedDB key, never compared to Bungie's real version), so all clients fetch fresh URLs that miss the poisoned Cloudflare entries and re-download into a fresh IDB key. Note:manifest:fetchrewrites this field when it downloads a new manifest, which is fine — any new Bungie version also changes the key.index.htmlfirst (no--delete), then a full pass that flipsindex.htmland prunes. Clients can never learn the new?v=URLs before the files behind them are fully uploaded, so this race can't poison the CDN again.npm install,npm run manifest:fetch) and themanifest:fetchclobber gotcha.Verification
npm run test:cipasses (259/259)Optional follow-up (outside repo): purge
assets/destiny2-inventoryitem-*in Cloudflare to also fix users still on the old app bundle immediately.🤖 Generated with Claude Code