Skip to content

chore: remove vestigial .capy/decrypt key cluster#226

Merged
cvince merged 1 commit into
mainfrom
chore/remove-vestigial-decrypt-key
Jun 6, 2026
Merged

chore: remove vestigial .capy/decrypt key cluster#226
cvince merged 1 commit into
mainfrom
chore/remove-vestigial-decrypt-key

Conversation

@cvince

@cvince cvince commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

What

Removes the dead .capy/decrypt file-based key-source machinery. It is no longer used at runtime — capy run injects secrets via the spawned process env (local mode) or SECRETS_BLOB + PROJECT_KEY (deployed mode). The leftover code had zero runtime consumers:

  • ProjectManager.getDecryptPath() / readDecryptKey() — no callers
  • ProjectManager.detectProjectState() computed hasDecryptKey = existsSync('.capy/decrypt'), but nothing ever read the field
  • FileManager.writeDecryptKey() — no callers
  • SyncEngine.createDecryptKey() — no callers
  • the DecryptKey type and ProjectState.hasDecryptKey field — used only by the above

Scope

Removes the code, the type surface, and all test references to the cluster (hasDecryptKey, DecryptKey, getDecryptPath, readDecryptKey, writeDecryptKey, createDecryptKey, .capy/decrypt). 10 files, +10 / −239.

Verification

  • bun run typecheck — clean
  • bash tests/run-tests.sh394 pass / 0 fail (exit 0)
  • No behavior change — pure dead-code removal.

The gitignore helper tests that used .capy/decrypt as sample data were kept valid by swapping it out and keeping input/expected in sync.

The .capy/decrypt file-based key source is no longer used at runtime — capy run
injects secrets via the spawned process env (local mode) or SECRETS_BLOB +
PROJECT_KEY (deployed mode). The leftover machinery was dead code:

- ProjectManager.getDecryptPath() / readDecryptKey() — no callers
- ProjectManager.detectProjectState() computed hasDecryptKey, but nothing read it
- FileManager.writeDecryptKey() — no callers
- SyncEngine.createDecryptKey() — no callers
- DecryptKey type and ProjectState.hasDecryptKey field — used only by the above

Removes the code, the type surface, and all test references. No behavior change:
src typechecks clean and the full suite passes (394 pass / 0 fail).
@cvince cvince merged commit 0e13d2a into main Jun 6, 2026
1 check passed
@cvince cvince mentioned this pull request Jun 7, 2026
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