fix: stop logging settings.json contents from the git-fetch tick, and log an unreadable file once (release review)

The settings readers for git fetch and keep-warm no longer repeat V8's JSON.parse message, which
quotes the text around the fault and could print voiceSettings.apiKey. The 15 s scheduler tick now
logs an unreadable settings.json once, and again only after a successful read in between. Stale
comments that said settings.json is rewritten in place now say writes are atomic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-27 02:53:08 +01:00
1 parent 0f1fca6ea0
commit da740d4b00
4 files changed
+80 -14

No files matched your search

+2 -2
View File
@@ -159,8 +159,8 @@ describe('readKeepWarmSettings', () => {
/**
* The service keeps what it reads until the next keep-warm settings change, so its reader must
* never hand back a fallback for a file it could not read: settings.json is rewritten in place
* by several routes, and defaults kept from a mid-write read would hold keep-warm off.
* never hand back a fallback for a file it could not read: defaults kept from a file that does
* not parse (a hand edit; writes are atomic) would hold keep-warm off after it is fixed.
*/
it('the service reader rejects an unreadable file instead of falling back, and the server wires it', async () => {
expect(await readKeepWarmSettingsOrThrow()).toEqual({ keepWarmDefault: false, maxHours: 2 });