Skip to content

Drop the redundant "(the encrypted vault)" from local env messages - #2298

Merged
schnie merged 3 commits into
v2from
worktree-drop-encrypted-vault-paren
Oct 12, 2026
Merged

schnie merged 3 commits into
v2from
worktree-drop-encrypted-vault-paren

Conversation

@schnie

@schnie schnie commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

A vault set printed set connection x in vault (the encrypted vault). Encrypted is the default, so the parenthetical only repeated the scope.

Each store now names itself for messages with Where():

  • vault: vault / vault (global), and vault (global, unencrypted) only after the writer actually stored a value plain — a --plain delete no longer calls an encrypted value unencrypted;
  • .env: project (<path>).

Location(), which meant a path for one store and a qualifier for the other, is gone; the one message that wanted the plaintext path uses DotenvPath(). Tests cover the printed text for each store.

Text output only; --output json is unchanged.

A vault set printed "set connection x in vault (the encrypted vault)".
Encrypted is the default, so the parenthetical only repeated the scope.
The vault writer's Location is now empty when encrypted and "unencrypted"
for --plain, and messages add the parenthetical only when there is one,
so a .env store still names its path.

Co-Authored-By: Claude <noreply@anthropic.com>
@schnie
schnie requested a review from a team as a code owner October 11, 2026 23:59
A --plain global set read "vault (global) (unencrypted)". A scope that
already ends in a parenthetical now takes the location inside it:
"vault (global, unencrypted)".

Co-Authored-By: Claude <noreply@anthropic.com>
@coveralls-official

coveralls-official Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 38187222111

Coverage increased (+0.02%) to 57.69%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: 7 uncovered changes across 2 files (19 of 26 lines covered, 73.08%).
  • 1 coverage regression across 1 file.

Uncovered Changes

File Changed Covered %
internal/vaultenv/writer.go 13 9 69.23%
cmd/local/env.go 13 10 76.92%

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
cmd/local/env.go 1 88.92%

Coverage Stats

Coverage Status
Relevant Lines: 69464
Covered Lines: 40074
Line Coverage: 57.69%
Coverage Strength: 232.7 hits per line

💛 - Coveralls

Review follow-ups:

- A --plain delete of an encrypted global said "vault (global,
  unencrypted)": the mark followed the flag, which a delete carries too.
  The writer now marks itself unencrypted only after it stores a value
  plain.
- storeWhere spliced the qualifier in by checking for a trailing ")".
  Each store now names itself with Where(), so nothing parses a label.
- Location() meant a path for .env and a qualifier for the vault. It is
  gone; the one message that wanted the plaintext path uses DotenvPath.
- Tests cover the printed text for each store and the plain mark.

Co-Authored-By: Claude <noreply@anthropic.com>
@schnie
schnie merged commit ec50960 into v2 Oct 12, 2026
7 checks passed
@schnie
schnie deleted the worktree-drop-encrypted-vault-paren branch October 12, 2026 00:23
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