Repository navigation
feat(dev): Use compose S3 storage for local attachments - #2327
Merged
Merged
Conversation
Co-Authored-By: Thomas Jiang <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Thomas Jiang <[email protected]>
thomasjiangcy
approved these changes
Oct 29, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4251094. Configure here.
thomasjiangcy
added a commit
that referenced
this pull request
Oct 29, 2026
#2327 added S3 defaults to `apps/example/.env.example`. This PR fixes two places that picked up those defaults by mistake. Cursor Bugbot reported both on #2327. **Evals used S3 instead of the Blob mock** The eval Vitest configs load `apps/example/.env.example` through `loadJuniorTestEnvFiles`. So evals now selected the `s3` provider at `localhost:7072`. Eval CI has no S3 service, and the eval agent fixture mocks Vercel Blob (`src/fixture/blob.ts`). Attachment evals, such as `attachments.eval.ts` and the file cases in `delivery.eval.ts`, would fail the next time they run. They did not run on #2327, because CI skipped the eval jobs for those paths. The behavioral and integration eval configs now set `JUNIOR_ATTACHMENT_STORAGE_PROVIDER=vercel-blob` next to the fake `BLOB_READ_WRITE_TOKEN` they already set. The guardian, router and harness configs set no Blob token, so they do not store attachments, and this PR leaves them unchanged. **`acp-local` did not start S3** `scripts/acp-local.mjs` loads the same S3 defaults but started only `postgres` and `redis`. It now runs `docker compose up -d --wait` with no service list, like the README. **Verification** - Resolved each eval config with `vitest/node` `resolveConfig`. On `main`, the integration config resolves to `s3`. With this change, both changed configs resolve to `vercel-blob`. - With `s3` stopped, `docker compose up -d --wait` started all 3 services, and all were healthy. - Prettier passes. - I could not run the evals locally, because the sandbox has no `cloudflared` for eval egress. CI eval jobs should run for these config changes. The `packages/junior` tests also load these defaults. They pass on `main`, because they pass storage in directly. The next slice will set a `memory` provider for them. <!-- junior-request-attribution:start --> via @thomasjiangcy. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0CCUMX7ET0%3A1793248918.684709 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CCUMX7ET0%3A1793248918.684709) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CCUMX7ET0%3A1793248918.684709/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Thomas Jiang <[email protected]>
This branch was successfully deployed
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.

Local dev now stores attachments and published images in the compose
s3service (versitygw) instead of the shared dev Vercel Blob store. This is the follow-up to #2325. It changes no product code.apps/example/.env.examplesetsJUNIOR_ATTACHMENT_STORAGE_PROVIDER=s3and theJUNIOR_S3_*values for the compose service.pnpm dev,pnpm cliandacp-localread these as defaults. Deployed apps, tests and evals do not read this file, so production stays on Vercel Blob.The
s3service now creates thejunior-attachmentsbucket at startup. With the posix backend, a bucket is just a folder, so the service runsmkdir -pand then the image's normal entrypoint. The command is safe to repeat, so restarts and the named volume keep working. CI is unchanged, because the S3 test creates its own bucket.The README now starts
s3withpostgres redisand explains how to opt out. Ifs3is not running,sendFiles,publishImageand web messages with images fail. To keep using Vercel Blob, setJUNIOR_ATTACHMENT_STORAGE_PROVIDER=vercel-blobinapps/example/.env..env.localdoes not work for this, because the env loader lets.envoverride it. Attachments already stored in Blob are not visible after the switch, because reads filter by provider.via @thomasjiangcy.
--
View Junior Session [Sentry]