Skip to content

fix(vault): thread parse_vault_args env/config resolution into vault subcommand#6522

Merged
bug-ops merged 1 commit into
mainfrom
fix/6500-vault-cmd-env-config
Jul 19, 2026
Merged

fix(vault): thread parse_vault_args env/config resolution into vault subcommand#6522
bug-ops merged 1 commit into
mainfrom
fix/6500-vault-cmd-env-config

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 19, 2026

Copy link
Copy Markdown
Owner

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 consulting ZEPH_VAULT_KEY/ZEPH_VAULT_PATH env vars — unlike crate::bootstrap::parse_vault_args, already used by agent startup and zeph doctor (zeph doctor's integrity.anchor / durable.integrity_seal checks ignore --vault-path/--vault-key overrides #6479).
  • zeph vault set/get/list/rm/init now follow the same CLI flag > env var > default directory precedence as the rest of the agent, closing the divergence.
  • Required a minimal side fix in src/runner.rs: base_config.logging/.telemetry were moved out before the Vault dispatch arm, so passing &base_config through needed those two fields to be borrowed/cloned instead of moved (LoggingConfig::clone(), &TelemetryConfig).

Closes #6500

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins — 14709 passed, 0 failed
  • RUSTFLAGS="-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 leaks
  • New regression test handle_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

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation size/M Medium PR (51-200 lines) and removed bug Something isn't working labels Jul 19, 2026
…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
bug-ops force-pushed the fix/6500-vault-cmd-env-config branch from a4f8365 to 160a133 Compare July 19, 2026 22:07
@bug-ops
bug-ops enabled auto-merge (squash) July 19, 2026 22:07
@github-actions github-actions Bot added the bug Something isn't working label Jul 19, 2026
@bug-ops
bug-ops merged commit 1113351 into main Jul 19, 2026
43 checks passed
@bug-ops
bug-ops deleted the fix/6500-vault-cmd-env-config branch July 19, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zeph vault subcommand ignores ZEPH_VAULT_PATH/config vault location, unlike parse_vault_args

1 participant