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: keep reviewer health out of user-action ledger (#8286)
[._.]/ Adam Eivy57d4c972092a
diff --git a/server/services/codeReview.js b/server/services/codeReview.jsindex ea140463cf..8e0442cbd1 100644--- a/server/services/codeReview.js+++ b/server/services/codeReview.js@@ -77,6 +77,8 @@ export async function reportReviewerFailure(reviewer, error, now = Date.now()) {const code = typeof result.code === 'string' ? result.code : nullconst isConfigFault = isReviewerConfigFault(code)if (!isConfigFault && !isReviewerQuotaFailure(message)) return false+ // Reviewer telemetry is not a user action. The standalone claim bridge must+ // not initialize the live user-action database while updating local health.await updateSettingsWith((settings) => ({...settings,codeReview: {@@ -88,7 +90,7 @@ export async function reportReviewerFailure(reviewer, error, now = Date.now()) {: { pausedUntil: now + REVIEWER_PAUSE_MS, reason: 'quota', lastFailureAt: now },},},- }))+ }), { skipUserAction: true })cachedDefaults = nullreturn true}@@ -110,7 +112,7 @@ export async function reportReviewerSuccess(reviewer, now = Date.now()) {...(Object.keys(remaining).length ? { reviewerHealth: remaining } : {}),},}- })+ }, { skipUserAction: true })if (cleared) cachedDefaults = nullreturn cleared}diff --git a/server/services/codeReview.test.js b/server/services/codeReview.test.jsindex 1cb9197d25..72c02d35dd 100644--- a/server/services/codeReview.test.js+++ b/server/services/codeReview.test.js@@ -63,6 +63,7 @@ import {__resetThinkingUnsupportedCache,} from './codeReview.js'import { MODEL_SELECTABLE_REVIEWERS, EFFORT_SELECTABLE_REVIEWERS } from '../lib/cosValidation.js'+import { updateSettingsWith } from './settings.js'// Minimal stand-ins for the deps resolveReviewLoopOptions is handed by its// callers (agentCliSpawning / agentCompletionCleanup) — kept trivial so the@@ -306,12 +307,14 @@ describe('codeReview helpers', () => {expect(reviewerConfigFaultsFromHealth(mockedSettings.current.codeReview)).toEqual({ollama: { code: 'NO_MODEL', lastFailureAt: 100 },})+ expect(vi.mocked(updateSettingsWith).mock.lastCall[1]).toEqual({ skipUserAction: true })expect(await getReviewerConfigHealth()).toMatchObject({status: 'warning',configFaults: { ollama: { code: 'NO_MODEL' } },})await reportReviewerSuccess('ollama', 200)+ expect(vi.mocked(updateSettingsWith).mock.lastCall[1]).toEqual({ skipUserAction: true })expect(reviewerConfigFaultsFromHealth(mockedSettings.current.codeReview)).toEqual({})expect(await getReviewerConfigHealth()).toEqual({ status: 'ok', configFaults: {} })})