Skip to content

fly: docs generation, pseudo-parameters, init templates (#770 partial) - #781

Merged
lex00 merged 1 commit into
mainfrom
fly-parity-770
Jul 11, 2026
Merged

lex00 merged 1 commit into
mainfrom
fly-parity-770

Conversation

@lex00

@lex00 lex00 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Closes three of the five parity gaps in #770. The chant import item is left as a separate follow-up (it can build on the describeResources from #767).

Docs generation

src/codegen/docs.ts had scaffold TODOs for serviceFromType/resourceTypeUrl. Implemented, plus the missing docs-cli entry. The fly docs site was a stub index.mdx; it now generates real pages (Overview, Resource Reference, Pseudo-parameters, Lint Rules, Serialization) with a sidebar, matching the aws/gcp/k8s sites — including the shared rehype-base-url base-path plugin the peers use.

Pseudo-parameters

Fly.Region / Fly.OrgSlug / Fly.AppName, mirroring gcp's GCP namespace. Wired via pseudoParameters() and resolved in the serializer from env vars (FLY_REGION / FLY_ORG / FLY_APP_NAME) with fallbacks, so new Machine({ region: Fly.Region }) serializes to the resolved value.

Init templates

initTemplates() with default (App + Machine), volume (App + Volume + mounted Machine), and service (public HTTPS service). Region uses Fly.Region so the template passes the FLY001 region rule.

Self-upgrade pin: N/A

fly's spec is an unversioned live URL (docs.machines.dev/openapi.json) — no version constant to bump, so no upstreamPin / #685 auto-bump applies (unlike gcp's KCC_VERSION). Recorded as a note in src/spec/fetch.ts.

Verification

101 fly tests pass; validate clean; check-lexicon Tier 1 unchanged, the two initTemplates Tier-2 checks flip to PASS. Docs generate with no TODO stubs.

🤖 Generated with Claude Code

Close three of the LexiconPlugin parity gaps between fly and the mature peers.

- Docs generation: implement serviceFromType / resourceTypeUrl in
  src/codegen/docs.ts (they were scaffold TODOs) and add the docs-cli entry the
  package `docs` script referenced. The fly docs site was a stub index.mdx; it
  now generates real pages (Overview, Resource Reference, Pseudo-parameters,
  Lint Rules, Serialization) with a sidebar, matching the aws/gcp/k8s sites
  (incl. the shared rehype-base-url base-path plugin).
- Pseudo-parameters: Fly.Region / Fly.OrgSlug / Fly.AppName, mirroring gcp's
  GCP namespace. Wired via pseudoParameters() and resolved in the serializer
  from env vars (FLY_REGION/FLY_ORG/FLY_APP_NAME) with fallbacks, so
  `new Machine({ region: Fly.Region })` serializes to the resolved value.
- Init templates: initTemplates() with default (App + Machine), "volume"
  (App + Volume + mounted Machine), and "service" (public HTTPS service).

Also records the self-upgrade pin item as N/A: fly's spec is an unversioned
live URL (docs.machines.dev/openapi.json), so there is no version constant to
bump and no upstreamPin applies (noted in src/spec/fetch.ts).

Not in this PR: the `chant import` capability (templateParser/generator) —
the remaining #770 item, a separate follow-up that can build on describeResources.

101 fly tests pass; validate clean; check-lexicon Tier 1 unchanged, the
initTemplates Tier-2 checks flip to PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit 4d93a31 into main Jul 11, 2026
6 checks passed
@lex00
lex00 deleted the fly-parity-770 branch July 11, 2026 22:26
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.

1 participant