Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: use readJsonSafe for autofixer index loads (#4924)

[._.]/ Adam Eivyde86441a2153
diff --git a/autofixer/server.js b/autofixer/server.js
index 4e9a2da77c..4b58c70f15 100644
--- a/autofixer/server.js
+++ b/autofixer/server.js
@@ -142,8 +142,8 @@ async function ensureHistoryDir() {
}
async function loadIndex() {
- const data = await readFile(INDEX_FILE, 'utf8').catch(() => '[]');
- return JSON.parse(data);
+ const index = await readJsonSafe(INDEX_FILE, null);
+ return index ?? [];
}
async function saveIndex(index) {