Repository navigation
fly: hand-authored Sprites API contract + emulator-coverage check - #815
Merged
Merged
Conversation
… T3)
The Fly Machines API ships an OpenAPI the fly surface drift-checks against; the
Sprites API (api.sprites.dev) ships none. This adds the manual stand-in: the
exact endpoint set the fly sprite activities depend on, maintained by hand.
- sprites-contract.ts: SPRITES_CONTRACT (6 endpoints, one per sprite activity)
with param-name-normalizing helpers. Provenance + bump policy documented.
- sprites-contract.test.ts (CI): asserts the contract covers every sprite
activity, normalization maps WS→GET and {cp}≡{cid}, and — the drift anchor —
every contract path segment appears in the sprites.ts source, so a changed
activity endpoint forces a contract update in the same change.
- sprites-contract.docker.integration.test.ts (docker-gated): boots the pinned
spritzer, reads /_spritzer/health, and asserts the contract ⊆ implemented
paths — the real fidelity check, since spritzer tracks the live Sprites API.
Verified locally against the live spritzer image: contract fully covered.
This was referenced Jul 12, 2026
Closed
6 tasks
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.
Part of #808 (T3).
Why
The Fly Machines API ships an OpenAPI (
docs.machines.dev) the fly surface generates + drift-checks against (T1, #813). The Sprites API (api.sprites.dev) ships no machine-readable spec at any conventional path, so there's nothing to diff automatically. This adds the manual stand-in.What
sprites-contract.ts—SPRITES_CONTRACT: the exact 6 endpoints the fly sprite activities depend on (one per activity), plus normalizing helpers ({cp}≡{cid},WS→GET). Provenance (sprites.dev, no OpenAPI) and bump policy documented.sprites-contract.test.ts(runs in CI):sprites.tssource, so a changed activity endpoint forces a contract update in the same change.sprites-contract.docker.integration.test.ts(docker-gated): boots the pinned spritzer, reads/_spritzer/health, asserts contract ⊆ implemented paths — the real fidelity check, since spritzer tracks the live Sprites API. Skipped in CI unlessSPRITES_DOCKER=1(same gating as the other spritzer docker test).Validation
#808 status after this