feat(cli): add clap-native env= to six net-new flag-backed inputs#356
Merged
Conversation
pofallon
force-pushed
the
feat/env-category-a-netnew
branch
from
July 22, 2026 23:25
10d13c6 to
db5be0b
Compare
Category A of #180: flags that lacked an env var each gain a one-line `#[arg(env = "DEACON_…")]`, so clap owns precedence (flag > env > default) and `--help` advertises `[env: …]`: - `--workspace-folder` → DEACON_WORKSPACE_FOLDER - `--config` → DEACON_CONFIG - `--secrets-file` → DEACON_SECRETS_FILE (env supplies a single file; the flag stays repeatable for several) - `--docker-path` → DEACON_DOCKER_PATH - `--docker-compose-path` → DEACON_DOCKER_COMPOSE_PATH - `--default-user-env-probe` → DEACON_DEFAULT_USER_ENV_PROBE Deliberately NOT reused: DEACON_USER_DATA_FOLDER / DEACON_CONTAINER_DATA_FOLDER are already injected *into* the container (up/mod.rs), so binding them as host-side inputs on --user-data-folder / --container-data-folder would collide. `DefaultUserEnvProbe` gains `PartialEq`/`Eq`; temp-env parse tests (env / flag-beats-env) per var. `test_global_flags_default_values` now pins the two docker-path vars so its default assertions stay deterministic under a shared-process runner. Completes #180. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019vhr7Tcf8ybvSZSE1owqBT
pofallon
force-pushed
the
feat/env-category-a-netnew
branch
from
July 22, 2026 23:35
db5be0b to
474ffc2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Category A of #180 (the optional net-new bucket). Six flags that back an input but lacked an environment variable each gain a one-line
#[arg(env = "DEACON_…")], so clap owns precedence (flag > env > default) and--helpadvertises[env: …]for free.--workspace-folderDEACON_WORKSPACE_FOLDER--configDEACON_CONFIG--secrets-fileDEACON_SECRETS_FILE(env supplies a single file; flag stays repeatable for several)--docker-pathDEACON_DOCKER_PATH--docker-compose-pathDEACON_DOCKER_COMPOSE_PATH--default-user-env-probeDEACON_DEFAULT_USER_ENV_PROBEConscious exclusion (the issue's caveat)
DEACON_USER_DATA_FOLDER/DEACON_CONTAINER_DATA_FOLDERare already injected into the container (up/mod.rs). Binding them as host-side inputs on--user-data-folder/--container-data-folderwould collide with that outbound use, so they are deliberately left off.Details
DefaultUserEnvProbegainsPartialEq/Eq.test_global_flags_default_valuesnow pins the two docker-path vars so its default assertions stay deterministic under a shared-process runner (nextest already isolates per-process; belt-and-suspenders forcargo test).Together with #354 (Category B part 1) and #355 (Category B part 2), this completes #180.
Testing
cargo fmt --all -- --check✓cargo clippy --all-targets --all-features -- -D warnings✓make test-nextest-fast— 3113 passed, 31 skipped ✓--helpverified to advertise[env: …]for all six.Closes #180.
🤖 Generated with Claude Code