← Commit history
Merge PR #649: 0.2.135: read adom-fields 0.10.18 fitsCellMm (fits-cell-0.2.135 -> main) merge
Showing changes introduced by the merge (against its first parent).
6 files changed
+27−15
Cargo.lock+11−11@@ -4,7 +4,7 @@ version = 4 [[package]] name = "adom-aiflow"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-analyze", "aiflow-board",@@ -28,7 +28,7 @@ dependencies = [ [[package]] name = "aiflow-analyze"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-board", "aiflow-sys",@@ -39,7 +39,7 @@ dependencies = [ [[package]] name = "aiflow-board"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-sys", "roxmltree",@@ -49,7 +49,7 @@ dependencies = [ [[package]] name = "aiflow-bridge"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-board", "aiflow-sys",@@ -59,7 +59,7 @@ dependencies = [ [[package]] name = "aiflow-copper"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-board", "aiflow-grid",@@ -70,7 +70,7 @@ dependencies = [ [[package]] name = "aiflow-grid"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-board", "serde",@@ -79,7 +79,7 @@ dependencies = [ [[package]] name = "aiflow-place"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-board", "aiflow-sys",@@ -89,7 +89,7 @@ dependencies = [ [[package]] name = "aiflow-pours"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-board", "aiflow-copper",@@ -100,7 +100,7 @@ dependencies = [ [[package]] name = "aiflow-router"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-board", "aiflow-grid",@@ -111,7 +111,7 @@ dependencies = [ [[package]] name = "aiflow-run"-version = "0.2.134"+version = "0.2.135" dependencies = [ "aiflow-sys", "serde",@@ -120,7 +120,7 @@ dependencies = [ [[package]] name = "aiflow-sys"-version = "0.2.134"+version = "0.2.135" dependencies = [ "serde_json", ]
Cargo.toml+1−1@@ -15,7 +15,7 @@ members = [ ] [workspace.package]-version = "0.2.134"+version = "0.2.135" edition = "2021" license = "MIT" repository = "https://wiki.adom.inc/adom/adom-aiflow"
crates/adom-aiflow/src/fields_pitch.rs+8−1@@ -88,7 +88,9 @@ pub fn plan_lines(reply: &Value, spec: &Value) -> Vec<String> { let mb = |v: &Value| v.as_f64().map(|m| format!("{m:.0} MB")); if let Some(refused) = plan["refused"].as_str() { let mut l = format!("Adom Fields would refuse this solve: {refused}");- if let Some(c) = fitting_cell(refused) { l.push_str(&format!(". Set the spec's cell: \"fieldsPitch\": {c}")); }+ // adom-fields 0.10.18 names it (plan.fitsCellMm, null when nothing up to 1 mm fits); 0.10.17 only in the text+ let fits = if plan.get("fitsCellMm").is_some() { plan["fitsCellMm"].as_f64() } else { fitting_cell(refused) };+ if let Some(c) = fits { l.push_str(&format!(". Set the spec's cell: \"fieldsPitch\": {c}")); } else if !spec["fieldsPitch"].is_null() { l.push_str(". Or remove spec fieldsPitch so Fields fits the cell itself"); } return vec![l]; }@@ -160,6 +162,11 @@ mod tests { assert_eq!(super::fitting_cell(refused["plan"]["refused"].as_str().unwrap()), Some(0.5)); let l = super::plan_lines(&refused, &json!({"fieldsPitch": 0.2})); assert!(l[0].starts_with("Adom Fields would refuse this solve") && l[0].ends_with("\"fieldsPitch\": 0.5"), "{l:?}");+ // adom-fields 0.10.18: the cell that fits is a field; null when none does, whatever the text says+ let structured = json!({"plan": {"refused": "at --pitch 0.2 this board needs 1.8 GB: --pitch 0.5 fits (about 324 MB)", "fitsCellMm": 0.45, "fitsEstimateMb": 300}});+ assert!(super::plan_lines(&structured, &json!({}))[0].ends_with("\"fieldsPitch\": 0.45"));+ let nothing = json!({"plan": {"refused": "even a 1 mm cell doesn't fit", "fitsCellMm": null}});+ assert!(!super::plan_lines(¬hing, &json!({}))[0].contains("\"fieldsPitch\":")); let none_fits = json!({"plan": {"refused": "this board needs about 673 MB at a 0.2 mm cell and only 50 MB is free; even a 1 mm cell doesn't fit"}}); assert!(super::fitting_cell(none_fits["plan"]["refused"].as_str().unwrap()).is_none()); let given = json!({"availableMb": 10637.0, "plan": {"cellMm": 0.4, "cellChosen": "given", "estimateMb": 190.0}});
docs/release-0.2.135.mdadded+5@@ -0,0 +1,5 @@+# adom-aiflow 0.2.135++## Fields names the cell that fits (adom-fields 0.10.18)++When adom-fields' memory plan refuses a cell, 0.10.18 names the cell that fits as a field (`plan.fitsCellMm`, null when no cell up to 1 mm fits). `step current|thermal` and `analyze` read it for the spec line they suggest (`"fieldsPitch": 0.5`), and read it from the refusal's text only with adom-fields 0.10.17. Nothing else changes.
package.json+1−1@@ -1,7 +1,7 @@ { "slug": "adom-aiflow", "type": "app",- "version": "0.2.134",+ "version": "0.2.135", "title": "AI Flow", "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad, Fusion 360 and Altium Designer today (the same steps and gates through each tool's bridge); Adom's own web apps next.", "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",
page.json+1−1@@ -1,7 +1,7 @@ { "slug": "adom-aiflow", "type": "app",- "version": "0.2.134",+ "version": "0.2.135", "title": "AI Flow", "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad, Fusion 360 and Altium Designer today (the same steps and gates through each tool's bridge); Adom's own web apps next.", "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",