fix(vault): thread parse_vault_args env/config resolution into vault subcommand#6522
Merged
Conversation
…subcommand handle_vault_command resolved the vault key/path only from CLI flags or a hardcoded default directory, ignoring ZEPH_VAULT_KEY/ZEPH_VAULT_PATH env vars unlike parse_vault_args, which zeph doctor and agent startup already use. zeph vault set/get/list/rm/init now follow the same CLI flag > env var > default directory precedence. Closes #6500
bug-ops
force-pushed
the
fix/6500-vault-cmd-env-config
branch
from
July 19, 2026 22:07
a4f8365 to
160a133
Compare
bug-ops
enabled auto-merge (squash)
July 19, 2026 22:07
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
handle_vault_command(src/commands/vault.rs) resolved the vault key/path only from CLI flags (--vault-key/--vault-path) or a hardcoded default directory, never consultingZEPH_VAULT_KEY/ZEPH_VAULT_PATHenv vars — unlikecrate::bootstrap::parse_vault_args, already used by agent startup andzeph doctor(zeph doctor's integrity.anchor / durable.integrity_seal checks ignore --vault-path/--vault-key overrides #6479).zeph vault set/get/list/rm/initnow follow the same CLI flag > env var > default directory precedence as the rest of the agent, closing the divergence.src/runner.rs:base_config.logging/.telemetrywere moved out before theVaultdispatch arm, so passing&base_configthrough needed those two fields to be borrowed/cloned instead of moved (LoggingConfig::clone(),&TelemetryConfig).Closes #6500
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 14709 passed, 0 failedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"gitleaks protect --staged— no leakshandle_vault_command_respects_env_vars_without_cli_override, verified against old code path by hand-trace and confirmed it does not touch the real on-disk vault