Skip to content

fly: Volume + IPAddress + Certificate + Secret resources (#741) - #754

Merged
lex00 merged 1 commit into
mainfrom
fly-breadth-741
Jul 11, 2026
Merged

lex00 merged 1 commit into
mainfrom
fly-breadth-741

Conversation

@lex00

@lex00 lex00 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Closes #741 (Phase 2 breadth). Extends the fly lexicon beyond App + Machine to the rest of the load-bearing flaps resources — generated types, serializer coverage, and applier handling. Builds on the merged spine (#737 generator, #738 serializer, #739 flyApply).

Generator

Widen the curated RESOURCES manifest:

typeName request schema response schema
Fly::Machines::IPAddress assignIPRequest IPAssignment
Fly::Machines::Certificate createAcmeCertificateRequest CertificateDetail
Fly::Machines::Secret SetAppSecretRequest AppSecret

Volume was already Core-3. generate → 41 resources.

Serializer

Emits { endpoint, method, body } for the four kinds with mudflaps-faithful field names (IP org_slug, volume size_gb/encrypted, cert hostname, secret value). Secret carries applyOnly: true (D7).

Applier

  • Ordering: volumes apply between apps and machines (machine config.mounts reference them); IPs/certs/secrets after.
  • App-scoped prune (D2): these types have no ownership metadata, so prune treats everything under a chant-managed app as owned — distinct from the managed-by: chant marker filter machines use. Keys: volume by name, cert by hostname, secret by name, IP by family.
  • Apply-only secrets (D7): a straight POST with no read-back; a secret never enters a drift/diff (mudflaps returns only a digest). Still prunable by name.

Tests

55 fly tests pass. Unit tests (injected FlyHttp) prove volume-before-machine ordering, app-scoped prune, and the no-read-back secret path. The live mudflaps integration test proves the acceptance loop end to end (volume applies before a mounting machine; IP + cert prune app-scoped; secret set never diffs) — runs locally, skips deterministically in CI. validate + check-lexicon Tier 1 clean.

Noted edge cases (scope-guarded, not expanded)

  • Dedicated IPs get server-random addresses, so re-apply/prune keys on IP family (shared_v4/v4/v6), not the address.
  • mudflaps' MachineConfig doesn't model config.mounts, so ordering is proven via on-the-wire POST order rather than mount persistence. (Modeling mounts is a mudflaps change, out of scope here.)

🤖 Generated with Claude Code

Extend the fly lexicon beyond App + Machine to the rest of the load-bearing
flaps resources — generated types, serializer coverage, and applier handling.

- Generator: widen the curated RESOURCES manifest with IPAddress
  (assignIPRequest), Certificate (createAcmeCertificateRequest), and Secret
  (SetAppSecretRequest); Volume was already Core-3. generate → 41 resources.
- Serializer: emit { endpoint, method, body } for the four kinds with
  mudflaps-faithful field names (IP org_slug, volume size_gb/encrypted, cert
  hostname, secret value). Secret carries applyOnly: true (D7).
- Applier: volumes apply BETWEEN apps and machines (machine config.mounts
  reference them); IPs/certs/secrets after. These types carry no ownership
  metadata, so prune is app-scoped (D2) — everything under a chant-managed app
  is owned — rather than the managed-by marker filter machines use. Secrets
  apply via a straight POST with no read-back and never enter a drift/diff (D7);
  still prunable by name.

Unit tests (injected FlyHttp) cover volume-before-machine ordering, app-scoped
prune, and the apply-only secret path. The live mudflaps integration test
proves the acceptance loop end to end (runs locally, skips in CI).
55 fly tests pass; validate + check-lexicon Tier 1 clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

fly lexicon: Volume + IPAddress + Certificate + Secret (apply-only) resources

1 participant