Skip to content

docs(db): document throttled pre-write SQLite backups - #10824

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.50from
RaviTharuma:docs/10351-backup-throttle
Aug 20, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.50from
RaviTharuma:docs/10351-backup-throttle

Conversation

@RaviTharuma

Copy link
Copy Markdown
Contributor

Summary

  • backupDbFile("pre-write") on models.dev pricing save/clear and settings writes is already throttled to at most once per 60 minutes.
  • Document that, plus DISABLE_SQLITE_AUTO_BACKUP and the dashboard auto-backup toggle, so operators do not assume every pricing sync copies the whole SQLite file.

Related Issues

Validation

  • Change type: other (docs; throttle already on release/v3.8.50)
  • Focused tests: docs-only (runtime throttle is pre-existing)
  • npm run lint
  • Reconciled with release/v3.8.50

Tests Added Or Updated

  • None. Behaviour already exists in src/lib/db/backup.ts.

Coverage Notes

  • Comment-only on BACKUP_THROTTLE_MS; env docs expanded.

Reviewer Notes

  • This does not skip pricing backups entirely; it documents the existing 60-minute throttle.

@RaviTharuma

Copy link
Copy Markdown
Contributor Author

BACKUP_THROTTLE_MS is a hardcoded constant in src/lib/db/backup.ts, not process.env. ENVIRONMENT.md had it in env-var backticks, so check:env-doc-sync flagged it as documented-but-missing-from-.env.example.

9ac0599 removes those backticks (throttle is still described as 60 minutes) and adds a unit test that drives runEnvDocSync so BACKUP_THROTTLE_MS is not in docMissingEnv.

Remaining Docs Gates red on this PR is the shared BOT_TOKEN/BOT_URL allowlist owned by #10828.

@RaviTharuma

Copy link
Copy Markdown
Contributor Author

BACKUP_THROTTLE_MS env-doc drift is gone on 9ac0599 (runEnvDocSync docMissingEnv empty for that name).

This Docs Gates run failed at check:docs-counts STRICT: live modules 343 vs docs/SVGs 342. Same merge-ref catalog drift #10828 owns (40ff6c0). ESLint is 0 warnings; ratchet is i18nUiCoverage 99.4 (pt keys unrelated to this backup throttle). Not dummy-realigning the catalog or filling those translations here.

@RaviTharuma
RaviTharuma force-pushed the docs/10351-backup-throttle branch 2 times, most recently from 36a13e5 to d7a5c52 Compare August 20, 2026 13:04
@RaviTharuma

Copy link
Copy Markdown
Contributor Author

Rebased onto current release/v3.8.50 via #10828 (f5be5dd). Unique commits replayed on the drain HEAD. Merge is MERGEABLE. Does not merge.

@RaviTharuma
RaviTharuma force-pushed the docs/10351-backup-throttle branch from d7a5c52 to 4315051 Compare August 20, 2026 13:53
@RaviTharuma

Copy link
Copy Markdown
Contributor Author

Rebased onto current release/v3.8.50 via #10828 (0a09b6a / 4821f9f). Unique commits replayed. HEAD 4315051. Does not merge.

Non-manual backupDbFile calls (models.dev pricing, settings) already no-op
under a 60-minute throttle and DISABLE_SQLITE_AUTO_BACKUP. Spell that out
so operators do not assume every pricing write copies the DB file.

Fixes #10351
It is a hardcoded 60-minute constant in src/lib/db/backup.ts. Backticking
the name in ENVIRONMENT.md made check:env-doc-sync treat it as a documented
knob missing from .env.example.
@RaviTharuma
RaviTharuma force-pushed the docs/10351-backup-throttle branch from 4315051 to 843df6f Compare August 20, 2026 13:57
@RaviTharuma

Copy link
Copy Markdown
Contributor Author

Removed the shared #10828 drain commits from this branch so the diff is feature-only again (it had been ~100 files of i18n/catalog/CI dump stacked under the real change). Rebased onto current release/v3.8.50 (4821f9ffd). Does not merge.

@RaviTharuma

Copy link
Copy Markdown
Contributor Author

No new ESLint warnings job: lint:json is clean (0 errors, 0 warnings). It then failed quality-ratchet i18nUiCoverage.pct 99.3 < baseline 100. This PR only documents backup throttle. Shared i18n-parity red is owned by #10828. Not dummy-dumping 42 locale JSON files here. Does not merge.

@diegosouzapw
diegosouzapw merged commit 6767f27 into diegosouzapw:release/v3.8.50 Aug 20, 2026
5 checks passed
@RaviTharuma
RaviTharuma deleted the docs/10351-backup-throttle branch September 23, 2026 19:37
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…0824)

Merged — validated together with a batch of related RaviTharuma PRs in one combined worktree (typecheck:core clean, complexity/file-size/changelog gates green, focused tests passing). Thanks for the contribution!
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.

feat(backend): document throttled pre-write backup behavior for models.dev sync

2 participants