Repository navigation
docs(db): document throttled pre-write SQLite backups - #10824
diegosouzapw merged 2 commits into
Conversation
|
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. |
|
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. |
36a13e5 to
d7a5c52
Compare
d7a5c52 to
4315051
Compare
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.
4315051 to
843df6f
Compare
|
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 |
|
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. |
…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!
Summary
backupDbFile("pre-write")on models.dev pricing save/clear and settings writes is already throttled to at most once per 60 minutes.DISABLE_SQLITE_AUTO_BACKUPand the dashboard auto-backup toggle, so operators do not assume every pricing sync copies the whole SQLite file.Related Issues
Validation
release/v3.8.50)npm run lintrelease/v3.8.50Tests Added Or Updated
src/lib/db/backup.ts.Coverage Notes
BACKUP_THROTTLE_MS; env docs expanded.Reviewer Notes