Skip to content

feat(cli): add clap-native env= to six net-new flag-backed inputs#356

Merged
pofallon merged 1 commit into
mainfrom
feat/env-category-a-netnew
Jul 22, 2026
Merged

feat(cli): add clap-native env= to six net-new flag-backed inputs#356
pofallon merged 1 commit into
mainfrom
feat/env-category-a-netnew

Conversation

@pofallon

Copy link
Copy Markdown
Contributor

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 --help advertises [env: …] for free.

Flag Env var
--workspace-folder DEACON_WORKSPACE_FOLDER
--config DEACON_CONFIG
--secrets-file DEACON_SECRETS_FILE (env supplies a single file; 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

Conscious exclusion (the issue's caveat)

DEACON_USER_DATA_FOLDER / DEACON_CONTAINER_DATA_FOLDER are already injected into the container (up/mod.rs). Binding them as host-side inputs on --user-data-folder / --container-data-folder would collide with that outbound use, so they are deliberately left off.

Details

  • 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 (nextest already isolates per-process; belt-and-suspenders for cargo 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 ✓
  • --help verified to advertise [env: …] for all six.

Closes #180.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the feature New feature (alias) label Jul 22, 2026
@pofallon
pofallon force-pushed the feat/env-category-a-netnew branch from 10d13c6 to db5be0b Compare July 22, 2026 23:25
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
pofallon force-pushed the feat/env-category-a-netnew branch from db5be0b to 474ffc2 Compare July 22, 2026 23:35
@pofallon
pofallon merged commit e90b7ec into main Jul 22, 2026
14 checks passed
@pofallon
pofallon deleted the feat/env-category-a-netnew branch July 22, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature (alias)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate manually-read flag-backed env vars to clap-native env=

1 participant