GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): delete blobs a week after they were written by rekram1-node · Pull Request #65671 · anomalyco/opencode

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Nov 23, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Issue for this PR

None.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Blobs are no longer kept forever. The blob store now deletes each blob a week after it was written, whatever stored it, the same way tool output already cleans up its files. Video job records keep their 24-hour lifetime.

before: video record deleted 24 h after the job finished; its videos in <data>/blobs kept for good
after:  video record deleted 24 h after the job finished (unchanged)
        any blob deleted 7 days after it was written

Nothing ever removed a blob before, and every video the agent tool made is stored twice (blob plus the copy in the project), so <data>/blobs only grew. With video headed for on-by-default that adds up quickly.

The store owns the lifetime rather than the video jobs, so it also catches blobs no job accounts for: a download interrupted mid-write, or a record that couldn't be read. On start and then hourly, BlobStore lists <data>/blobs/blob_* and removes files older than RETENTION (7 days) with the existing FileRetention.cleanup, by modification time.

Trade-off: a client that kept a blob ID gets 404 from GET /api/experimental/blob/:id after a week. Copies the agent tool saved into a project are untouched. The blob route's description says so.

How did you verify your code works?

  • New blob-store.test.ts: a blob whose file is older than a week is gone after the store starts, and a fresh one stays. It fails without the cleanup.
  • video-generation and tool-video-generate tests in core, and video-generate.test.ts in server, pass.
  • bun run check at the root, and tsc in core.

Screenshots / recordings

None.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Public API: blobs served by the experimental blob endpoint are now deleted 7 days after they were written, instead of being kept for good (description of experimental.blob.get updated)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rekram1-node added 2 commits November 22, 2026 20:24
@rekram1-node
fix(core): delete generated videos a week after their job finishes
7b42a34
@rekram1-node
fix(core): delete blobs a week after they were written
1ad1ecb
@rekram1-node rekram1-node changed the title fix(core): delete generated videos a week after their job finishes fix(core): delete blobs a week after they were written Nov 23, 2026
opencodejr[bot]
opencodejr Bot reviewed Nov 23, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The change works. I ran the updated video-generation.test.ts against the base code and it fails because the job's blobs are still there after 8 days. With this PR it passes. The video-generation and tool-video-generate tests pass with core's test script, and tsc in core is clean. Removing blobs is safe in the cleanup path: blobs.remove ignores errors and a missing file, and only completed jobs have blobs to remove.

Public API: only behaviour and docs on experimental endpoints. GET /api/experimental/generate/video/:id now keeps a finished job for 7 days instead of 24 h, and the experimental.generate.video.get description in the OpenAPI spec says so. Blobs of completed video jobs, read through GET /api/experimental/blob/:id, are now deleted after 7 days instead of being kept for good. A client that keeps a blob ID longer than a week now gets 404. Since these endpoints are marked experimental, that seems acceptable.

One concern, inline: the test now takes ~18s, up from ~4s.

  • packages/core/test/video-generation.test.ts:111: Because this runs inside a live app, TestClock.adjust("8 days") fires every 5-second poll in between, about 138k ticks. The test now takes ~18s locally, up from ~4s on base. That's past Bun's 5s default and about 60% of core's 30s script timeout, so slower CI runners could time out. You can make it fast by advancing the clock while no poller is running. Close the second app, then do yield* TestClock.adjust("8 days"), then check deletion in a fresh app(dir, state). I tried this locally: the file runs in ~2.3s and still passes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
opencodejr[bot]
opencodejr Bot reviewed Nov 23, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

My earlier point is addressed: the video test is back to its base version and no longer steps through 8 days of polls. The new commits look sound.

I ran blob-store, video-generation and tool-video-generate in core and they pass. With the cleanup call taken out, the new blob-store.test.ts fails, so it checks the fix. tsc in core is clean. The cleanup reuses FileRetention.cleanup and only touches blob_* files. This file blob store is used only for generated videos, and video records expire after 24 h, so they never point at a deleted blob.

Public API: only the experimental.blob.get description changes, from "kept until removed" to "deleted a week after it was stored". GET /api/experimental/blob/:id now returns 404 for blobs older than 7 days. The endpoint is experimental, so this is acceptable. No new concerns.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rekram1-node
rekram1-node merged commit 8c0be71 into dev Nov 23, 2026
17 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node deleted the video-blob-retention branch November 23, 2026 05:25
@BrewTestBot BrewTestBot mentioned this pull request Nov 23, 2026
opencode 2.4.0 Homebrew/homebrew-core#327368
Merged
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
opencode 2.4.0 amrkmn/homebrew-tap#1251
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
feat: opencode release v2.4.0 sprisa/opencode-server#95
Merged
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 27, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1181
Merged
1 task
@rekram1-node rekram1-node mentioned this pull request Nov 28, 2026
feat(core): experimental blob API backed by SQLite #67016
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rekram1-node
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.