Skip to content

refactor(keys): depend on envelope-keys instead of sekai-keys - #146

Merged
Sannrox merged 1 commit into
mainfrom
refactor/145
Nov 27, 2026
Merged

Sannrox merged 1 commit into
mainfrom
refactor/145

Conversation

@Sannrox

@Sannrox Sannrox commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Closes #145

Swap the runner's key-provider contract from a git pin on sekai-keys to envelope-keys = "1" on crates.io. The wrap/unwrap API, wrapped-DEK JSON, AEAD associated data, and KEK file format stay the same; keys wrapped before the switch still unwrap.

Reuse decision

  • Job: take a published envelope-key contract crate instead of a git pin on another product's repository
  • Verdict: Reuse
  • Concept: envelope-keys 1.0.0 at the existing kako::crypto re-export seam
  • Edge: Memory and file providers stay in that crate; kako remains a KeyProvider consumer. Provider credentials never enter the scratch tree.
  • Searched: sekai-keys, sekai_keys, KeyProvider, FileKeyProvider, crypto.rs, ADR 0015. Rejected keeping the git pin, copying the contract, or adding a kako-local provider.

Lane

  • Claim branch: refactor/145
  • Worktree: .worktrees/issue-145
  • Base SHA: 7649c3cd3863937907177ad45f7b6e053898ac0a
  • Published SHA: a2d81fe6f6ea7d52569ecbf2989bd40745c6b8f2
  • Authority: land

Compatibility

Security-sensitive dependency swap with an unchanged envelope format. No stored-format, wire, or configuration change.

The pinned mizuchi engine (v0.1.0) still lists sekai-keys as its own dependency, so Cargo.lock still contains that package through mizuchi-io. kako's workspace manifest and the kako package no longer depend on it.

Simplify-change

Dropped an unrelated tempfile lockfile bump. Kept the import rename, lockfile add, crate-graph checks, and one pre-switch unwrap test. No new provider or envelope format.

Tests

  • unwrap_job_dek_reads_pre_switch_envelope: a sekai-keys 1.0.0 KEK file and wrapped DEK unwrap through kako's claim path to the expected DEK.
  • kako_depends_on_envelope_keys_not_sekai_keys: workspace and kako lock entry name envelope-keys, not sekai-keys.

Verification

On published SHA a2d81fe6f6ea7d52569ecbf2989bd40745c6b8f2 (clean tree; same tree as the pre-publish candidate):

  • cargo fmt --all -- --check
  • cargo build --locked --workspace --all-targets
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo clippy --locked -p kako-source-sekai --features sekai-client --all-targets -- -D warnings
  • cargo test --locked --workspace
  • cargo test --locked -p kako-source-sekai --features sekai-client
  • bash scripts/validate-workflow-skills.sh
  • python3 scripts/adr-index --check
  • bash scripts/check-workflows.sh
  • python3 -m unittest discover -s tests -t .

All passed. Skipped live Sekai plane tests and kekkai-guest tests (named #[ignore]). Python runtime packages are not installed in this environment; those tests skip.

Autoreview

python3 …/autoreview --mode local --base origin/main --max-priority P1 --engine codex (model gpt-6.1-sol): scoped-clean, exit 0. No accepted/actionable findings.

validate-behavior

Skipped: no user-observable CLI or API flow; the contract is unwrap of existing envelopes, covered by the unit test above.

@Sannrox
Sannrox marked this pull request as ready for review November 27, 2026 19:44
@Sannrox
Sannrox merged commit 769cd5f into main Nov 27, 2026
8 checks passed
@Sannrox
Sannrox deleted the refactor/145 branch November 27, 2026 19:46
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.

refactor(keys): depend on envelope-keys instead of sekai-keys

1 participant