Skip to content

fix(configuration): numeric fields can be used with env variables#1919

Draft
sergiofilhowz wants to merge 1 commit into
mainfrom
fix/configuration-with-numbers
Draft

fix(configuration): numeric fields can be used with env variables#1919
sergiofilhowz wants to merge 1 commit into
mainfrom
fix/configuration-with-numbers

Conversation

@sergiofilhowz

Copy link
Copy Markdown
Contributor

Summary

Fixes configuration worker reliability around HTTP port changes, on-disk layout, file-based hot-reload, and env-var expansion in numeric fields.

  • ${VARIABLES} in numeric fields — lone placeholders like port: ${HTTP_PORT:3111} are env-expanded and YAML-coerced to the correct scalar type (int/bool/float), so schema validation passes instead of treating them as strings. Fixes Env-driven config for the new format is giving errors #1916.
  • Config directory — default store moved from ./data/configuration./iii-config. Existing entries are auto-migrated on first boot; explicit directory: overrides are untouched.
  • File-edit hot-reload — direct edits to ./iii-config/*.yaml are picked up via the fs adapter watcher (canonicalized watch path fixes macOS FSEvents on relative paths). External edits fan out the same rebind/apply path as configuration::set; internal writes are deduped to avoid reload loops.
  • HTTP port bindingiii-http now gracefully shuts down the old listener on host/port rebind (closes idle keep-alive connections, not just the accept socket), with a hard-abort safety net so a stuck connection can’t pin the old port indefinitely.

Test plan

  • cargo test -p iii http_configuration_e2e — port rebind via configuration::set and via direct file edit
  • Edit ./iii-config/iii-http.yaml port on disk; confirm new port serves and old port stops accepting
  • Set port: ${HTTP_PORT:3111} (or similar) in a persisted config entry; confirm it resolves to an integer
  • Upgrade from an install with ./data/configuration/ entries; confirm one-time migration to ./iii-config/
  • Smoke: iii boots, HTTP worker listens, config changes apply without restart

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
iii-website Ready Ready Preview, Comment Jun 29, 2026 6:00pm
tech-spec Error Error Jun 29, 2026 6:00pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 80219b50-288c-4639-9e7d-7dd0d1b8fd9a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/configuration-with-numbers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@anthonyiscoding

Copy link
Copy Markdown
Contributor

We should make this a rule in our editors to never use iii-: ./iii-config should be ./config

@anthonyiscoding

Copy link
Copy Markdown
Contributor

Will configuration for workers be stored locally to the worker or all stored at the iii engine itself?

My belief is that it should be wherever the worker is so there's no drift and less coupling between a worker and a specific iii instance.

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.

Env-driven config for the new format is giving errors

2 participants