Skip to content

fix: avoid unnecessary TUF initialization - #72

Merged
vadimpiven merged 2 commits into
mainfrom
fix/tuf-test-leaks
Aug 20, 2026
Merged

fix: avoid unnecessary TUF initialization#72
vadimpiven merged 2 commits into
mainfrom
fix/tuf-test-leaks

Conversation

@vadimpiven

Copy link
Copy Markdown
Owner

Summary

  • defer Sigstore verifier initialization until an npm provenance attestation exists
  • serialize TUF setup in integration tests

Testing

  • pnpm exec vitest run tests/cli.test.ts
  • pnpm exec vitest run tests/verify.integration.test.ts

@semanticdiff-com

semanticdiff-com Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  package/src/verify/verify.ts  60% smaller
  package/tests/verify.integration.test.ts  43% smaller
  pnpm-workspace.yaml  9% smaller
  patches/tuf-js@6.0.0.patch Unsupported file format
  pnpm-lock.yaml  0% smaller

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
package/src/verify/verify.ts 50.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

Defers default Sigstore verifier creation until an npm provenance attestation is available, avoiding unnecessary TUF initialization on earlier failure paths.

  • Preserves explicitly supplied verifier configuration while lazily creating the default verifier.
  • Serializes verifier and trust-material initialization in the integration test file.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness or security issues identified.

Configuration preserves supplied verifiers, the default verifier is still created before bundle verification, and the test setup change intentionally serializes the shared TUF initialization.

Important Files Changed

Filename Overview
package/src/verify/verify.ts Moves default verifier creation after provenance-attestation selection without changing verifier choice or verification semantics.
package/tests/verify.integration.test.ts Consolidates TUF-dependent integration setup into a serial file-level hook.

Reviews (1): Last reviewed commit: "fix: avoid unnecessary TUF initializatio..." | Re-trigger Greptile

@vadimpiven
vadimpiven merged commit bc67982 into main Aug 20, 2026
12 checks passed
@vadimpiven
vadimpiven deleted the fix/tuf-test-leaks branch August 20, 2026 11:47
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