What to build
Implement jotsmith key rotate [--yes] per PRD §6.5 — snap-cutover rotation. Create a new KV key version, recompute the JWK + thumbprint kid, replace the JWKS in storage with a single-entry array of the new key, optionally refresh the discovery doc, and print the before/after kid to stderr.
Snap-cutover by design (ADR-0005). Tokens minted under the prior key stop verifying the instant rotation completes. No overlap window in v1.
Acceptance criteria
Blocked by
Originally created in OpenCode session ID: ses_17ca8efd8ffexLcFSysAMDVNBQ
What to build
Implement
jotsmith key rotate [--yes]per PRD §6.5 — snap-cutover rotation. Create a new KV key version, recompute the JWK + thumbprint kid, replace the JWKS in storage with a single-entry array of the new key, optionally refresh the discovery doc, and print the before/after kid to stderr.Snap-cutover by design (ADR-0005). Tokens minted under the prior key stop verifying the instant rotation completes. No overlap window in v1.
Acceptance criteria
kidkiddisappears immediately)kidto stderr; nothing on stdout--yes; prompt only appears on a TTY, and the command errors out cleanly when stdin isn't a TTY and--yesis absent--helpthat prior-key tokens stop verifying the instant rotation completesdoctorflags the drift (this is verified by a test that mocks an upload failure)//go:build integrationmints under the original key, rotates, asserts the original token now fails to verifyBlocked by
setupOriginally created in OpenCode session ID: ses_17ca8efd8ffexLcFSysAMDVNBQ