Repository navigation
fix(server): load private GitHub release images - #25027
maria-rcks wants to merge 2 commits into
Conversation
Co-authored-by: Mike Olson <1510193+mwolson@users.noreply.github.com>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This change adds authenticated GitHub REST lookups and private release-asset streaming, including bearer-token and signed-redirect handling. Because it changes production authentication-sensitive media behavior, the change warrants human review. Notes:
No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Release URL parsing and recognition packages/source-control-github/src/shared/gitHubMedia.ts, packages/source-control-github/src/shared/definition.test.ts |
The parser recognizes valid release-download URLs, decodes their components, and rejects URLs or components that fail validation. Tests cover encoded characters, canonical hosts, and rejected URL forms. |
Authenticated release asset fetching packages/source-control-github/src/server/gitHubMediaFetch.ts, packages/source-control-github/src/server/gitHubMediaFetch.test.ts |
GitHubMediaFetch looks up releases by tag, matches assets by name, and requests matching asset IDs as octet-stream. Redirect-following requests add GitHub API headers. Tests cover credentialed downloads, missing credentials, lookup failure, and unauthenticated redirects. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant GitHubMediaFetch
participant GitHubRest
participant GitHubAPI
participant ObjectStore
GitHubMediaFetch->>GitHubRest: getReleaseByTag(owner, repo, tag)
GitHubRest-->>GitHubMediaFetch: Release assets with IDs and names
GitHubMediaFetch->>GitHubAPI: Request matching asset by ID as octet-stream
GitHubAPI-->>GitHubMediaFetch: Asset response or redirect
GitHubMediaFetch->>ObjectStore: Follow redirect without authorization
Possibly related issues
pingdotgg/t3code#21014: The issue describes unavailable private release-asset images in PR descriptions. This change adds release URL recognition and authenticated REST asset fetching.
Suggested reviewers: juliusmarminge
Merge Risk: 
Minimal · up to 316b2
-
No actionable issue currently blocks merging. Live private-account rendering remains unverified.
Pre-merge checks: 
3 · 
1
-
Failed checks: 1 warning Passed checks: 3 passedFull details: Description check
-
Explanation
The description clearly covers the problem, change, verification, evidence, and takeover context. It does not include the required “Scope and approval” section with a triaged issue or explicit maintainer approval, and it states that Macroscope approval remains outstanding for authentication-sensitive behavior.
Resolution
Add a “## Scope and approval” section. Include the triaged issue or discussion link and the explicit maintainer approval comment for this behavior. If the fix qualifies as an obvious focused bug fix without prior approval, explain why. Record the required Macroscope or equivalent human approval before merge.
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Co-authored-by: Mike Olson <1510193+mwolson@users.noreply.github.com>
|
Note Written by Verified in a real dev environmentverified exact head
short server transcript, with private contents and signed URLs omitted matching public description and viewport below. these show preserved public rendering; the private regression is proven by the API transcript, not these screenshots. Not verified
screenshots were inspected at full size. the exported video and uploaded t3 browser player were checked for playback and seeking. nothing was merged, rebased, force-pushed, closed, or relabeled. |


Problem
Private GitHub release images in pull request descriptions load without authentication and return 404.
Change
Recognize release-download URLs and use the existing authenticated REST service to select the exact asset by tag and name, then stream its binary API response. Keep credentials off signed object-host redirects and retain anonymous fetching for public releases when lookup is unavailable. Existing media caching is unchanged; web, desktop, and mobile share the classifier.
Verification
e3592efe7f): three regression failures before the fix, then all 14 focused tests passed.vp run check:changedpassed through Blacksmith on merged headad56e4719f: format, lint, knip, GraphQL generation check, affected package typechecks, and focused tests.ad56e4719fwith no findings. CodeRabbit passed with no actionable findings.316b27e378renders the images. The four task files are unchanged on the merged head. The screenshots use matching public GitHub data and a simulated anonymous 404, not a live private account.ad56e4719f: all 30 reported checks completed without failures, including lint, build/typecheck, package tests, web tests, and all eight server shards.Evidence
Same PR description and crop. Direct browser release downloads return a simulated 404 in both captures; the server uses real GitHub requests.
Takeover
Replaces #21015, with thanks to @mwolson for the original implementation.
Built with GPT-6.1-Sol in the Codex harness on T3 Code.