Skip to content

Real Sprites API surface: server-versioned checkpoints + restore-by-id (v0.2.0) - #6

Merged
lex00 merged 1 commit into
mainfrom
feat/real-api-v0.2.0
Jul 12, 2026
Merged

Real Sprites API surface: server-versioned checkpoints + restore-by-id (v0.2.0)#6
lex00 merged 1 commit into
mainfrom
feat/real-api-v0.2.0

Conversation

@lex00

@lex00 lex00 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Corrects the checkpoint/restore surface to match the confirmed real Sprites API. The v0.1.0 provisional surface used caller labels + a body-based restore; the real API assigns version ids and restores by id in the path.

Changes

  • Checkpoints are server-assigned version ids (v1, v2, …); create body is { comment? }, response { id }.
  • New GET /v1/sprites/{id}/checkpoints{ checkpoints: [{ id, comment }] }.
  • Restore moved to POST /v1/sprites/{id}/checkpoints/{id}/restore (id in path); the old POST /v1/sprites/{name}/restore is removed.
  • Health implemented list + docs updated. Exec REST response unchanged (WSS is the real primary; this REST shape stays a documented TODO(confirm)).

Verify

go build/vet/test/-race green; golangci-lint v2.12.2 0 issues. Live loop: checkpoint → {"id":"v1"}, list → [{"id":"v1","comment":"pre-run"}], ./risky.sh corrupts, POST .../checkpoints/v1/restore rewinds the fs.

Cuts as v0.2.0.

🤖 Generated with Claude Code

…0.2.0)

The provisional v0.1.0 surface treated the caller's label as the checkpoint
id. The real Sprites API assigns the id (v1, v2, …) and the caller controls
only an optional comment. This corrects the emulator to match.

- Checkpoints are now an ordered list of {id, comment, fs} with sequential
  server-assigned v<N> ids; create body is {comment?}, response is {id}.
- New GET /v1/sprites/{name}/checkpoints lists {id, comment} in creation order.
- Restore moves to POST /v1/sprites/{name}/checkpoints/{id}/restore (id in the
  path, empty body); the old top-level /restore route is removed.
- GET view exposes checkpoints as [{id, comment}]; health lists the new paths.
- exec REST response shape kept unchanged, flagged provisional (TODO(confirm)):
  real exec is WebSocket-primary and the REST shape is not published.

Tests, docs, and CHANGELOG updated to the new id-based surface.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit 056f743 into main Jul 12, 2026
2 checks passed
@lex00
lex00 deleted the feat/real-api-v0.2.0 branch July 12, 2026 00:01
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