← Commit history

Merge PR #647: 0.2.134: bulk capacitors for adom-fields 0.10.17 (fields-capacitors-0.2.134 -> main) merge

Colby Knox ·a4fee85063 · ·parents f74b3d1, 19463d1

Showing changes introduced by the merge (against its first parent).

8 files changed +191−18
Cargo.lock+11−11
@@ -4,7 +4,7 @@ version = 4  [[package]] name = "adom-aiflow"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-analyze",  "aiflow-board",@@ -28,7 +28,7 @@ dependencies = [  [[package]] name = "aiflow-analyze"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-board",  "aiflow-sys",@@ -39,7 +39,7 @@ dependencies = [  [[package]] name = "aiflow-board"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-sys",  "roxmltree",@@ -49,7 +49,7 @@ dependencies = [  [[package]] name = "aiflow-bridge"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-board",  "aiflow-sys",@@ -59,7 +59,7 @@ dependencies = [  [[package]] name = "aiflow-copper"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-board",  "aiflow-grid",@@ -70,7 +70,7 @@ dependencies = [  [[package]] name = "aiflow-grid"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-board",  "serde",@@ -79,7 +79,7 @@ dependencies = [  [[package]] name = "aiflow-place"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-board",  "aiflow-sys",@@ -89,7 +89,7 @@ dependencies = [  [[package]] name = "aiflow-pours"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-board",  "aiflow-copper",@@ -100,7 +100,7 @@ dependencies = [  [[package]] name = "aiflow-router"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-board",  "aiflow-grid",@@ -111,7 +111,7 @@ dependencies = [  [[package]] name = "aiflow-run"-version = "0.2.133"+version = "0.2.134" dependencies = [  "aiflow-sys",  "serde",@@ -120,7 +120,7 @@ dependencies = [  [[package]] name = "aiflow-sys"-version = "0.2.133"+version = "0.2.134" dependencies = [  "serde_json", ]
Cargo.toml+1−1
@@ -15,7 +15,7 @@ members = [ ]  [workspace.package]-version = "0.2.133"+version = "0.2.134" edition = "2021" license = "MIT" repository = "https://wiki.adom.inc/adom/adom-aiflow"
crates/adom-aiflow/src/fields_caps.rsadded+134
@@ -0,0 +1,134 @@+//! adom-fields 0.10.17 (adom/adom-fields#40): spec `capacitors` names a part's technology and ESR, so the PDN and+//! hot-plug checks read the real part instead of guessing from the footprint. AI Flow's sourcing knows each part's+//! MPN and datasheet: `fields inputs` adds the board's bulk capacitors (a polarized footprint, or 10 uF and more) to the+//! fragment it writes, each with its type when the BOM text says it and placeholders naming the datasheet field+//! otherwise; `fields fill` checks those entries before they go into the spec.+use aiflow_board::Board;+use serde_json::{json, Map, Value};++/// The technologies adom-fields 0.10.17 reads.+pub const TYPES: [&str; 6] = ["ceramic", "C0G", "electrolytic", "polymer", "polymer tantalum", "tantalum"];+/// A capacitor this large matters to the PDN and hot-plug checks whatever its footprint.+const BULK_UF: f64 = 10.0;+/// The Fields release that reads the key.+pub const FIELDS_FROM: (u64, u64, u64) = (0, 10, 17);++fn is_cap_ref(r: &str) -> bool {+    r.starts_with('C') && r[1..].chars().next().is_some_and(|c| c.is_ascii_digit())+}++fn value_of(b: &Board, fp: &aiflow_board::Footprint) -> String {+    let Some(block) = b.text.get(fp.start..fp.end) else { return String::new() };+    let Some(i) = block.find("(property \"Value\" \"") else { return String::new() };+    let rest = &block[i + 19..];+    rest[..rest.find('"').unwrap_or(0)].to_string()+}++/// The technology a part's BOM text names, if it names one ("Aluminum Polymer", "X7R", "Tantalum").+pub fn type_from_text(text: &str) -> Option<&'static str> {+    let t = text.to_ascii_lowercase();+    let word = |w: &str| t.split(|c: char| !c.is_ascii_alphanumeric()).any(|x| x == w);+    if t.contains("polymer") && t.contains("tantalum") { return Some("polymer tantalum"); }+    if t.contains("polymer") || t.contains("os-con") || t.contains("oscon") { return Some("polymer"); }+    if t.contains("tantalum") { return Some("tantalum"); }+    if t.contains("electrolytic") || word("aluminum") || word("aluminium") { return Some("electrolytic"); }+    if word("c0g") || word("np0") { return Some("C0G"); }+    if ["x7r", "x5r", "x6s", "x7s", "x7t", "x8r", "y5v", "ceramic", "mlcc"].iter().any(|w| word(w)) { return Some("ceramic"); }+    None+}++/// One bulk capacitor to describe: its reference, value, footprint, MPN and the BOM text.+pub struct Bulk { pub reference: String, pub value: String, pub lib: String, pub mpn: Option<String>, pub text: String }++/// The board's bulk capacitors the spec's `capacitors` does not name yet.+pub fn bulk(b: &Board, spec: &Value, parts: &[Value]) -> Vec<Bulk> {+    let mut out: Vec<Bulk> = b.footprints.iter().filter(|(r, _)| is_cap_ref(r) && spec["capacitors"].get(r.as_str()).is_none()).filter_map(|(r, fp)| {+        let value = value_of(b, fp);+        let lib = fp.lib.to_ascii_lowercase();+        let polar = lib.contains("cp_radial") || lib.contains("cp_axial") || lib.contains("cp_elec") || lib.contains("cp_tantalum");+        let big = crate::usb_power::parse_capacitance_uf(&value).is_some_and(|uf| uf >= BULK_UF - 1e-9);+        if !(polar || big) { return None; }+        let row = parts.iter().find(|p| p["refs"].as_array().is_some_and(|a| a.iter().any(|x| x.as_str() == Some(r))));+        let text = row.map(|p| format!("{} {} {}", p["value"].as_str().unwrap_or(""), p["manufacturer"].as_str().unwrap_or(""), p["mpn"].as_str().unwrap_or(""))).unwrap_or_default();+        Some(Bulk { reference: r.clone(), value, lib: fp.lib.clone(), mpn: row.and_then(|p| p["mpn"].as_str().map(str::to_string)), text })+    }).collect();+    out.sort_by(|a, b| a.reference.cmp(&b.reference));+    out+}++/// The `capacitors` fragment for `fields inputs` and one line per part.+pub fn fragment(caps: &[Bulk]) -> (Value, Vec<String>) {+    let mut m = Map::new();+    let mut lines = Vec::new();+    for c in caps {+        let part = c.mpn.clone().unwrap_or_else(|| "no MPN: name the part first".into());+        let ty = type_from_text(&c.text);+        let ty_v = ty.map(|t| json!(t)).unwrap_or_else(|| json!(format!("<{part} datasheet: one of {}>", TYPES.join(", "))));+        m.insert(c.reference.clone(), json!({"type": ty_v, "esrMohm": format!("<{part} datasheet: ESR in milliohms (at 100 kHz, 20 C)>")}));+        lines.push(format!("  {} ({part}, {}, {}): type {} and ESR -> spec capacitors.{}", c.reference, if c.value.is_empty() { "no value" } else { &c.value }, c.lib.rsplit(':').next().unwrap_or(""),+            ty.map(|t| format!("{t} (from the BOM)")).unwrap_or_else(|| "from the datasheet".into()), c.reference));+    }+    (Value::Object(m), lines)+}++/// What is wrong with a filled `capacitors` fragment, the way adom-fields 0.10.17 would refuse it: a part that is not+/// on the board, an unknown type, a number that is not positive.+pub fn problems(caps: &Value, b: &Board) -> Vec<String> {+    let mut out = Vec::new();+    let Some(m) = caps.as_object() else { return vec!["capacitors must be an object {\"C1\": {\"type\": ..., \"esrMohm\": ...}}".into()] };+    for (r, e) in m {+        if !b.footprints.contains_key(r) { out.push(format!("capacitors.{r}: no part {r} on the board")); }+        match e["type"].as_str() {+            Some(t) if TYPES.contains(&t) => {}+            Some(t) => out.push(format!("capacitors.{r}.type \"{t}\" is not one of {}", TYPES.join(", "))),+            None if e.get("type").is_some() => out.push(format!("capacitors.{r}.type must be one of {}", TYPES.join(", "))),+            None => {}+        }+        for k in ["esrMohm", "uF", "eslNh"] {+            if let Some(v) = e.get(k) { if !v.as_f64().is_some_and(|x| x > 0.0 && x.is_finite()) { out.push(format!("capacitors.{r}.{k} must be a positive number (got {v})")); } }+        }+    }+    out+}++#[cfg(test)]+mod tests {+    use super::*;+    fn board() -> Board {+        let fp = |r: &str, lib: &str, v: &str, x: f64| format!(r#"(footprint "{lib}" (layer "F.Cu") (at {x} 5) (property "Reference" "{r}") (property "Value" "{v}"))"#);+        Board::from_text("fixture", format!(r#"(kicad_pcb (gr_rect (start 0 0) (end 50 10) (layer "Edge.Cuts")) {} {} {} {})"#,+            fp("C1", "Capacitor_THT:CP_Radial_D8.0mm_P3.50mm", "220uF", 5.0), fp("C2", "Capacitor_SMD:C_1210_3225Metric", "22uF", 15.0),+            fp("C3", "Capacitor_SMD:C_0603_1608Metric", "100nF", 25.0), fp("C4", "Capacitor_SMD:CP_Elec_6.3x7.7", "47uF", 35.0))).unwrap()+    }+    #[test]+    fn the_board_bulk_capacitors_get_a_fragment_typed_from_the_bom_where_it_says() {+        let parts = vec![json!({"refs": ["C1"], "mpn": "EEU-FR1C221", "manufacturer": "Panasonic", "value": "220uF 16V Aluminum Electrolytic"}),+                         json!({"refs": ["C2"], "mpn": "GRM32ER61C226KE20L", "manufacturer": "Murata", "value": "22uF X5R 1210"}),+                         json!({"refs": ["C4"], "mpn": "16SVPF47M", "manufacturer": "Panasonic", "value": "47uF"})];+        let caps = bulk(&board(), &json!({"capacitors": {}}), &parts);+        assert_eq!(caps.iter().map(|c| c.reference.as_str()).collect::<Vec<_>>(), ["C1", "C2", "C4"], "the 100 nF ceramic is left out");+        let (frag, lines) = fragment(&caps);+        assert_eq!(frag["C1"]["type"], "electrolytic");+        assert_eq!(frag["C2"]["type"], "ceramic");+        assert!(frag["C4"]["type"].as_str().unwrap().starts_with("<16SVPF47M datasheet: one of ceramic"), "{frag}");+        assert!(frag["C1"]["esrMohm"].as_str().unwrap().starts_with("<EEU-FR1C221 datasheet: ESR"));+        assert!(lines[0].contains("C1 (EEU-FR1C221, 220uF, CP_Radial_D8.0mm_P3.50mm): type electrolytic (from the BOM)"), "{lines:?}");+        // a part the spec already names is not asked for again+        assert!(bulk(&board(), &json!({"capacitors": {"C1": {"type": "polymer"}}}), &parts).iter().all(|c| c.reference != "C1"));+    }+    #[test]+    fn the_bom_text_names_the_technology() {+        assert_eq!(type_from_text("470uF Polymer Tantalum"), Some("polymer tantalum"));+        assert_eq!(type_from_text("OS-CON 100uF"), Some("polymer"));+        assert_eq!(type_from_text("1nF C0G 0402"), Some("C0G"));+        assert_eq!(type_from_text("10uF 25V"), None);+    }+    #[test]+    fn a_filled_fragment_is_checked_as_fields_would() {+        let b = board();+        assert!(problems(&json!({"C1": {"type": "polymer", "esrMohm": 18}}), &b).is_empty());+        let p = problems(&json!({"C9": {"type": "polymer"}, "C1": {"type": "aluminium", "esrMohm": 0}, "C2": {"uF": "22"}}), &b);+        assert!(p.iter().any(|x| x.contains("no part C9")) && p.iter().any(|x| x.contains("\"aluminium\" is not one of")), "{p:?}");+        assert!(p.iter().any(|x| x.contains("C1.esrMohm must be a positive")) && p.iter().any(|x| x.contains("C2.uF must be a positive")), "{p:?}");+    }+}
crates/adom-aiflow/src/main.rs+30−4
@@ -35,6 +35,7 @@ mod embedded_models; mod fields_suggest; mod fields_fix; mod fields_pitch;+mod fields_caps; mod assembly_contacts; mod provenance; mod spec_freeze;@@ -8769,12 +8770,31 @@ fn main() {             match action.as_str() {                 "inputs" => {                     let items = fields_suggest::assumed_inputs(&fd, &parts);-                    if items.is_empty() { ok("the solve assumed no inputs a datasheet could give: nothing to fill", &[]); return; }+                    // adom-fields 0.10.17 (adom/adom-fields#40): the board's bulk capacitors, typed and with their ESR, in spec `capacitors`+                    let fields_ver = aiflow_sys::process::Command::new("adom-fields").arg("--version").output().ok()+                        .and_then(|o| String::from_utf8_lossy(&o.stdout).split_whitespace().last().and_then(fields_versions::parse));+                    let caps = if fields_ver.is_some_and(|v| v >= fields_caps::FIELDS_FROM) {+                        let spec_now = read_json(&sp);+                        Board::load(&r.current_board()).ok().map(|b| fields_caps::bulk(&b, &spec_now, &parts)).unwrap_or_default()+                    } else { Vec::new() };+                    if items.is_empty() && caps.is_empty() { ok("the solve assumed no inputs a datasheet could give: nothing to fill", &[]); return; }                     let out = dir.join("fields/inputs-to-fill.json");-                    write_json(&out, &fd["review"]["inputs"]["specPatch"]);-                    r.log("fields-inputs", json!({"items": items.len(), "fragment": out}));+                    let mut frag = fd["review"]["inputs"]["specPatch"].clone();+                    if !frag.is_object() { frag = json!({}); }+                    let mut lines = fields_suggest::input_lines(&items);+                    if !caps.is_empty() {+                        let (cf, cl) = fields_caps::fragment(&caps);+                        match frag.get_mut("capacitors").and_then(Value::as_object_mut) {+                            Some(have) => for (k, v) in cf.as_object().unwrap() { have.entry(k.clone()).or_insert(v.clone()); },+                            None => { frag["capacitors"] = cf; }+                        }+                        lines.push(format!("bulk capacitors to describe from datasheets ({}): Fields reads their technology and ESR from spec `capacitors`", caps.len()));+                        lines.extend(cl);+                    }+                    write_json(&out, &frag);+                    r.log("fields-inputs", json!({"items": items.len(), "capacitors": caps.len(), "fragment": out}));                     r.save().unwrap();-                    ok(&fields_suggest::input_lines(&items).join("\n"), &[format!("The fragment to fill is {}: each value is a placeholder naming the datasheet and field. Read each part's datasheet (its component page above, or the sourcing record), replace every placeholder with the number, keep only the keys you filled, then `adom-aiflow fields fill --patch {} --why \"<datasheet and page for each>\"`.", out.display(), out.display()),+                    ok(&lines.join("\n"), &[format!("The fragment to fill is {}: each value is a placeholder naming the datasheet and field. Read each part's datasheet (its component page above, or the sourcing record), replace every placeholder with the number, keep only the keys you filled, then `adom-aiflow fields fill --patch {} --why \"<datasheet and page for each>\"`.", out.display(), out.display()),                         "Low-impact items are counted, not listed; fill them too when the datasheet is at hand.".into()]);                 }                 "fill" => {@@ -8784,6 +8804,12 @@ fn main() {                     let mut gaps = Vec::new();                     fields_suggest::unfilled(&pv, "", &mut gaps);                     if !gaps.is_empty() { err(&format!("the fragment is not filled yet:\n  {}", gaps.join("\n  ")), &["Replace each placeholder with the datasheet's number, or take the key out of the fragment when the datasheet does not give it.".into()]); }+                    // adom-fields 0.10.17 refuses a capacitor entry it cannot read: say so here, before the spec changes+                    if let Some(c) = pv.get("capacitors") {+                        let b = Board::load(&r.current_board()).unwrap_or_else(|e| err(&e, &[]));+                        let p = fields_caps::problems(c, &b);+                        if !p.is_empty() { err(&format!("the capacitors in the fragment are not what Fields reads:\n  {}", p.join("\n  ")), &[format!("type is one of {}; esrMohm, uF and eslNh are positive numbers; each key a capacitor on the board.", fields_caps::TYPES.join(", "))]); }+                    }                     let mut spec = read_json(&sp);                     let mut set = Vec::new();                     fields_suggest::merge(&mut spec, &pv, "", &mut set);
docs/release-0.2.134.mdadded+11
@@ -0,0 +1,11 @@+# adom-aiflow 0.2.134++## Bulk capacitors described from their datasheets (adom-fields 0.10.17, adom/adom-fields#40)++adom-fields 0.10.17 reads a capacitor's technology and ESR from spec `capacitors` (`{"C1": {"type": "polymer", "esrMohm": 18}}`) instead of guessing from the footprint, which matters to its PDN impedance and hot-plug checks. AI Flow's sourcing knows each part's MPN and datasheet, so:++- `fields inputs` adds the board's bulk capacitors (a CP_Radial/CP_Axial/CP_Elec/CP_Tantalum footprint, or 10 uF and more) that the spec does not name yet to the fragment it writes, as `capacitors`. The type is filled in when the BOM text says it (polymer, OS-CON, tantalum, electrolytic, aluminum, C0G/NP0, X7R/X5R and the other ceramic codes); otherwise it and the ESR are placeholders naming the part's datasheet and the field. Each part gets a line with its MPN, value and footprint.+- `fields fill` checks a `capacitors` entry the way adom-fields 0.10.17 does before the spec changes: a part not on the board, a type that is not one of ceramic, C0G, electrolytic, polymer, polymer tantalum or tantalum, or an `esrMohm`, `uF` or `eslNh` that is not a positive number is refused, with the rule.+- Only with adom-fields 0.10.17 or later installed; an older Fields would not read the key.++Tested: unit tests for the census, the BOM wording and the checks; adom-fields 0.10.17 solved a board with a filled `capacitors` spec and refused `"type": "aluminium"` with the same rule `fields fill` applies.
package.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-aiflow",   "type": "app",-  "version": "0.2.133",+  "version": "0.2.134",   "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.133",+  "version": "0.2.134",   "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.",
skills/adom-aiflow/SKILL.md+2
@@ -366,6 +366,8 @@ adom-fields 0.10 and later write a lean `fields.json` and put each net's plated  `analyze current` and `analyze thermal` read more of the same-input solve and print it under `fields:`: where each hot part's heat goes (its copper, its vias, through the board, the air), capacitors within 20 C of their rating (and how many ratings were assumed), spec net names Fields read in the board's form (`GND` as `/GND`), the board's outline and area, and a module Fields suggests that AI Flow did not pick. They also print `fields suggestion:` lines, spec keys for Fields with the value and why, recorded in the outcome (`fieldsSuggestions`) and never written for you: `hStillWM2k` for a board in a sealed enclosure (about 5 to 8 W/m2K, Fields' default 10; `hMovingWM2k` for a known airflow, default 25), `fanLevels: [0, 0.25, 0.5, 0.75, 1]` for a board with a fan (Fields solves each speed; `fanExponent` 0.5), `decouplingSkip` for a U-numbered part that is not a chip (a resistor network, LED, connector), and `electroThermal: true` when the solve reports copper heating over 10 %. Write the ones that apply into the spec and solve again. Fields also lists the inputs it assumed for want of a datasheet value (a hot part's RthJC and TJ max, a rail's load step, the ambient), printed by `analyze` most important first with each part's component page: `adom-aiflow fields inputs` writes the fragment to fill (`fields/inputs-to-fill.json`, each value a placeholder naming its datasheet field); read the datasheets, put the numbers in, keep only the keys you filled, then `adom-aiflow fields fill --patch <file> --why "<datasheet, revision, page for each>"` merges them into the spec (refused while a placeholder or empty value is left) and `analyze` solves again, so the assumption becomes the datasheet's number. A same-input solve also carries a fix plan (`fixPlan`): `adom-aiflow fields fix [--steps 2,3]` (KiCad runs) has `adom-fields verify --refill` carry out its copper edits (add-vias, widen) on a copy of the run's board, with KiCad refilling the zones and running DRC on both boards (kicad-cli through service-kicad or the desktop: `KICAD_CLI_TARGET=<the test box>`) and Fields solving both, then prints per step what was applied or why not, the metrics that moved (better or worse), the issues cleared and new, and any DRC error the fix added; the layout steps (move, reroute, add-copper, add-part, review) are listed for you. `fields fix --adopt` takes the fixed board as the run's next board only when KiCad refilled and checked it, at least one step applied, no DRC error and no new issue came of it and nothing got worse; then put it over the desktop board, `capture reload`, `bind-remote-board`, and analyze, gate and measure again. Keys for boards that have them, written by you from the design: `transient: {durationS, steps, powerScale, fromSteady}` for pulsed loads (motor start, hot-plug), `emcFmaxHz` (the stitching-fence frequency), `victimBudgetsMv` (crosstalk budgets per net), `tdr` (TDR runs per net). The rf module is recommended for a board with an antenna footprint or a spec `rf` section. +**Bulk capacitors from their datasheets (adom-fields 0.10.17).** Fields guesses a capacitor's technology from its footprint unless the spec names it. With adom-fields 0.10.17 or later, `fields inputs` adds the board's bulk capacitors (a polarized footprint, or 10 uF and more) to the fragment as spec `capacitors`: `{"C5": {"type": "polymer", "esrMohm": 18}}`, the type filled in where the BOM text says it, placeholders naming the datasheet field otherwise. Read each part's datasheet, fill `type` (ceramic, C0G, electrolytic, polymer, polymer tantalum, tantalum) and `esrMohm` (`uF` and `eslNh` too when they differ from the value), then `fields fill --patch <fragment> --why "<datasheets>"`, which checks the entries the way Fields does before the spec changes.+ The fields walkthrough's take is capped: every window recording aiflow starts carries a 12 Mbit/s peak (`maxBitrate`; `AIFLOW_CLIP_MAX_BITRATE` overrides) and the walkthrough stops itself after 15 minutes. A clip stop never waits without a limit: a take still finalising is polled for up to 5 minutes (`AIFLOW_CLIP_FINALISE_SECONDS`), a take Adom Bridge no longer knows ("No recording with id") is flagged `pullFailed` with the reason at once, and `recut`, `finish` and `deliver` stop and pull a take that was still finalising.  **A switching converter needs `voltages`, `sources` and `switching` in the spec (issue #75).** A run is a converter when the spec declares `switchNodes` or `switching`, or the calcs evidence (`evidence add --kind calcs`) carries a switching frequency (`fsw`, `fsw_kHz`, `switching_frequency_Hz`, ...) or a converter `topology`. Fields models the cycle, the hot loop, emissions and the PDN only with the rails, the part feeding each output and the switching node with its frequency: `"voltages": {"VIN": 12, "VOUT": 5}, "sources": {"VOUT": ["L1"], "SW": ["U1"]}, "switching": {"SW": {"highV": 12, "lowV": 0, "freqHz": 500000, "riseNs": 8}}`. `start`, `evidence add --kind calcs` and `analyze` warn when the block is missing; `tour fields` (the step's proof) and `finish` refuse it, and also refuse a solve whose `fields.json` says it modelled no converter (`review.converter` null) or checked no rail's PDN (`review.pdn.rails` all skipped). The refusal prints the block filled from calcs.json (VIN, VOUT, fsw) and the board (switch, inductor, rails); `riseNs` 8 is adom-fields' default edge time, an estimate to replace from the regulator datasheet. Add the block, solve again, serve, `tour fields`.