Skip to content

Fly fidelity: spec-drift + emulator freshness for Machines/mudflaps and Sprites/spritzer #808

Closed

Description

@lex00

Context

The fly lexicon now owns both Fly APIs and both emulators (Sprites moved in via #807): Machines (flaps) ↔ mudflaps, and Sprites ↔ spritzer. Today nothing detects when either upstream API drifts, and the emulator image pins are scattered string literals. This tracks closing those fidelity gaps.

Two upstream APIs, asymmetric: the Machines API serves a live OpenAPI (docs.machines.dev/openapi.json, ~104KB); the Sprites API (api.sprites.dev) serves no machine-readable spec at any conventional path. So only Machines gets spec-diff automation; Sprites needs a hand-authored contract.

T1 — Add fly to the rolling-upgrade matrix (Machines drift)

fly's upstream spec is unversioned (live endpoint, no constant to pin), so it fits the rolling path exactly like aws/azure/github — not the pinned path.

  • Extend RollingLexicon (packages/core/src/codegen/rolling-upgrade.ts, currently "aws" | "azure" | "github") and detectLexicon to include fly.
  • Add fly to the lexicon-upgrade.yml matrix (currently k8s, gcp, docker, gitlab, aws, azure, github).
  • Ensure a committed surface.snapshot.json baseline exists for fly.

AC: a manual workflow_dispatch (report mode) of lexicon-upgrade runs fly-upgrade, regenerates from the live Machines OpenAPI, and reports the surface delta vs baseline; a real drift opens a review PR like the other rolling lexicons.

T2 — Single-source + freshness-check the emulator pins

The tags are scattered (ghcr.io/intentius/mudflaps:0.3.0 in 4 spots, ghcr.io/intentius/spritzer:0.3.0 in 3).

  • Collapse each to one exported constant in the fly lexicon.
  • Add a weekly check (Dependabot-style, or a small step) comparing the pinned tag against the latest GHCR release; surface "N releases behind" as a PR/notice, never an auto-merge.

AC: each emulator tag has a single source of truth; a behind-pin surfaces as a reviewable notice; the pin is not floated.

T3 — Hand-authored Sprites contract snapshot

Sprites ships no OpenAPI, but the contract is small and enumerable — the endpoints the fly sprite activities hit: POST /v1/sprites, GET /v1/sprites, POST /v1/sprites/{id}/checkpoint, GET /v1/sprites/{id}/checkpoints, POST /v1/sprites/{id}/checkpoints/{cp}/restore, DELETE /v1/sprites/{id}, WS /v1/sprites/{id}/exec.

  • Commit a hand-authored contract snapshot (the endpoint set + shapes the fly sprite activities depend on).
  • Add a check that the endpoints the activities use are a subset of what the pinned spritzer serves (spritzer enumerates implemented paths at /_spritzer/health; mudflaps at /_mudflaps/health).

AC: a drift in the sprite activities' endpoint set vs the committed contract fails a check; the spritzer emulator's implemented-paths cover the activities' endpoint set.

Policy (decided)

Emulator tag bumps ride the consuming lexicon's need (failing integration test after a T1 regen, or a T2 freshness notice), never the emulator's release alone. For new upstream surface the emulator leads, then fly bumps the tag to match.

Lineage: builds on the lexicon self-upgrade epic (#523/#525/#526) and the Sprites-into-fly move (#807).

Activity

  1. lex00 commented on Jul 12, 2026

    @lex00
    ContributorAuthor

    All tiers landed:

    Fidelity now covers fly/mudflaps (Machines spec drift + emulator freshness) and Sprites/spritzer (contract + coverage + freshness). Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions