Repository navigation
Delete diff images, their routes, and review.json (diffs step 6) - #120
Merged
Merged
Conversation
The server serves no diff image or stats, push sends records only, and selfie review writes no review.json. StoredDiffs keeps only derived blobs, so it is DerivedBlobs, and a project's field for it is derived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Specs drop the diff routes, review.json, and push's diff upload. OPERATIONS.md says how to delete R2's diffs/ once the Worker that read it is gone, and the plan marks steps 0 to 6 done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the auth test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
selfie-bot
reviewed
Nov 30, 2026
selfie-bot
left a comment
Collaborator
There was a problem hiding this comment.
I found nothing to change in the code, specs, or the R2 cleanup steps. I'm holding back approval because of the PR's own condition: merge only once app.selfie.dev runs a main that includes #119. That isn't met yet. #119 merged as f23301ca03c16cb3f07b572153b026a804caf40a, and the newest deploy tag, app/2026-11-29--r2, doesn't contain that commit.
Member
Author
Member
Author
|
@selfie-bot app.selfie.dev is now deployed from main at f23301c, which includes #119: run 46461427051, tagged |
selfie-bot
approved these changes
Nov 30, 2026
This was referenced Nov 30, 2026
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.
The last of step 6 in
docs/plans/diffs.md: no diff image is made, kept, or served, except byselfie diffandselfie flakeson demand, andreview.jsonis gone.Removed
GET /api/diffs/:current/:goldenand/image(ui/src/server/app.ts). The sync routesPUT /diffs/:current/:golden,PUT /diffs/:current/:golden/image, andGET /batches/:id/diffs/needed(ui/src/server/sync.ts). The needed-pairs helper is folded intoderived/needed, its only user.ReviewSource.diffStatsanddiffImage, in the local source with its 32-pair cache (cli/src/ui.ts) and in the hosted one.StoredDiffs' image and stats methods. What's left only keeps derived blobs, so it's renamedDerivedBlobs(store/src/core/derived-blobs.ts), withput,has,get,hasEach, andgetEach. The project field is nowderivedinstead ofdiffs.review.json: its writer,ReviewCache,writeReviewCache, andreadReviewCache, which was a library export. The CHANGELOG says so under Removed.DiffPairalias, which is now justImagePair.What push sends now
uploadRecordsasksderived/needed?tag=diff-1and sends each pair's record: the one this store keeps, or one it works out, fetching any image it lacks. It skips a record larger than 64 KiB.diffsin its JSON keeps its name and now counts records sent, since push's JSON has no schema version to raise. A remote with noderivedroutes still answersnot-found, which push takes as wanting nothing.Heads-up, for the owner to decide:
selfie pushfrom the released 0.1.0 callsdiffs/neededwithout a fallback. Once a Worker from this PR is deployed, that push fails at its last step (exit 2), after the batch, images, decisions, and status have all gone. The CHANGELOG tells people to upgrade. If 0.1.0 pushes in anyone's CI matter, a stubdiffs/neededthat answers{ pairs: [] }would keep them green.After deploying
OPERATIONS.md→ Deleting R2's diff images is a one-time cleanup for the owner. It checks that the deployedapp/*tag includes this PR and names nodiffs/key. It then adds an R2 lifecycle rule per project,projects/<id>/diffs/, with--expire-days 1, and removes the rules once the dashboard shows the prefixes empty. Nothing here has been run.Specs
system.md→ Diffs and grouping: the diagram and table losereview.json, R2's diff images, and the server's diffing. Its Future is now just "any two checkpoints" (step 7).ui.md: ReviewSource, Routes, theno-diff-imagecode, and Cache-Control.sync.md: the routes table, the push order, anddiffs' meaning.cli.md: Library, Local data, Review, and Output directories.store.md,cloud.md→ Without Git or a decoder, and their rationale.docs/plans/diffs.md: steps 0 to 6 marked done (Look at every story for deltas, and say which it couldn't #112, Make the differ portable, and hand back a mask for paintDiff to draw #114, Key a hunk by its RGB, as Node would, and check a browser's decode against the image hash #113, Keep each pair's record as a derived blob, and read a batch's worth in one request #115, Read every pair's record in the browser, and work out what isn't held (diffs step 4) #119, Draw a story's diff in the browser, in a Web Worker (step 5) #116, selfie diff paints on demand, and selfie review stops painting (step 6, CLI) #118, this PR), and 7 left for later.Tests
pnpm -r typecheckis clean.pnpm testpasses in about 44 s: cli 553, store 661, ui 160 including workerd, and render 147. Tests of the removed routes and cache are deleted. The auth-adapter test now covers/imagesandPOST /derived/read. The pruned-batch test checks images only. The--baselinetest checks the exported image instead ofreview.json.🤖 Generated with Claude Code