Skip to content

fix: optimize remote install artifact uploads#413

Merged
thymikee merged 4 commits into
mainfrom
codex/optimize-remote-install-uploads
Apr 16, 2026
Merged

fix: optimize remote install artifact uploads#413
thymikee merged 4 commits into
mainfrom
codex/optimize-remote-install-uploads

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Optimize remote local install uploads by preparing the actual payload up front, gzipping app-bundle directory uploads, hashing the compressed payload, and supporting bridge preflight cache/direct-upload/finalize flows with legacy /upload fallback.

Document the local-path vs existing-URL install decision for agents and add install-from-source coverage for Android URLs plus trusted GitHub artifact archives. Touched 9 files; scope stayed within remote install/upload handling, tests, skills, and docs.

Validation

  • pnpm format
  • pnpm check:quick
  • pnpm test src/__tests__/upload-client.test.ts src/platforms/__tests__/install-source.test.ts
  • AGENT_DEVICE_STATE_DIR=/tmp/agent-device-test-state-KQOVPi pnpm test:unit -- --maxWorkers=1
  • AGENT_DEVICE_STATE_DIR=/tmp/agent-device-test-state-KQOVPi pnpm test:smoke

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-413/

Built to branch gh-pages at 2026-04-16 10:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e02d908fde

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread src/upload-client.ts Outdated
Comment on lines +80 to +86
if (preflight?.kind === 'direct-upload') {
await uploadDirectArtifact(prepared.payloadPath, preflight);
return await finalizeDirectUpload({
normalizedBase,
token: options.token,
uploadId: preflight.uploadId,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fall back to legacy upload when direct ticket upload fails

When preflight returns a direct-upload ticket, any transient failure in uploadDirectArtifact or finalizeDirectUpload now aborts the install instead of using the existing /upload path. This makes an optional optimization a hard dependency: a bad/expired signed URL, storage-side 5xx, or finalize timeout will fail the command even though legacy upload could still succeed. The direct-upload branch should catch these failures and continue with uploadLegacyArtifact for reliability parity.

Useful? React with 👍 / 👎.

@thymikee thymikee merged commit 5868ace into main Apr 16, 2026
15 checks passed
@thymikee thymikee deleted the codex/optimize-remote-install-uploads branch April 16, 2026 10:25
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