Skip to content

checkpoint NDJSON: match real Sprites {type, data, time} shape - #8

Merged
lex00 merged 3 commits into
mainfrom
sprites-ndjson-shape
Jul 12, 2026
Merged

checkpoint NDJSON: match real Sprites {type, data, time} shape#8
lex00 merged 3 commits into
mainfrom
sprites-ndjson-shape

Conversation

@lex00

@lex00 lex00 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

What

Real api.sprites.dev streams checkpoint create/restore progress as {"type","data","time"} NDJSON lines with no structured id field — the version id rides in the message text ( ID: v1, Checkpoint v1 created successfully). spritzer emitted the older {event, message, id} shape, so a client that faithfully mines the id from the text got nothing back from the emulator.

Changes

  • progressEvent is now {type, data, time}; create and restore emit the real message lines, stamped with the server clock.
  • Test helper mines the id from the message text (mirroring a real client).

Validation

  • go build, go vet, go test ./... all pass.
  • Ran the binary and diffed the wire output against api.sprites.dev — faithful on the id-bearing lines:
    {"type":"info","data":"Creating checkpoint...","time":...}
    {"type":"info","data":"Checkpoint created successfully",...}
    {"type":"info","data":"  ID: v1",...}
    {"type":"info","data":"  Path: checkpoints/v1",...}
    {"type":"complete","data":"Checkpoint v1 created successfully",...}
    

Downstream: the chant temporal lexicon's parseCheckpointNdjson already reads the id from this text, verified against live Sprites.

lex00 and others added 3 commits July 11, 2026 23:10
Real api.sprites.dev streams checkpoint create/restore progress as
`{"type","data","time"}` lines with no structured id field — the version id
rides in the message text ("  ID: v1", "Checkpoint v1 created successfully").
spritzer emitted the older `{event, message, id}` shape, so a faithful client
reading the id from the text got nothing from the emulator.

Emit the real shape from both the create and restore endpoints, stamped with
the server clock. Verified byte-for-byte on the id-bearing lines against
api.sprites.dev. The chant temporal lexicon's parseCheckpointNdjson already
mines the id from this text.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match the emulator's create/restore streams to real Sprites (id carried in the
message text, not a structured field).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit 53c9038 into main Jul 12, 2026
2 checks passed
@lex00
lex00 deleted the sprites-ndjson-shape branch July 12, 2026 05:12
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