diff --git a/v3/@claude-flow/neural/__tests__/algorithms.test.ts b/v3/@claude-flow/neural/__tests__/algorithms.test.ts index 37b270dafb..b2c451bcfc 100644 --- a/v3/@claude-flow/neural/__tests__/algorithms.test.ts +++ b/v3/@claude-flow/neural/__tests__/algorithms.test.ts @@ -393,7 +393,8 @@ describe('PPO Algorithm', () => { const result = ppo.update(); - expect(result.policyLoss).toBeGreaterThanOrEqual(0); + // Policy loss can be negative in PPO (we minimize -surrogate_objective) + expect(typeof result.policyLoss).toBe('number'); expect(result.valueLoss).toBeGreaterThanOrEqual(0); expect(result.entropy).toBeGreaterThanOrEqual(0); });