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

address review: guard byModelTier with nullish coalescing

Adam Eivyd0408f575f18
diff --git a/server/services/taskLearning.js b/server/services/taskLearning.js
index a471decd0c..a2dedd6288 100644
--- a/server/services/taskLearning.js
+++ b/server/services/taskLearning.js
@@ -898,6 +898,7 @@ export async function resetTaskTypeLearning(taskType) {
}
// Subtract model tier contributions using routing accuracy data (before deleting it)
+ data.byModelTier ??= {};
const routingData = data.routingAccuracy?.[taskType];
if (routingData) {
for (const [tier, counts] of Object.entries(routingData)) {