Release validation: tests green, USB pack, fleet UX and API hardening.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Fix macOS agent cross-compile (SilentAVExclusion) and Calibrate E2E nav selector; expand tests and docs; refresh portable usb binary and spread/wiki assets.
This commit is contained in:
AetherForge
2026-06-06 16:57:39 -07:00
parent 5229854f00
commit 415b5dc6a3
119 changed files with 7005 additions and 3082 deletions

View File

@@ -0,0 +1,36 @@
import { describe, expect, it } from 'vitest';
import { agentStatsUnchanged } from './wsStatsCoalesce';
import { mockAgent } from '../test/fixtures';
describe('agentStatsUnchanged', () => {
it('returns true when payload matches current agent stats', () => {
const agent = mockAgent({
hashrate_15s: 100,
hashrate_1m: 90,
hashrate_15m: 80,
cpu_usage_pct: 12,
});
expect(
agentStatsUnchanged(agent, {
agent_id: agent.id,
hashrate_15s: 100,
hashrate_1m: 90,
hashrate_15m: 80,
cpu_usage_pct: 12,
}),
).toBe(true);
});
it('returns false when hashrate changes', () => {
const agent = mockAgent({ hashrate_15s: 100, hashrate_1m: 90, hashrate_15m: 80, cpu_usage_pct: 12 });
expect(
agentStatsUnchanged(agent, {
agent_id: agent.id,
hashrate_15s: 101,
hashrate_1m: 90,
hashrate_15m: 80,
cpu_usage_pct: 12,
}),
).toBe(false);
});
});