Skip to content

Accept environment on a custom domain block - #458

Merged
pdonohoe02 merged 1 commit into
mainfrom
feat/domain-environment
Dec 4, 2026
Merged

pdonohoe02 merged 1 commit into
mainfrom
feat/domain-environment

Conversation

@pdonohoe02

Copy link
Copy Markdown
Contributor

Requested by Patrick · project thread

Summary

  • A [domains."<host>"] block in floo.app.toml now accepts environment = "dev" | "prod". Leaving it out means prod, same as today. Any other value (e.g. "preview") is rejected when the file loads, with a clear message.
  • This is the CLI half of "custom domains on dev". The API half is a separate getfloo/floo PR on feat/dev-custom-domains. Until this ships, deny_unknown_fields makes the CLI reject a manifest that sets the key before anything is sent.

Issue Closure (Required)

N/A: Patrick asked for this in a project thread (a custom domain on a dev-only app, perceptronpapers.com), not through an issue.

Changes

  • src/project_config/app_config.rs: new DomainEnvironment enum and DomainBlock.environment. The custom deserializer maps the value and rejects anything other than dev/prod. Unset values aren't serialized, so existing files round-trip byte-identical.
  • src/project_config/mod.rs, src/cli.rs, src/commands/domains.rs: the help and messages no longer say domains apply only on a prod release.
  • Tests: dev, prod, omitted and rejected "preview" in the app config; the single-service config path; the strictness fixture now carries the key.
  • Preflight doesn't send domains today, so there's no payload change.

Deliberately not building: preview domains, a floo domains environment column (the API's domain response has no environment field yet), or any preflight payload change.

Test Plan

Verified by running:

  • cargo fmt --check: clean
  • cargo clippy --all-targets -- -D warnings: clean
  • cargo test: all suites pass except local_env_contract::dev_detaches_and_checks_all_services_before_any_spawn, which fails locally with PORT_IN_USE because an unrelated local process holds port 3000. This change doesn't touch that path; CI runs it clean.

Discovered Issues

None

🤖 Generated with Claude Code

floo.app.toml `[domains."<host>"]` blocks may set `environment = "dev"` or
`"prod"` (omitted means prod). The CLI parsed domain blocks with only
`service`, so it refused such a file before sending anything. Any other
value is rejected at load. Help and error text no longer say a domain only
applies on a prod release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pdonohoe02 pdonohoe02 self-assigned this Dec 4, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T06:47:55.271362Z d4580ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pdonohoe02
pdonohoe02 merged commit 2ffb719 into main Dec 4, 2026
8 checks passed
@pdonohoe02
pdonohoe02 deleted the feat/domain-environment branch December 4, 2026 17:12
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