checkpoint NDJSON: match real Sprites {type, data, time} shape - #8
Merged
Conversation
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>
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.
What
Real
api.sprites.devstreams 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
progressEventis now{type, data, time}; create and restore emit the real message lines, stamped with the server clock.Validation
go build,go vet,go test ./...all pass.api.sprites.dev— faithful on the id-bearing lines:Downstream: the chant temporal lexicon's
parseCheckpointNdjsonalready reads the id from this text, verified against live Sprites.