Skip to content

feat(attachments): Store large Slack files on first use - #3491

Merged
thomasjiangcy merged 2 commits into
mainfrom
feat/store-large-slack-files-on-first-use
Nov 16, 2026
Merged

thomasjiangcy merged 2 commits into
mainfrom
feat/store-large-slack-files-on-first-use

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Large Slack files (non-image, over 25 MiB) are recorded with storage_key = NULL and were never stored (#3339). Now the first call that needs the bytes streams the file from Slack into attachment storage once and fills in storage_key, sha256 and bytes. Later reads use storage. So transcribeAudio (#3489) can sign a storage URL with createDownloadUrl (#3488) for every file.

Behavior

  • storeDeferredAttachment (store.ts) streams the source through the existing writeAttachmentObject path (fresh write key, retries, size check, sha256). Then it updates the row only where storage_key IS NULL, the row is not delete-requested, and the conversation is not purged. When the update misses, it deletes our object and returns the winner's row, or null when the row is no longer live.
  • storeAttachmentOnFirstUse (download.ts) does the Slack lookup and the size check, maps errors to AttachmentDownloadError, and wraps the store in an attachment.store span.
  • loadAttachment and transcribeAudio call it first. transcribeAudio no longer refuses unstored files.
  • writeAttachmentObject no longer retries AttachmentSourceUnavailableError. A file that Slack deleted is not transient.
  • The dashboard byte route does not store. It keeps streaming files from Slack until a tool stores them.

Notes

  • No migration: 0107_attachment_deferred_download.sql already made storage_key and sha256 nullable.
  • model-input.ts is unchanged except for a comment. Only web uploads reach it, and they are always stored. It reads bytes only for images up to 5 MB, and deferred rows are non-images over 25 MiB.

Open risk

  • Nobody has checked yet that ElevenLabs can fetch a Vercel Blob signed URL in production.

via @thomasjiangcy.

--

View Session [Sentry]

Large Slack files stay recorded without a stored copy. The first
loadAttachment or transcribeAudio call that needs the bytes streams the
file from Slack into attachment storage once and fills in storage_key
and sha256. Later reads use storage, and transcribeAudio can sign a
storage URL for every file. The dashboard byte route still streams
unstored files from Slack and does not store them.

Refs #3339, #3488, #3489

Co-Authored-By: Thomas Jiang <[email protected]>
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 16, 2026 5:58am UTC

Request Review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

29 screenshot changes — 29 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automations Runs Filters · Desktop
Automations Runs Filters · Desktop
Changed
Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Show 12 more changed screenshots
Conversation Captured Memories Popover · Desktop
Conversation Captured Memories Popover · Desktop
Changed
Conversation Child Agents · Desktop
Conversation Child Agents · Desktop
Changed
Conversation Details Watched Linked Work · Desktop
Conversation Details Watched Linked Work · Desktop
Changed
Conversation Long Transcript Touch · Mobile
Conversation Long Transcript Touch · Mobile
Changed
Conversation Memory List Jump · Desktop
Conversation Memory List Jump · Desktop
Changed
Conversation Memory List Jump · Mobile
Conversation Memory List Jump · Mobile
Changed
Conversation Question Picks And Text · Desktop
Conversation Question Picks And Text · Desktop
Changed
Conversation Stop Active · Mobile
Conversation Stop Active · Mobile
Changed
Conversation Task Line · Desktop
Conversation Task Line · Desktop
Changed
Conversation Text Attachment · Desktop
Conversation Text Attachment · Desktop
Changed
Memories · Mobile
Memories · Mobile
Changed
Push Notifications Tip · Desktop
Push Notifications Tip · Desktop
Changed

11 more changed screenshots in Frameshift.

@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 16, 2026 05:51
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 16, 2026

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 28a1710. Configure here.

… stored

The Slack attachment fingerprint hashed only row ids, so storing a
pending file did not change the transcript version. Open dashboard polls
kept showing it as pending. Include whether each row is stored.
@thomasjiangcy
thomasjiangcy merged commit 5a198d4 into main Nov 16, 2026
47 checks passed
@thomasjiangcy
thomasjiangcy deleted the feat/store-large-slack-files-on-first-use branch November 16, 2026 06:31

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 6eb3cc42 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant