Skip to content

docs(plans): file 313, the object-storage backup tier - #384

Merged
prisis merged 4 commits into
alphafrom
plans/r2-backup-tier
Aug 9, 2026
Merged

prisis merged 4 commits into
alphafrom
plans/r2-backup-tier

Conversation

@prisis

@prisis prisis commented Aug 8, 2026

Copy link
Copy Markdown
Member

Files plan 313, the plan #375 implements, plus its execution record.

The finding

lunora backup already had two tiers and named them in its own docblock: pitr drives the platform's DO change log for the last 30 days in place, and create/restore is the off-platform, portable, >30-day tier. But that second tier wrote NDJSON through node:fs/promises to --dir, so the durability of the tier that exists for exactly the case the 30-day window cannot cover was whatever disk the CLI ran on — automated, per its own docs, by an external cron.

So the fix was a destination, not a format: the snapshot, manifest, export/import endpoints and R2 bindings all existed.

§10 — the execution record, and one deviation

Phases 0–1 shipped as designed. WS5 shipped too, outside its phasing, because reviewing both writers side by side surfaced that the scheduled backup recorded no checksum — restore --verify refused precisely the snapshots nobody watches being taken.

WS4 did not ship, and §4.4 said it would. The plan promised "Retention is explicit, not clever … No silent deletion of anything" and a prune verb. What shipped keeps backupRetain deleting inside every cron run; the review-added writer check makes that narrower, not explicit. It is safe now — retention matches on the cron expression via object custom metadata read off the listing, so two deployments sharing a prefix keep the retention each configured — but it is not what the plan promised, and §10 says so rather than quietly reinterpreting the plan to match the code.

That gap is also where the branch's worst defect came from: unifying the key layout is what makes list --bucket one history and what made the two writers indistinguishable to the existing prune. The feature and the bug were the same decision.

The pattern worth carrying forward

Three thermo rounds, each finding something the previous declared clean, and every defect in the remediation rather than the original work. The recurring shape was not stale comments — it was a claim about a second party's behaviour that was never checked against the second party: a guard documented as preventing an OOM it could not prevent (the export fan-out resolves every shard's rows before the first byte is encoded); an upload documented as checksum-verified above the size where the verified route stops being used; remediation text telling an operator to pass createStorage(...).download where the signatures share no properties and the assignment does not compile.

Docs only.

🤖 Generated with Claude Code

https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP

prisis and others added 2 commits August 8, 2026 20:30
lunora backup already has both tiers and names them: pitr covers the
last 30 days in place, and create/restore is the portable one for
everything older. The second writes through node:fs to a local dir, so
the tier that exists for the case the 30-day window cannot cover
depends on whichever disk the CLI ran on, automated by an external
cron.

The snapshot format, manifest, export/import endpoints and R2 bindings
all exist, so this is a destination rather than a redesign. Acceptance
is a bigint and bytes round-trip, which is what plan 265 showed the
export path could silently lose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP
Phases 0-1 and WS5 shipped in #375. WS4 did not: retention still
deletes inside every cron run, narrowed by a cron-expression marker
rather than made explicit, which is not what §4.4 promised. That gap is
also where the branch's worst defect came from - unifying the key
layout is what makes list --bucket one history and what made the two
writers indistinguishable to the existing prune.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP
@netlify

netlify Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for lunorash ready!

Name Link
🔨 Latest commit c814462
🔍 Latest deploy log https://app.netlify.com/projects/lunorash/deploys/6a780ddd07db5900086f22e2
😎 Deploy Preview https://deploy-preview-384--lunorash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • plans/313-r2-backup-tier.md is excluded by none and included by none
  • plans/README.md is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 29022234-ec85-4b54-a1c7-e67c54f038bc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for confirming the Contributor License Agreement! 🙏

@prisis
prisis merged commit f8a19ae into alpha Aug 9, 2026
11 of 13 checks passed
@prisis
prisis deleted the plans/r2-backup-tier branch August 9, 2026 05:19
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using our GitHub Discussions tab for questions.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant