Repository navigation
fix(db): default debugMode to false in getSettings() defaults - #10372
diegosouzapw merged 2 commits into
Conversation
Fresh installs (or installs missing the persisted debugMode key) ran in debug mode, contradicting the documented opt-in toggle and flooding new production installs with debug-level logs. Flip the default to false; installs that persisted debugMode=true keep it — only the missing-key path changes, no migration needed. Fixes cheaper-inference#10312
|
Thanks for the fix, Jacky — this is a clean, minimal patch for a real production issue. I reviewed the change and reran your test coverage in an isolated environment:
The fix itself (src/lib/db/settings.ts) is exactly the surgical one-line change the issue called for, with a clear comment explaining the opt-in/missing-key semantics, and the changelog fragment is correctly formatted. No migration needed, no security or cross-layer surface touched — this is merge-ready as-is. One small unrelated note for the future (not blocking this PR): Nice catch and nice test discipline. |
149049c
into
cheaper-inference:release/v3.8.50
|
Validated in local merge-train |
…r-inference#10372) * fix(db): default debugMode to false in getSettings() defaults Fresh installs (or installs missing the persisted debugMode key) ran in debug mode, contradicting the documented opt-in toggle and flooding new production installs with debug-level logs. Flip the default to false; installs that persisted debugMode=true keep it — only the missing-key path changes, no migration needed. Fixes cheaper-inference#10312 * changelog: fragment for cheaper-inference#10372
…r-inference#10372) * fix(db): default debugMode to false in getSettings() defaults Fresh installs (or installs missing the persisted debugMode key) ran in debug mode, contradicting the documented opt-in toggle and flooding new production installs with debug-level logs. Flip the default to false; installs that persisted debugMode=true keep it — only the missing-key path changes, no migration needed. Fixes cheaper-inference#10312 * changelog: fragment for cheaper-inference#10372
What
Fixes #10312.
getSettings()insrc/lib/db/settings.tssetdebugMode: truein the defaults object, so any fresh install (or one missing the persisteddebugModekey) ran in debug mode — contradicting the docs, which describe Debug Mode as an Advanced, opt-in toggle. This flooded new production installs with debug-level logs and buried real warnings.Change
truetofalsein thegetSettings()defaults object (neighbor opt-in flaglogToolSourcesalready defaults tofalse).debugMode: truekeep it — only the missing-key path changes.Tests
Added
tests/unit/db-settings-debug-mode-default-10312.test.ts:debugMode === false(fresh install is not in debug)debugMode: trueis preserved after the default flipdebugMode: falsestaysfalseVerified locally: new test file passes (3/3), existing settings test files pass (
db-settings-extended,db-settings-split,settings-api,check-pack-boot— 79/79), andnpm run lintis clean.Changelog fragment
Added under
changelog.d/fixes/with this PR's number.