hermes-agent/tests/secret_sources
Teknium 86fb046383
feat(secrets): orchestrator-level preserve_existing + profile aliasing (#69058)
Fixes the profile-clobber bug cluster at the apply_all() chokepoint so
every secret source — bundled and plugin — gets both behaviors for free:

- secrets.preserve_existing (#58073): env var names whose existing .env /
  shell value always wins, even against a source with
  override_existing: true.  Escape hatch for per-profile platform
  secrets while everything else rotates centrally.
- Profile aliasing (#51447): under a named profile, an applied
  FOO_<PROFILE> var (credential-shaped suffixes only) also hydrates the
  canonical FOO, so adapters/plugins that read fixed env names see the
  profile's value.  Direct supply beats alias; protected/claimed/
  override guards all apply; secrets.profile_alias: false disables.

Reimplements the intent of PR #58085 (tianma-if, preserve_existing on the
legacy Bitwarden apply shim) and PR #51616 (LeonSGP43, profile aliasing
inside the Bitwarden backend) on the SecretSource orchestrator that
superseded those code paths.

Fixes #58073.  Fixes #51447.

Co-authored-by: tianma-if <5895871+tianma-if@users.noreply.github.com>
Co-authored-by: LeonSGP43 <154585401+LeonSGP43@users.noreply.github.com>
2026-07-22 03:20:45 -07:00
..
__init__.py feat(secrets): pluggable SecretSource interface + multi-source orchestrator 2026-07-06 04:58:07 -07:00
conformance.py feat(secrets): pluggable SecretSource interface + multi-source orchestrator 2026-07-06 04:58:07 -07:00
test_error_remediation.py feat(secrets): one-command token rotation + actionable startup errors for all secret sources (#68605) 2026-07-21 06:41:04 -07:00
test_profile_secrets.py feat(secrets): orchestrator-level preserve_existing + profile aliasing (#69058) 2026-07-22 03:20:45 -07:00
test_secret_source_registry.py feat(secrets): adapt 1Password onto the SecretSource interface 2026-07-06 04:58:07 -07:00