Skip to content

Fix encryption validation CLI issues from the EVE bug bash - #126

Merged
jeri-temporal merged 1 commit into
mainfrom
alice/eve-bug-bash-fixes
Nov 9, 2026
Merged

jeri-temporal merged 1 commit into
mainfrom
alice/eve-bug-bash-fixes

Conversation

@alice-yin

@alice-yin alice-yin commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #113. Fixes CLI issues found during the Encryption Validation at the Edge (EVE) bug bash.

Changes

  • Remove encryption-validation enable. set --mode warn|deny is now the single way to turn validation on and configure it. This also removes a confusing case where disable followed by enable brought a deny-mode namespace back in warn mode.
  • get shows effective defaults. When the metadata key or values are unset, get shows the server defaults (encoding / [binary/encrypted]) in both text and JSON output. Previously the key line was missing, e.g. for a namespace configured with only metadata values.
  • No-op set / disable now error unless --idempotent. They used to print "Resource already in desired state" and exit 0, which contradicted the --idempotent help text. With --idempotent they print status: unchanged, like other commands.
  • Blank --metadata-value rejected client-side. Previously the CLI showed the diff and the apply prompt, and only then did the server reject the value.

Help text in commands.yml is updated to match; commands.gen.go was regenerated with make gen.

Testing

  • go test ./temporalcloudcli/ -run EncryptionValidation passes (32 cases). New cases cover default display, no-op with and without --idempotent, and blank values.
  • Ran the built binary against a test namespace: get shows the defaulted key, a no-op set exits 1, the same with --idempotent prints unchanged, a blank value exits 1 before any prompt, and enable no longer exists.
  • Known failures that also happen on main locally (Go 1.27.3): make mocks (mockery: package "cmp" without types) and TestErrorsAreNotLogMessages / TestErrorsAreNotLogMessagesJSON.

🤖 Generated with Claude Code


Note

Medium Risk
Changes user-visible CLI behavior (removed subcommand, stricter no-op and flag validation) for experimental namespace encryption settings, but logic is localized and well-tested.

Overview
Removes encryption-validation enable so turning validation on is done only via set --mode warn or set --mode deny, with updated help in commands.yml / generated Cobra output.

get now fills in server defaults (encoding / [binary/encrypted]) when metadata key or values are empty, so output reflects what is actually enforced.

set and disable no longer succeed silently when nothing would change: they error with a clear message unless --idempotent is set, in which case they emit status: unchanged like other cloud commands. set also rejects blank --metadata-value entries before prompting or calling the API.

Tests cover default display, idempotent no-ops, and blank metadata values; the enable command tests are removed.

Reviewed by Cursor Bugbot for commit 989e3a4. Bugbot is set up for automated code reviews on this repo. Configure here.

- Remove `encryption-validation enable`; `set --mode warn|deny` is the single
  way to configure validation, so users don't mix enable and set.
- `get` shows the server defaults (metadata key `encoding`, values
  `[binary/encrypted]`) when the key or values are unset.
- `set` and `disable` error when nothing would change unless --idempotent is
  set, matching their help text and other commands.
- Reject blank --metadata-value before prompting instead of failing at the API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alice-yin
alice-yin requested a review from a team as a code owner November 9, 2026 06:13
@alice-yin
alice-yin deployed to integration November 9, 2026 06:13 — with GitHub Actions Active
@jeri-temporal
jeri-temporal merged commit 60bc43a into main Nov 9, 2026
8 of 9 checks passed

This branch was successfully deployed

1 active deployment
integration — 989e3a49 Deployed Nov 9, 2026 by alice-yin via Integration tests #60
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