feat: persistent GitHub release download sources - #7
Merged
Conversation
Store custom GitHub Releases sources in SQLite so they survive restarts,
then stream the pinned asset of the latest stable release through DevBox
with one click from the new Releases page.
- store: release_sources table (case-insensitive owner/repo, unique per
owner/repo/asset) with create/list/get/delete helpers
- dashboard: /api/release-sources CRUD, one-time download tickets and a
streaming /api/release-download endpoint
- dashboard: validate github.com/{owner}/{repo}/releases URLs and asset
names, cache latest-release lookups for 5m to save GitHub API quota
- dashboard: resolve assets by verified asset ID and restrict download
redirects to github.com and *.githubusercontent.com
- web: Releases page with add form, source list and download/delete
- tests: store CRUD/persistence plus handler, ticket and redirect tests
- dashboard: resolve the pinned asset from the cached latest release and only re-query GitHub when the cache is cold or no longer lists it, so downloads stop spending an API call each time - dashboard: bound dial, TLS handshake and response-header waits on the download client while leaving Client.Timeout unset for large assets - web: keep a zero asset size rendering as "0 B" instead of "-" - tests: assert the warm cache serves tickets, stale caches refresh and the download client keeps bounded connection timeouts
TestLatestReleaseAssetRefreshesStaleCache seeded an unexpired entry, so it never exercised the TTL path its name promised. - rename it to TestLatestReleaseAssetRefreshesWhenCachedAssetMissing, which is what the fixture actually covers - add TestLatestReleaseAssetRefreshesExpiredCache for the TTL path: an expired entry that still lists the asset must be re-queried and recached
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughAdds persistent GitHub Release sources, cached latest-release resolution, one-time download tickets, safe streaming downloads, backend routes, and a new Releases dashboard page with creation, refresh, download, and deletion controls. ChangesRelease download flow
Registry proxy response handling
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ReleasesView
participant ReleaseAPI
participant Dashboard
participant GitHub
ReleasesView->>ReleaseAPI: request download ticket
ReleaseAPI->>Dashboard: create ticket for source
Dashboard->>GitHub: fetch latest release asset
GitHub-->>Dashboard: return release metadata
Dashboard-->>ReleaseAPI: return ticket and filename
ReleasesView->>ReleaseAPI: open download URL
ReleaseAPI->>Dashboard: consume ticket
Dashboard->>GitHub: request asset stream
GitHub-->>Dashboard: return asset bytes
Dashboard-->>ReleasesView: return attachment
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
详见已关闭的 PR #6。
Summary by CodeRabbit
New Features
Documentation