docs(self-host): add disk capacity planning and backup retention policy - #3289
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 2cba784 | Commit Preview URL Branch Preview URL |
Jul 05 2026, 01:14 AM |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 01:13:12 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
The Disk section had real measured numbers from one production instance but no way to extrapolate to a larger install, and the backup-scaling doc never explained how many historical backups the `backup` profile keeps before pruning. Ground both additions in the actual growth/retention logic: review_audit and webhook_events have no retention policy and grow unbounded per PR/webhook, audit_events is capped at 90 days, and backup.sh keeps BACKUP_RETAIN (default 7) newest copies per target independently, skipping the sqlite prune entirely after a failed backup so a known-good copy is never lost.
The SQLite-failure callout only named the integrity_check failure mode, missing the .backup-command-itself-fails and empty-output-file cases the script also treats as failed verification. The review_audit size estimate mixed a per-row byte figure with an aggregate MB estimate without a clear derivation; points operators at measuring their own instance instead of trusting a blanket ratio.
5794603 to
2cba784
Compare
…cy (#3289) * docs(self-host): add disk capacity planning and backup retention policy The Disk section had real measured numbers from one production instance but no way to extrapolate to a larger install, and the backup-scaling doc never explained how many historical backups the `backup` profile keeps before pruning. Ground both additions in the actual growth/retention logic: review_audit and webhook_events have no retention policy and grow unbounded per PR/webhook, audit_events is capped at 90 days, and backup.sh keeps BACKUP_RETAIN (default 7) newest copies per target independently, skipping the sqlite prune entirely after a failed backup so a known-good copy is never lost. * fix(docs): tighten backup-retention and capacity-planning wording The SQLite-failure callout only named the integrity_check failure mode, missing the .backup-command-itself-fails and empty-output-file cases the script also treats as failed verification. The review_audit size estimate mixed a per-row byte figure with an aggregate MB estimate without a clear derivation; points operators at measuring their own instance instead of trusting a blanket ratio.
Summary
docs.self-hosting-operations.tsx's Disk section had real measured numbers from one production instance but nothing to help an operator answer "how much disk do I need for N repos at M PRs/month." Added a capacity-planning subsection grounded in the actual growth/retention behavior of the disk-consuming subsystems:review_audit(one row per finalized gate decision/outcome, no retention policy, unbounded) andwebhook_events(one row per inbound webhook delivery, also unbounded) grow with activity;audit_eventsis capped at 90 days viaRETENTION_POLICYinsrc/db/retention.tsand the daily 03:00 UTCprune-retentionjob insrc/index.ts; backup-volume usage scales as live DB size ×BACKUP_RETAIN. Estimates are labeled as estimates; only the retention/pruning facts are stated as verified.docs.self-hosting-backup-scaling.tsxnever documented backup retention. Added a "Retention: how many backups are kept" section describingBACKUP_RETAIN(default 7, kept independently per target — postgres/sqlite/qdrant),normalize_backup_retain's fallback-to-7 and floor-of-1 guards, and a callout on the exact failure-path behavior inscripts/backup.sh: a failed SQLite backup is deleted, logged, and skips only the sqlite retention prune (Postgres/Qdrant still prune normally that run) so a known-good backup is never evicted by a broken one.Advances #1819.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlint(not run — no workflow files touched)npm run ui:typechecknpm run test:coverage(not run — docs-only change, nosrc/**lines touched, no Codecov obligation)npm run test:workers(not run — no worker code touched)npm run build:mcp(not run — no MCP code touched)npm run test:mcp-pack(not run — no MCP code touched)npm run ui:openapi:check(not run — no API/schema changes)npm run ui:lintnpm run ui:typechecknpm run ui:buildnpm run docs:drift-checknpm audit --audit-level=moderate(not run — no dependency changes)src/**code changed, prose-only docs routes)If any required check was skipped, explain why:
apps/gittensory-ui/src/routes/docs.*.tsxfiles (prose,FeatureRow,Callout). Nosrc/**, workflow, MCP, or dependency files changed, so the code-path checks (coverage, workers, MCP pack, OpenAPI, audit, actionlint) don't apply. Ran the full docs-relevant gate instead:ui:lint,ui:typecheck,ui:build,docs:drift-check— all green.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository. (No visual/layout change — new prose sections reuse existingFeatureRow/Calloutcomponents already styled elsewhere on these same pages; see Notes.)UI Evidence
Not applicable: this PR adds prose content (paragraphs, a
FeatureRow, and aCallout) to two existing docs pages using components already rendered elsewhere on those same pages. There is no new layout, styling, or visual component to screenshot — the rendered result is indistinguishable in kind from the surrounding sections already on the page.Notes
docs.self-hosting-operations.tsx; the backup retention content is appended after "Scheduled backups" and before "Multi-instance: Postgres and Redis" indocs.self-hosting-backup-scaling.tsx.src/db/retention.ts(RETENTION_POLICY, the 90-dayaudit_eventsrule, the daily prune job),src/index.ts(03:00 UTCprune-retentionschedule),src/review/outcomes-wire.ts/src/review/parity-wire.ts(review_audit write sites),src/db/schema.ts(webhook_events, audit_events shape), andscripts/backup.sh(normalize_backup_retain, the per-target retention loop, and the exact SQLite-failure skip-prune branch).