Skip to content

Support parent environment interpolation in config#5

Merged
pasunboneleve merged 4 commits intomainfrom
env-var-unpacking-impl
May 4, 2026
Merged

Support parent environment interpolation in config#5
pasunboneleve merged 4 commits intomainfrom
env-var-unpacking-impl

Conversation

@pasunboneleve
Copy link
Copy Markdown
Owner

Summary

  • add shell-free interpolation for parent environment variables in process command args, process env values, and HTTP probe URLs
  • support , , and 2 escaping with explicit errors for missing or malformed references
  • document the feature in docs/configuration.md and docs/behavior.md

Verification

  • cargo fmt
  • cargo test
  • cargo clippy --all-targets --all-features -- -D warnings
  • roborev branch review: no issues found

Notes

  • This PR keeps README focused on the main behaviour; environment-variable details live under docs/.

Context: client repositories need one source of truth for values supplied by their local environment. The blog config currently repeats CONTAINER_PORT-derived values across process env, tunnel URLs, browser launch URLs, and HTTP probes.

Decision: add shell-free expansion for  and  in process command arguments, process env values, and HTTP probe URLs. The parser lives in a dedicated env_expand module; processes.rs only applies it at spawn/probe boundaries.

Alternatives considered: repo-local wrapper scripts would work but duplicate glue in every client repo. Shelling out for expansion was rejected because it would introduce quoting and injection semantics unrelated to devloop's structured config.

Tradeoffs: expansion is runtime-bound, so missing environment variables fail when the process or probe is prepared rather than during TOML parsing. That keeps config loading independent of the caller environment while still failing loudly with field context.

Architectural impact: environment expansion is explicit and local to runtime configuration interpretation, separate from session-state interpolation.
Context: parent-environment interpolation is now supported in process command arguments, process env values, and HTTP probe URLs, but the behavior needed to be discoverable outside the implementation tests.

Decision: add a README usage example near the managed-process workflow and document the runtime expansion rules in the behavior reference.

Alternatives considered: keeping the detail only in the configuration reference was too easy to miss for users reading the overview or runtime semantics.

Tradeoffs: this duplicates the supported forms in two docs, but keeps the overview and behavior reference independently useful.

Architectural impact: no runtime changes; this makes the explicit environment boundary part of the documented config contract.
Context: the release automation reads notes from a dated CHANGELOG.md section that matches the pushed tag.

Decision: move the environment interpolation note from Unreleased into a 0.9.0 section dated 2026-05-04 and close the release-prep bead.

Alternatives considered: leaving the note under Unreleased would make the v0.9.0 release workflow fail to extract release notes.

Tradeoffs: this makes the PR release-ready before merge, at the cost of recording the release date ahead of the tag push.

Architectural impact: no runtime impact; this aligns the changelog with the tag-driven release contract.
@pasunboneleve pasunboneleve merged commit ddca356 into main May 4, 2026
2 checks passed
@pasunboneleve pasunboneleve deleted the env-var-unpacking-impl branch May 4, 2026 04: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