Repository navigation
📸 fix: Authenticate Native GitHub Attachment Uploads - #397
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Post-merge native-SRT upload canary using personal OAuth authentication and explicit identity content encoding to preserve request framing. Synthetic one-pixel image; this is transport verification only. Asset: https://github.com/user-attachments/assets/76791b8b-12e7-4867-ae84-9a7b4f0f983f |
Summary
I fixed native GitHub attachment authentication for sandboxed worker commands. A screenshot upload can fail with HTTP 401 even while Git and GitHub API requests authenticate:
ghuploads attachments touploads.github.com, but the worker restores its masked CLI credential only atapi.github.com.uploads.github.comorigin to GitHub.com's CLI credential substitution hosts.Related report: LibreChat-AI/LibreChat#18116.
Change Type
Testing
github.test.jsandnative-sandbox.test.js, usingTMPDIR=/private/tmpto avoid an existing macOS temporary-path alias failure in a linked-worktree fixture.git diff --check.Test Configuration
npm ci --prefix packages/code --ignore-scripts npm run build --prefix packages/code TMPDIR=/private/tmp node --test packages/code/dist/github.test.js packages/code/dist/native-sandbox.test.js npm exec --prefix packages/code -- tsc --noEmit -p packages/code/tsconfig.jsonRollout requires updated workers and a GitHub CLI with native attachment support. A real upload using Lia's App remains the acceptance check after rollout; GitHub may reject credentials from particular Apps independently of this routing fix.
Checklist