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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
test: require guarded task writes in recovered output handoffs
[._.]/ Adam Eivy9957c78ae181
diff --git a/server/services/agentFinalization.outputHooks.test.js b/server/services/agentFinalization.outputHooks.test.jsindex 8ce2c9776a..675150c2b8 100644--- a/server/services/agentFinalization.outputHooks.test.js+++ b/server/services/agentFinalization.outputHooks.test.js@@ -496,7 +496,7 @@ describe('recovery output-hook dispatch (#3182)', () => {const workspacePath = await mkdtemp(join(tmpdir(), 'cleanup-restart-'));isProgrammaticIoTaskType.mockReturnValue(false);const taskOutcome = { status: 'incomplete', reason: 'Only preservation remains.', recovery: { mode: 'cleanup' } };- const task = { ...TASK, metadata: { ...TASK.metadata, ...(mode === 'saved'+ const task = { ...TASK, status: 'in_progress', description: 'Preserve the delivered checkout.', priority: 'MEDIUM', metadata: { ...TASK.metadata, ...(mode === 'saved'? { deliveryRecovery: 'cleanup', deliveryRecoveryAgentId: 'agent-example' } : {}) } };persistedAgent.metadata = { workspacePath, ...(mode === 'saved' ? { isWorktree: true }: { isWorktree: false, claimPicksOwnBranch: false, claimBranch: 'claim/issue-42', claimBranches: ['claim/issue-42'] }) };@@ -504,7 +504,11 @@ describe('recovery output-hook dispatch (#3182)', () => {await writeFile(join(workspacePath, '.agent-done-agent-example'), JSON.stringify({ taskOutcome }));await retireDeadAgent({ agent: persistedAgent, task, success: mode === 'pinned-claim', exitCode: mode === 'pinned-claim' ? 0 : 1, duration: 1000 });expect(updateTask).toHaveBeenLastCalledWith(TASK.id, expect.objectContaining({ status: 'in_progress',- metadata: expect.objectContaining({ deliveryRecovery: 'cleanup', deliveryRecoveryAgentId: 'agent-example' }) }), TASK.taskType);+ metadata: expect.objectContaining({ deliveryRecovery: 'cleanup', deliveryRecoveryAgentId: 'agent-example' }) }), TASK.taskType, {+ expectedStatus: 'in_progress',+ expectedTask: { description: task.description, priority: task.priority, metadata: task.metadata },+ recoveryOwner: { id: 'agent-example', startedAt: '2026-09-10T00:00:00Z' },+ });expect(completeAgent).toHaveBeenLastCalledWith('agent-example', expect.objectContaining({ success: false, cleanupPending: true }));} finally {isProgrammaticIoTaskType.mockReturnValue(true);