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: stricten test assertions, document intervalMs as constant

Adam Eivy38809778fb40
diff --git a/client/src/hooks/useAutoRefetch.js b/client/src/hooks/useAutoRefetch.js
index 7f30f23baf..d88f96c063 100644
--- a/client/src/hooks/useAutoRefetch.js
+++ b/client/src/hooks/useAutoRefetch.js
@@ -5,7 +5,7 @@ import { useState, useEffect, useRef } from 'react';
* Eliminates the repeated useEffect + setInterval pattern across dashboard widgets.
*
* @param {Function} fetchFn - Async function that returns data (should handle its own errors)
- * @param {number} intervalMs - Refetch interval in milliseconds
+ * @param {number} intervalMs - Refetch interval in milliseconds (should be constant for the component's lifetime)
* @returns {{ data: any, loading: boolean }}
*/
export function useAutoRefetch(fetchFn, intervalMs) {
diff --git a/server/services/autonomousJobs.test.js b/server/services/autonomousJobs.test.js
index dc7e564811..ea5a864628 100644
--- a/server/services/autonomousJobs.test.js
+++ b/server/services/autonomousJobs.test.js
@@ -122,6 +122,11 @@ describe('autonomousJobs', () => {
expect(job1Idx).toBeGreaterThanOrEqual(0)
expect(job2Idx).toBeLessThan(job1Idx)
expect(due[job2Idx].overdueBy).toBeGreaterThan(due[job1Idx].overdueBy)
+
+ // Verify only expected test jobs plus any default jobs are present
+ const testJobIds = new Set(['job-test-1', 'job-1', 'job-2'])
+ const unexpectedJobs = due.filter(j => !testJobIds.has(j.id) && !j.id.startsWith('job-github-'))
+ expect(unexpectedJobs).toHaveLength(0)
})
})