Skip to content

feat(dependencies): add live caching crates.io proxy with offline fallback - #1243

Merged
ayomideadeniran merged 1 commit into
StellarDevHub:mainfrom
lorenzo-romano:feat/issue-1127-cratesio-proxy
Sep 1, 2026
Merged

feat(dependencies): add live caching crates.io proxy with offline fallback#1243
ayomideadeniran merged 1 commit into
StellarDevHub:mainfrom
lorenzo-romano:feat/issue-1127-cratesio-proxy

Conversation

@lorenzo-romano

Copy link
Copy Markdown
Contributor

Summary

Replaces static mock Cargo dependencies with a live, caching crates.io proxy for real-time Soroban dependency resolution (issue #1127).

  • Caching reverse proxy: src/services/cratesio-proxy.ts fetches crate manifests from https://crates.io/api/v1/crates/<name> using only Node built-ins.
  • Redis cache with 6h TTL: responses cached under cratesio:<name> (CRATESIO_CACHE_TTL_SECONDS), so crates.io is hit at most once per 6h per crate.
  • Offline fallback: when crates.io is unreachable (hard 5s timeout), resolution falls back to the existing curated snapshot — the app never depends on network availability.
  • Version compatibility matrix: compatibilityWarnings() flags deprecated/incompatible soroban-sdk combinations (e.g. soroban-auth, stellar-xdr).
  • New endpoint: GET /api/v1/dependencies/proxy/:crate returns live release metadata + compatibility warnings.
  • Implements the existing DependencyRegistryProvider contract, so services can swap it in without code changes.
  • Tests: 5 passing (src/services/cratesio-proxy.test.ts) — compatibility warnings, cache keys, disabled/fail-safe fallback.

Closes #1127

…lback

Adds a real-time Soroban dependency-resolution proxy that fetches crate
releases from crates.io, caches them in Redis under a 6-hour TTL, falls back
to the curated snapshot when crates.io is unreachable, and surfaces a version
compatibility matrix warning students about deprecated soroban-sdk
combinations. Exposes GET /dependencies/proxy/:crate.

Closes StellarDevHub#1127
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@lorenzo-romano Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

@lorenzo-romano is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ayomideadeniran

Copy link
Copy Markdown
Contributor

Pr under review

@ayomideadeniran
ayomideadeniran merged commit b01854b into StellarDevHub:main Sep 1, 2026
1 check failed
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.

[Backend] Build Dynamic Crates.io Proxy for Real-Time Soroban Dependency Resolution

2 participants