Repository navigation
Serve /version.json on the API host - #4
Merged
Merged
Conversation
GET /version.json on play.<base> answers {"version": "<arcade.__version__>"}
with Content-Type: application/json and Cache-Control: no-store, so a deploy
can be verified by the version it reports. Game hosts never answer it, so a
static game's own /version.json is not shadowed.
Co-Authored-By: Claude Opus 5.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.
Summary
GET /version.jsonis added to the API host (play.<base>). It answers{"version": "<arcade.__version__>"}withContent-Type: application/jsonandCache-Control: no-store, needs no token, and lets a deploy be verified by the version it reports.The route is deliberately limited to the API host. On a game's host (
<slug>.play.<base>or an alias)/version.jsonremains the game's own path, so a static game that ships aversion.jsonis still served it and nothing is shadowed. Unknown hosts, the internal host and tak game hosts answer 404 as before.Changes
src/arcade/server.py:_version()on the API host.tests/test_server.py: status, content type, cache header and body ==arcade.__version__(GET and HEAD); a static game's own/version.jsonstill served on its host; 404 on tak game, alias, unknown and bare hosts.Unreleased).Verification
python -m pytest: 129 passed.python3 -m arcade servewith the example registry):The same path with
Host: tidewater.play.danielstephenson.devanswered 404. The Docker image was not built locally (no Docker in the sandbox); the CIdockerjob covers it.drafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code