Skip to content

feat(cli): compose options from flags, environment, and files - #5412

Merged
auser merged 3 commits into
mainfrom
feat/cli-composable-option-sources
Nov 13, 2026
Merged

auser merged 3 commits into
mainfrom
feat/cli-composable-option-sources

Conversation

@auser

@auser auser commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add opt-in, repeatable --config-file PATH to compose CLI options from explicit flags, ordered TOML/JSON files, and command-scoped environment variables. Scalars resolve explicit > last file > environment; repeatables append environment, files in order, then explicit values. Relative and absolute config paths are supported; files cannot select a command.

What changed

  • Normalize TOML and JSON into one option model, then feed resolved arguments into the existing Clap parse and normal policy, signed-plan, and backend paths. Unknown keys, incompatible values, and conflicting options refuse before dispatch.
  • Document [global] and [commands.machine.run] syntax and the behavior of booleans, counts, aliases, and empty lists. Add parser, CLI dry-run, and refusal regressions for precedence, multiple files, guest environment filtering, and host CPU ceilings.
  • Re-measure the rebased tree and adjust the Rust-footprint ratchet to 967,269 SLOC / 1,232,680 physical lines without removing coverage.

Validation

  • Passed: 13 focused resolver tests, 105 CLI integration tests, cargo test -p xtask, cargo clippy --workspace -- -D warnings, cargo check --workspace, formatting, and the new hermetic BDD scenario. The footprint check passes on this rebased branch.
  • Passed: cargo run -p xtask -- check-all (84 gates) on the rebased branch. CI remains the final review gate.
  • Full cargo test --workspace did not complete green locally: runs encountered a long macOS temporary socket path, intermittent unrelated agent timing/socket tests, and a workspace-only doctest failure (the doctest passed alone). Full just bdd::run timed out; the new scenario passed alone. No live backend witness was run.
  • YAML is not supported.

Integration

This is independent of draft PR #5326; no changes were made to that branch. Review can proceed now; do not merge until its current work settles, then reconcile the footprint ratchet against the combined tree and validate before landing. A passing CI run or review alone is not authorization to merge.

@auser
auser marked this pull request as ready for review November 13, 2026 03:31
@auser
auser enabled auto-merge November 13, 2026 03:35
@auser
auser added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 13, 2026
@auser
auser enabled auto-merge November 13, 2026 04:31
@auser
auser added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 13, 2026
@auser
auser added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 93c7d84 Nov 13, 2026
15 checks passed
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