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
address review (codex): document set-only stage effort carry-forward + pin task-level inheritance test
Adam Eivycb9f43cf1265
diff --git a/server/services/agentCompletionCleanup.js b/server/services/agentCompletionCleanup.jsindex e1a915ac99..dab76fcd49 100644--- a/server/services/agentCompletionCleanup.js+++ b/server/services/agentCompletionCleanup.js@@ -117,6 +117,10 @@ export async function handlePipelineProgression(task, agentId, success) {},autoApproved: true};+ // Provider/model/effort are SET-only (never cleared) on hand-off: a stage+ // without its own pin inherits the value carried in `...task.metadata` — either+ // the task-level pin (interval config) or the prior stage's. Clearing an unset+ // stage's effort here would wipe a task-level effort from stage 1+.if (nextStage.model) nextTask.metadata.model = nextStage.model;if (nextStage.providerId) {nextTask.metadata.provider = nextStage.providerId;diff --git a/server/services/agentCompletionCleanup.test.js b/server/services/agentCompletionCleanup.test.jsindex 2048ccecd4..e058d054ba 100644--- a/server/services/agentCompletionCleanup.test.js+++ b/server/services/agentCompletionCleanup.test.js@@ -90,4 +90,13 @@ describe('handlePipelineProgression', () => {const [nextTask] = addTask.mock.calls[0];expect(nextTask.metadata.effort).toBeUndefined();});++ it('inherits a task-level effort into a stage that has no effort pin of its own', async () => {+ // Effort is SET-only on hand-off: a task-level effort (from the interval+ // config) must reach stage 1+ via the metadata carry-forward, not be wiped.+ const task = { id: 't', taskType: 'user', metadata: { effort: 'high', pipeline: runningPipeline() } };+ await handlePipelineProgression(task, 'agent-1', true);+ const [nextTask] = addTask.mock.calls[0];+ expect(nextTask.metadata.effort).toBe('high');+ });});