Skip to content

Add Environment field to BaseConfig - #182

Closed
reyortiz3 wants to merge 1 commit into
add-base-config-packagefrom
add-config-environment-field
Closed

Add Environment field to BaseConfig#182
reyortiz3 wants to merge 1 commit into
add-base-config-packagefrom
add-config-environment-field

Conversation

@reyortiz3

Copy link
Copy Markdown
Contributor

Summary

  • Adds a validated Environment enum (development/staging/production) to BaseConfig, required alongside ServiceName.
  • Several services in the org (toolhive's Sentry config, ai-gateway's webhook TLS gating) each reimplement this as an unvalidated freeform string. This gives them one shared, validated type instead.
  • Stacked on Add config package for shared base configuration #181 (adds the config package this depends on) — targets that branch rather than main.

Test plan

  • task lint — clean
  • task test — full repo passes, including new Environment.Valid() table tests and updated BaseConfig.Validate() cases (missing/unknown environment)
  • task license-check — clean
  • TestLoad_ExtendedServiceConfig extended to cover a YAML environment: field end-to-end

🤖 Generated with Claude Code

Several services independently reimplement dev/staging/prod as a
freeform string (Sentry config, ai-gateway's TLS gating), with no
shared validation. Give BaseConfig a validated Environment enum
instead so gating logic can rely on a known-good value rather than
a matched-nowhere-else string.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@reyortiz3

Copy link
Copy Markdown
Contributor Author

Consolidating into #181 instead of stacking — the Environment commit has been cherry-picked onto add-base-config-package directly.

@reyortiz3 reyortiz3 closed this Jul 22, 2026
@reyortiz3
reyortiz3 deleted the add-config-environment-field branch July 22, 2026 19:57
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