Skip to content

0.3.1: keep an avatar URL's query on every request - #1

Merged
snakajima merged 2 commits into
mainfrom
fix/url-query
Oct 6, 2026
Merged

snakajima merged 2 commits into
mainfrom
fix/url-query

Conversation

@snakajima

Copy link
Copy Markdown
Contributor

Summary

  • loadAvatar() with a URL that has a query used to lose it. .../ani/avatar.json?v=1 fetched the package's other files without ?v=1, and .../ani?v=1 became the broken folder .../ani?v=1/.
  • The package folder now comes from the URL's path, and the query (for example a version or a signature) is sent with every request. Cache locations and the inside-the-folder check use the URL without the query.
  • Version 0.3.1.

Found in review of receptron/mulmocast-cli#1598, whose cache stamp now keeps the query the same way.

Test plan

  • New test: avatar.json?v=1 loads the same assets as from disk, and every request carries v=1; a folder URL with ?v=2 works the same way
  • npm run lint, npm run typecheck, npm test (57 tests)

🤖 Generated with Claude Code

work in mesh-avatar-studio

snakajima and others added 2 commits October 6, 2026 04:24
loadAvatar("https://host/ani/avatar.json?v=1") used to drop the query from the package's other
files, and a folder URL with a query became ".../ani?v=1/". The package folder now comes from the
URL's path, and the query (a version, a signature) is sent with every request. Found in review of
receptron/mulmocast-cli#1598.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Images cached for ?v=1 were reused for ?v=2; the query is now part of the cache identity. A
manifest asset with its own query (rig.json?token=abc) keeps it; the source's query is added only
to files without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
snakajima added a commit to receptron/mulmocast-cli that referenced this pull request Oct 6, 2026
The source's query is added only to files without one, as avatarscript 0.3.1 does
(receptron/avatarscript#1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snakajima

Copy link
Copy Markdown
Contributor Author

Codex review (codex exec review --base main):

  • [P2] Images cached for ?v=1 were reused for ?v=2. Fixed in d7225da: the source's query is part of the image cache identity.
  • [P2] An asset's own query (for example rig.json?token=abc) was overwritten. Fixed in d7225da: the source's query is added only to files without a query of their own.

Tests were added for both. A second Codex review found no actionable issues. The same asset-query rule was applied to receptron/mulmocast-cli#1598's cache stamp.

@snakajima
snakajima merged commit f54a274 into main Oct 6, 2026
7 checks passed
@snakajima
snakajima deleted the fix/url-query branch October 6, 2026 12:09
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