Skip to content

refactor(decrypt): remove unused decryptFromUuid/decryptFromData#112

Open
dobby-coder[bot] wants to merge 1 commit into
mainfrom
refactor/remove-dead-decrypt-functions
Open

refactor(decrypt): remove unused decryptFromUuid/decryptFromData#112
dobby-coder[bot] wants to merge 1 commit into
mainfrom
refactor/remove-dead-decrypt-functions

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes #105

What

src/crypto/decrypt.ts exported two functions that were never re-exported from src/index.ts and never referenced in src/ or tests/. Sealed/Opened call the lower-level helpers (inspectSealed, resolveRecipientKey, resolveUSK, unsealAndCollect) directly.

  • Removed decryptFromUuid, decryptFromData and their DecryptFromUuidOptions / DecryptFromDataOptions interfaces.
  • Removed the stale Legacy top-level functions section comment.
  • Dropped the imports that became unused: DecryptFileResult, DecryptDataResult (types), extractAllZipEntries, triggerBrowserDownloads, parseSender. Helpers still used elsewhere (downloadFileWithRetry, SenderIdentity, SessionCallback, ...) are kept.
  • Updated the two remaining --- Inspect --- / --- Unseal helpers --- section comments so they no longer refer to the removed "legacy functions".

Verification

  • npm run typecheck — clean
  • npm test — 205/205 passing

Net diff: 1 file, +3 / -79.

These two exported functions were never re-exported from src/index.ts
and never referenced in src/ or tests/. Sealed/Opened call the
lower-level helpers (inspectSealed, resolveRecipientKey, resolveUSK,
unsealAndCollect) directly instead.

Remove both functions and their DecryptFromUuidOptions/
DecryptFromDataOptions interfaces, the stale "Legacy top-level
functions" section comment, and the imports that become unused
(DecryptFileResult, DecryptDataResult, extractAllZipEntries,
triggerBrowserDownloads, parseSender). The two remaining section
comments no longer mention the removed "legacy functions".

Closes #105

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@dobby-coder dobby-coder Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: approve

Reviewed refactor(decrypt) — clean dead-code removal, no findings (cycle 1).

Verification:

  • No references to decryptFromUuid / decryptFromData / their option interfaces remain in src/ or tests/ (grep clean); neither was re-exported from src/index.ts.
  • Dropped imports (DecryptFileResult, DecryptDataResult, extractAllZipEntries, triggerBrowserDownloads, parseSender) are all unused after removal; kept imports (SenderIdentity, SessionCallback, downloadFileWithRetry) are still referenced.
  • npm run typecheck: clean. npm test: 205/205 passing.

Rule check:

  • Conventional-commit title: pr-title.yml present, "refactor(decrypt): ..." is valid.
  • closingIssuesReferences correctly lists #105 (this is the complete fix, so auto-close is intended).
  • No regression test required — pure removal of dead, untested, unexported code.
  • Writing-rules: PR body is clean.

Review Dobby 2 handed over 0 findings. Signing off.

@dobby-coder
dobby-coder Bot marked this pull request as ready for review July 14, 2026 23:44
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.

Remove dead exported functions decryptFromUuid/decryptFromData in decrypt.ts

0 participants