Repository navigation
fly: Machines contract + mudflaps coverage check (parity with Sprites/spritzer) - #819
Merged
Merged
Conversation
…/spritzer) spritzer got a contract ⊆ implemented-paths coverage check in #808 T3; mudflaps had no equivalent even though it carries roadmap endpoints (machines/{id}/signal, /exec, /ps) that answer 501. Add the mudflaps twin. - machines-contract.ts: MACHINES_CONTRACT — the 22 flaps endpoints flyApply calls (apps, machines, leases, wait, volumes, ip_assignments, certificates, secrets), with a param-normalizing helper. - machines-contract.test.ts (CI): covers the applier's resource ops, well-formed methods/paths, and — the drift anchor — every contract path segment appears in fly-apply.ts, so a changed applier endpoint forces a contract update. - machines-contract.docker.integration.test.ts (docker-gated): boots the pinned mudflaps, reads /_mudflaps/health, asserts the contract ⊆ implemented AND that flyApply depends on none of mudflaps' roadmap (501) endpoints. Verified live against the pinned mudflaps image: full coverage, no roadmap dependency. Note: mudflaps' README is stale — it lists volumes/secrets/certs/IP as 501, but the code now implements them; only signal/exec/ps remain roadmap.
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.
Why
spritzer got a
contract ⊆ implemented-pathscoverage check in #808 T3. mudflaps had no equivalent — even though it carries roadmap endpoints (machines/{id}/signal,/exec,/ps) that answer501. This adds the mudflaps twin so both emulators have a parallel, roadmap-aware coverage check.Surfaced from the question "does mudflaps still have roadmap items?" — yes, three; and its README is stale, still listing volumes/secrets/certs/IP as 501 when the code now implements them.
What
machines-contract.ts—MACHINES_CONTRACT: the 22 flaps endpointsflyApplycalls (apps, machines, leases, wait, volumes, ip_assignments, certificates, secrets), derived fromfly-apply.ts's URL builders +http()method pairings.machines-contract.test.ts(CI): covers the applier's resource ops, well-formed methods/paths, and a drift anchor — every contract path segment must appear infly-apply.ts.machines-contract.docker.integration.test.ts(docker-gated,FLY_DOCKER=1): boots the pinned mudflaps, reads/_mudflaps/health, assertscontract ⊆ implementedand thatflyApplydepends on none of mudflaps' roadmap (501) endpoints.Validation
Both Fly emulators now have the symmetric check: Sprites ⊆ spritzer (#815) and Machines ⊆ mudflaps (this).