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
fix: suppress duplicate goal fidelity alerts
[._.]/ Adam Eivyec9dd4db1af4
diff --git a/server/services/agentFinalization.goalFidelity.test.js b/server/services/agentFinalization.goalFidelity.test.jsindex 03b60c1f07..983d364a9f 100644--- a/server/services/agentFinalization.goalFidelity.test.js+++ b/server/services/agentFinalization.goalFidelity.test.js@@ -545,6 +545,17 @@ describe('finalizeAgent — goal-fidelity gate', () => {});});+ it('does not raise a separate hold alert when a follow-up task carries the finding', async () => {+ runGoalFidelityFollowUpMock.mockResolvedValue({+ ran: true,+ task: { id: 'cos-9', approvalRequired: true, duplicate: false },+ });+ await finalize();+ expect(completion().success).toBe(false);+ expect(completion().goalFidelity.followUp).toMatchObject({ taskId: 'cos-9', taskApprovalRequired: true });+ expect(cosEvents.emit).not.toHaveBeenCalledWith(GOAL_FIDELITY_HOLD_EVENT, expect.anything());+ });+it('hands investigators the selected issue objective and the commits actually reviewed', async () => {const head = 'a'.repeat(40);const base = 'b'.repeat(40);diff --git a/server/services/agentFinalization.js b/server/services/agentFinalization.jsindex 42faf54115..e8f97ee03e 100644--- a/server/services/agentFinalization.js+++ b/server/services/agentFinalization.js@@ -1301,10 +1301,6 @@ export async function finalizeAgent({error: analysis.message,completionReason: GOAL_FIDELITY_CATEGORY,});- // The Review Hub bridges this into a review alert: a run held because it- // built the wrong thing is exactly the case a human has to look at, and the- // named missing/unrequested items are what make the hold actionable.- cosEvents.emit(GOAL_FIDELITY_HOLD_EVENT, { agentId, taskId: task?.id, review: fidelity.review });}// A finding that lives only in this run's record dies with the agent card// nobody opened. When the user has configured it, the follow-up files the@@ -1341,6 +1337,14 @@ export async function finalizeAgent({}}+ if (fidelityDowngrade && !fidelity.review.followUp?.taskId) {+ // The Review Hub bridges this into a review alert when no follow-up task+ // exists. A queued (or deduplicated) CoS investigation already carries the+ // same finding, including when it is waiting for approval, so a second+ // dismissible alert only asks the user to triage the same work twice.+ cosEvents.emit(GOAL_FIDELITY_HOLD_EVENT, { agentId, taskId: task?.id, review: fidelity.review });+ }+if (verdict.success && isTruthyMetaFn) {await persistSimplifySummaries(agentId, task, outputBuffer, isTruthyMetaFn);}