Skip to content

feat: add upload cache preflight#379

Merged
thymikee merged 1 commit into
mainfrom
codex/upload-cache-preflight
Apr 11, 2026
Merged

feat: add upload cache preflight#379
thymikee merged 1 commit into
mainfrom
codex/upload-cache-preflight

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Adds automatic SHA-256 upload preflight for file artifacts sent to remote/cloud daemons, returning cached upload IDs without transferring bytes on cache hits.

Keeps .app directory uploads on the existing tar-stream path until app-bundle caching is supported, and adds focused upload-client tests for hit, miss, legacy fallback, and app-bundle behavior.

Touched files: 2. Scope stayed within the upload client path.

Validation

  • pnpm exec oxfmt --write src/upload-client.ts src/__tests__/upload-client.test.ts
  • pnpm check:quick
  • pnpm test src/__tests__/upload-client.test.ts

@thymikee thymikee force-pushed the codex/upload-cache-preflight branch from e5ce14d to ae54ba6 Compare April 11, 2026 10:35
@github-actions

github-actions Bot commented Apr 11, 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-379/

Built to branch gh-pages at 2026-04-11 10:51 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: e5ce14dffe

ℹ️ 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 +212 to +216
if (!response.ok) {
throw new AppError('COMMAND_FAILED', `Upload preflight failed: ${body}`, {
statusCode: response.status,
hint: 'Verify the remote daemon artifact upload cache endpoint is available and authorized.',
});

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 Fallback to upload when preflight returns non-2xx

This makes upload preflight a hard dependency: any non-2xx response now throws and aborts before the regular /upload path is attempted. In real deployments where preflight is partially rolled out or temporarily unhealthy (for example 5xx/403 from an upstream cache/auth layer), artifact uploads that previously worked will now fail even though the upload endpoint is still available. Since preflight is an optimization, this path should degrade to a cache miss and continue with normal upload instead of failing the command.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the codex/upload-cache-preflight branch from ae54ba6 to 9c58da6 Compare April 11, 2026 10:43
@thymikee thymikee force-pushed the codex/upload-cache-preflight branch from 9c58da6 to 61bb45c Compare April 11, 2026 10:51
@thymikee thymikee merged commit be001e1 into main Apr 11, 2026
16 checks passed
@thymikee thymikee deleted the codex/upload-cache-preflight branch April 11, 2026 10:53
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