Skip to content

docs: Reconcile Fly Machines tutorial + fly-reconcile example (#868) - #872

Merged
lex00 merged 2 commits into
mainfrom
docs/868-fly-reconcile
Jul 14, 2026
Merged

docs: Reconcile Fly Machines tutorial + fly-reconcile example (#868)#872
lex00 merged 2 commits into
mainfrom
docs/868-fly-reconcile

Conversation

@lex00

@lex00 lex00 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes #868.

Adds the fly-reconcile example + the Reconcile Fly Machines tutorial — chant's differentiator on Fly, a stateless reconcile with no state file.

What

  • examples/fly-reconcile — one app, a volume, and two machines (web mounts the volume), op is Build → Apply against a running mudflaps (no boot/teardown), so state persists across runs.
  • tutorials/fly-machines-reconcile.mdx — walks the reconcile: create → no-op re-apply → in-place update → owned-only prune, and a machine created outside chant (no managed-by marker) surviving the prune.
  • Registered in the Fly tutorials sidebar group (after local-fly); a compile test asserts the volume create body + web's mount.

Emulator fix landed alongside

Building this surfaced a real mudflaps gap: a mounted machine read back config.mounts: null, so it re-applied forever. Fixed in mudflaps 0.4.1 (INTENTIUS/mudflaps#60, closes mudflaps#59) — MachineConfig now persists/echoes mounts. This PR bumps MUDFLAPS_IMAGE to 0.4.1.

Verified end-to-end

Against ghcr.io/intentius/mudflaps:0.4.1: create (app + volume + web + worker) → re-apply is a clean no-op for all resources, including the mounted web (previously perpetual "updated") → edit image → update → remove worker → prune → an unmanaged legacy machine survives. Docs build clean; compile tests pass.

Second of the Fly tutorial batch under #736 (after #867).

🤖 Generated with Claude Code

lex00 added 2 commits July 13, 2026 22:31
Adds examples/fly-reconcile — one app + two machines whose op reconciles against
a *running* mudflaps (Build → Apply only, no boot/teardown), so re-runs show the
stateless reconcile flyApply does: create → no-op → in-place update → owned-only
prune, with a machine created outside chant surviving the prune (no managed-by
marker). Plus tutorials/fly-machines-reconcile.mdx and a compile test.

Registered in the Fly tutorials sidebar group after local-fly.

Scope note: the example is machines-only. Adding a Volume with a mount hits a
mudflaps fidelity gap — a mounted machine reads back config.mounts=null, so it
perpetually re-applies against the emulator (INTENTIUS/mudflaps#59). The
volume+mount enrichment is deferred to that fix; machines alone give a clean
offline no-op.

Verified: docs build clean; the full reconcile sequence (create/no-op/update/
prune/foreign-survives) runs green against ghcr.io/intentius/mudflaps:0.4.0;
examples compile tests pass.
…s mounts (#868, #59)

mudflaps 0.4.1 (INTENTIUS/mudflaps#60) persists machine config.mounts, so a
mounting machine no-ops on re-apply. Enrich the reconcile example/tutorial:

- bump SPRITZER... no: bump MUDFLAPS_IMAGE to 0.4.1.
- add a Volume + a web mount back to fly-reconcile/src/infra.ts; the compile test
  asserts the volume create body + web's mount.
- tutorial + README show the volume in create/no-op output and the image 0.4.1.

Verified end-to-end against ghcr.io/intentius/mudflaps:0.4.1: create (app +
volume + web + worker) → re-apply is a clean no-op for ALL resources, including
the mounted web (previously it re-applied forever). Docs build clean; compile
tests pass.
@lex00
lex00 merged commit 4326b23 into main Jul 14, 2026
5 of 6 checks passed
@lex00
lex00 deleted the docs/868-fly-reconcile branch August 3, 2026 19:20
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.

docs: Fly Machines stateless reconcile tutorial — drift, update, owned-only prune (mudflaps)

1 participant