perf: implement phase 1-3 performance optimizations

Add implementation plans and code structure analysis for a 3-phase
performance optimization effort. Refactor core modules to reduce
timer overhead, consolidate regex usage, extract exec timeout config,
add debouncer utility, and streamline server/schema validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-02-28 17:39:44 +01:00
co-authored by Claude Opus 4.6
parent 562b14ab61
commit e0a2774d37
26 changed files with 4443 additions and 624 deletions
+5 -3
View File
@@ -536,9 +536,11 @@ describe('circular dependency detection', () => {
it('should allow dependencies on non-existent tasks (just unsatisfied, not a cycle)', () => {
// Dependencies on non-existent tasks are valid - they just won't be satisfied
expect(() => {
queue.addTask({ prompt: 'Task D', dependencies: ['non-existent-id'] });
}).not.toThrow();
const task = queue.addTask({ prompt: 'Task D', dependencies: ['non-existent-id'] });
expect(queue.getAllTasks()).toHaveLength(1);
expect(task.dependencies).toEqual(['non-existent-id']);
// Task is blocked by unsatisfied dependency, so next() should return null
expect(queue.next()).toBeNull();
});
it('should detect self-dependency when task references itself', () => {