Skip to content

feat(core): add _warning field to KeyMeta and save_meta doc comment#161

Merged
jgowdy-godaddy merged 1 commit into
mainfrom
fix/meta-warning-field
May 21, 2026
Merged

feat(core): add _warning field to KeyMeta and save_meta doc comment#161
jgowdy-godaddy merged 1 commit into
mainfrom
fix/meta-warning-field

Conversation

@jgowdy-godaddy
Copy link
Copy Markdown
Contributor

Summary

  • Adds a _warning field to KeyMeta that serializes at the top of .meta JSON files, warning users and agents not to modify these files directly since they are HMAC-verified.
  • Adds a doc comment to save_meta documenting the meta-tag invariant: every call must be followed by a meta-tag re-stamp, or ensure_meta_integrity will reject the key on next load.

Context

This is a companion change to godaddy/sshenc#TBD which routes sshenc identity through the agent IPC protocol. The root cause was that set_identity called save_meta() directly without re-stamping the keychain meta-tag, breaking all subsequent sign operations.

Test plan

  • cargo test --workspace — all 1011 tests pass
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean

Add a _warning field to KeyMeta that serializes at the top of .meta
JSON files, warning users and agents not to modify these files directly
since they are HMAC-verified.

Add a doc comment to save_meta documenting the meta-tag invariant:
every call must be followed by a meta-tag re-stamp, or
ensure_meta_integrity will reject the key on next load.
@jgowdy-godaddy jgowdy-godaddy merged commit b39cc50 into main May 21, 2026
3 checks passed
@jgowdy-godaddy jgowdy-godaddy deleted the fix/meta-warning-field branch May 21, 2026 19:04
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.

2 participants