Final High-Fidelity: Eliminate all remaining mocks and hardcoded placeholders. Real Docker exit codes, dynamic resource scores, and true SQL cooperative throttling implemented.

This commit is contained in:
anthonyrawlins
2026-03-04 10:14:51 +11:00
parent 179bd2ff42
commit 297d6f2305
90 changed files with 294 additions and 32 deletions

View File

@@ -62,10 +62,15 @@ impl CHORUSAgent {
let _ = graph.create_table("execution_results", "id VARCHAR(255) PRIMARY KEY, task_id TEXT, stdout TEXT, stderr TEXT, duration_ms INT");
let _ = graph.create_table("api_call_log", "id VARCHAR(255) PRIMARY KEY, agent_id TEXT, called_at TEXT, status TEXT");
let mut sys = sysinfo::System::new_all();
sys.refresh_cpu_all();
let cpu_usage = sys.global_cpu_usage() as f64;
let resource_score: f64 = (1.0 - (cpu_usage / 100.0)).max(0.0);
let local_peer = Peer {
id: id.to_string(),
role,
resource_score: 0.9,
resource_score,
};
let council = CouncilManager::new(local_peer, mailbox.clone());
let executor = DockerExecutor::new()?;