Skip to content

chore(deps): bump vault to v0.3.0 and adapt to its breaking changes - #418

Merged
jahvon merged 3 commits into
mainfrom
chore/vault-v0.3.0
Jul 26, 2026
Merged

chore(deps): bump vault to v0.3.0 and adapt to its breaking changes#418
jahvon merged 3 commits into
mainfrom
chore/vault-v0.3.0

Conversation

@jahvon

@jahvon jahvon commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

Picks up vault v0.3.0, a security and
correctness release. In the library, secrets no longer travel through a shell command,
empty vault files are no longer silently reinitialized and overwritten, writes are
serialized across processes, and closed vaults report an error instead of panicking.

The surface it breaks in flow is small — three call sites — but one compatibility problem
was not a compile error and is the more important half of this PR.

Notable Changes

  • demoVaultProvider implements the new Metadata() (Metadata, error).
  • vaultFromName handles the new error, and reports a metadata failure as a
    metadataError field rather than failing the whole view. For an external vault that
    failure means the backend CLI is missing or the session has expired — precisely when a
    user wants to inspect the vault's configuration. It also called Metadata() twice,
    which for an external vault meant running the backend command twice per view.
  • ValidateIdentifier now rejects a leading dash or underscore. flow's rule was a
    superset of the library's new ValidateVaultID, so flow would accept a name like
    -myvault or _myvault that the library then refuses — failing at creation with a less
    specific message, and leaving any vault already created under such a name unreachable
    after upgrade. A new test asserts the subset property directly, because the two rules
    live in separate repositories and will otherwise drift apart silently.

v0.3.0 is a security release: secrets no longer travel through a shell
command, empty vault files are no longer silently reinitialized and
overwritten, writes are serialized across processes, and closed vaults
report an error rather than panicking.

The API surface it breaks here is small:

- demoVaultProvider implements the new Metadata() (Metadata, error).
- vaultFromName handles the new error. It reports a metadata failure as a
  field rather than failing the whole view: for an external vault that
  failure means the backend CLI is missing or the session has expired, which
  is precisely when someone wants to inspect the vault's configuration. It
  also called Metadata() twice, which for an external vault meant running the
  backend command twice per view.

Also tightened ValidateIdentifier to reject a leading dash or underscore.
This is not cosmetic: flow's rule was a *superset* of the library's new
ValidateVaultID, so flow would accept a name like "-myvault" or "_myvault"
that the library then refuses -- failing at creation with a less specific
message, and leaving any vault already created under such a name
unreachable. A new test asserts the subset property directly, since the two
rules live in separate repositories and will otherwise drift apart silently.

Verified: 32 packages pass under -race, lint clean. The 15 `go vet` warnings
about json tags on unexported fields in types/*.gen.go are pre-existing and
identical on main.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HtuDuGkSqTfAXSepf8b51p
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

jahvon added 2 commits July 26, 2026 16:37
Refactor validation comment for clarity and accuracy.
Removed comments explaining the rejection of leading dash or underscore in identifiers.
@jahvon
jahvon merged commit 65e131b into main Jul 26, 2026
21 checks passed
@jahvon
jahvon deleted the chore/vault-v0.3.0 branch July 26, 2026 20:42
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