Add phenotype cloning, failure atlas, AI court session, and clearance L0-L4
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 02:41:54 -07:00
parent 4b94776432
commit d9f36f182c
47 changed files with 4859 additions and 94 deletions

View File

@@ -0,0 +1,45 @@
/**
* @vitest-environment node
*/
import { describe, expect, it } from 'vitest';
import { buildLotlTimelineModel } from './lotlTimeline';
import type { Agent } from '../types';
function agent(partial: Partial<Agent>): Agent {
return {
id: 'x',
name: 'n',
wallet: '',
ip: '1.1.1.1',
version: '1',
status: 'online',
cpu_cores: 4,
memory_gb: 8,
last_seen: '',
created_at: '',
hashrate_15s: 0,
hashrate_1m: 0,
hashrate_15m: 0,
shares_total: 0,
shares_good: 0,
shares_bad: 0,
cpu_usage_pct: 0,
memory_usage_pct: 0,
uptime_seconds: 0,
...partial,
};
}
describe('buildLotlTimelineModel atlas skips', () => {
it('marks powershell tier skipped_by_atlas when ps_inmemory is blocked', () => {
const model = buildLotlTimelineModel(
agent({}),
['docker', 'powershell', 'dotnet'],
[],
[],
[{ tier: 'ps_inmemory', condition: 'defender_on', reason: '5 failures' }],
);
const ps = model.tiers.find((t) => t.tier === 'powershell');
expect(ps?.state).toBe('skipped_by_atlas');
});
});