{"record":{"id":"c641ac6889e7b687","repo":"pbakaus/impeccable","slug":"build-phase-record-hero-build-png","errorCode":null,"errorMessage":"build-phase: record hero --build <png>\n","messagePattern":"build-phase: record hero --build <png>\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/comp-verbs/src/build_phase.rs","lineNumber":1904,"sourceCode":"            io.out(&format!(\"  {}   one custom property set per region (--r-<id>-x/y/w/h in % of the comp; --r-<id>-cap, --r-<id>-font, --r-<id>-weight where measured); bind these to your own markup\\n\", out.css));\n            io.out(&format!(\"  {}  a reference page: every region positioned at its box inside a {bp} frame, plates placed with object-fit: contain, text slots at the measured cap height in the ranked face\\n\", out.html));\n            io.out(\"  The reference is a check, not the page: keep your own semantic structure and bind the numbers to it (an element per region, its box from the properties). Overlapping boxes are overlapping boxes. What the gate reads is pixels; a page that lands each region at its box passes whatever markup it uses.\\n\");\n            0\n        }\n        \"note\" => {\n            let text = argv[1..].iter().filter(|a| !a.starts_with(\"--\")).cloned().collect::<Vec<_>>().join(\" \");\n            let phase = state.get(\"phase\").and_then(Value::as_str).unwrap_or(\"\").to_string();\n            if let Some(notes) = state.pointer_mut(&format!(\"/phases/{phase}/notes\")).and_then(|v| v.as_array_mut()) {\n                notes.push(json!({ \"at\": now(), \"text\": text }));\n            }\n            save_state(io, &state);\n            io.out(&format!(\"noted on {phase}\\n\"));\n            0\n        }\n        \"record\" => {\n            let which = argv.get(1).map(String::as_str);\n            if which != Some(\"hero\") {\n                io.err(\"build-phase: record hero --build <png>\\n\");\n                return 1;\n            }\n            let build_path = arg(argv, \"build\").unwrap_or(HERO_REPRO).to_string();\n            let min = arg(argv, \"min\").map(|m| util::parse_f64(m, HERO_MIN)).unwrap_or(HERO_MIN);\n            let gate = gate_hero(io, &mut state, &build_path, min, \".impeccable/review/diff/hero\", None, organic_scan);\n            let records = state.pointer(\"/phases/hero/records\").and_then(Value::as_i64).unwrap_or(0) + 1;\n            if let Some(h) = state.pointer_mut(\"/phases/hero\").and_then(|v| v.as_object_mut()) {\n                h.insert(\"records\".into(), json!(records));\n                h.insert(\"gate\".into(), gate.record_json(&now()));\n            }\n            save_state(io, &state);\n            let spec = load_spec(&abs(io, SPEC_PATH));\n            let plate_rows: Vec<String> = gate\n                .region_verdicts\n                .iter()\n                .filter(|(id, _)| {\n                    spec.as_ref()\n                        .and_then(|s| spec_regions(s).into_iter().find(|r| r.get(\"id\").and_then(Value::as_str) == Some(id.as_str())))","sourceCodeStart":1886,"sourceCodeEnd":1922,"githubUrl":"https://github.com/pbakaus/impeccable/blob/2bc2879276c1f321a53c4ca99d3371e411329b52/crates/comp-verbs/src/build_phase.rs#L1886-L1922","documentation":"The `build-phase record` subcommand only supports recording the hero artifact: its first argument must be the literal 'hero'. Any other token (or none) prints 'build-phase: record hero --build <png>' as a usage hint and exits 1.","triggerScenarios":"`impeccable build-phase record` with no artifact argument, or with something other than 'hero' (e.g. `record cta --build x.png`, `record --build x.png`).","commonSituations":"Assuming record accepts other section names; omitting the artifact word and jumping straight to flags; typo like `record hreo`.","solutions":["Use exactly `impeccable build-phase record hero --build <png>`","Note --build defaults to HERO_REPRO if omitted, but the artifact word 'hero' is required","Check the spelling of 'hero'"],"exampleFix":"// before\n$ impeccable build-phase record --build shots/hero.png\n// after\n$ impeccable build-phase record hero --build shots/hero.png","handlingStrategy":"validation","validationCode":"[ \"$2\" = \"hero\" ] || { echo 'usage: build-phase record hero --build <png>'; exit 1; }","typeGuard":null,"tryCatchPattern":"impeccable build-phase record hero --build \"$PNG\" || impeccable build-phase --help","preventionTips":["Only `hero` is currently a recordable artifact; check release notes for new artifacts","Keep the artifact word before flags in argv order","Copy the exact usage line when scripting"],"tags":["cli","usage","invalid-argument"],"backgroundTag":"invalid-cli-argument","analyzedSha":"2bc2879276c1f321a53c4ca99d3371e411329b52","analyzedAt":"2026-09-08T04:51:14.109Z","contentChangedAt":"2026-09-08T04:51:14.109Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}