Skip to content

app/: retention, proof upload and archive path follow-ups to #81 (sc-8900) - #84

Merged
ndbroadbent merged 4 commits into
laravel-renderfrom
laravel-render-followups
Dec 2, 2026
Merged

ndbroadbent merged 4 commits into
laravel-renderfrom
laravel-render-followups

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Follow-ups to #81's review (sc-8900). Based on laravel-render.

Retention vs diff overlays.

  • A new diffs.used_at is set when a comparison reuses a cached diff (diffs::find_or_compute, at most hourly).
  • Retention clears an overlay only when its diff wasn't reused in the last day.
  • It never marks a blob that a diff still names as its overlay.

No stale deleting marks.

  • Registering a blob renews its updated_at (at most hourly). Retention doesn't mark a blob registered in the last day, so a registration that answers "already uploaded" just before a prune is safe.
  • Under the row's lock, the delete re-checks that no snapshot, render or diff names the blob.
  • Marks left on rows a batch didn't delete (skipped, named again, or refused by the store) are cleared at the end of the batch. Any left by a run that stopped are cleared at the start of the next one.

Proof upload size. A render's proof URL signs Content-Length with the size declared in its uploads entry, so it takes exactly that many bytes. RustFS refuses a larger body, and a test checks it.

Archive paths. Every snapshot and page directory gets one of its own. A snapshot named like another's page (x/page-2) or another's file (x/head.png) is suffixed ~2, either way round. The manifest names each snapshot's paths.

Tests: a_recently_reused_diff_keeps_its_overlay and no_deleting_mark_outlives_its_prune in tests/retention.rs, the proof size check in tests/renderer.rs, and unit tests for the archive layout. The full app suite passes with --locked on docspring-dev, except tests/sign_in.rs's OAuth discovery test, which waits on #58. clippy and fmt are clean.

…day keeps its overlay (diffs.used_at); registering renews a blob, which isn't marked for a day after; a marked blob something names again is kept; and no deleting mark outlives its run (cleared after each batch and at the start of a run)
… its own: a snapshot named like another's page (x/page-2) or file (x/head.png) is suffixed ~2
…mes as a page image, checked again under the row's lock
@ndbroadbent
ndbroadbent force-pushed the laravel-render-followups branch from 221a982 to ba48805 Compare December 2, 2026 16:05
@ndbroadbent
ndbroadbent merged commit 4ec0ca8 into laravel-render Dec 2, 2026
@ndbroadbent
ndbroadbent deleted the laravel-render-followups branch December 2, 2026 16:06
@visualci-com

visualci-com Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #325 · 331 unchanged · no changes

This PR vs base: nothing since #313, across 2 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

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