Skip to content

The design language that makes your AI harness better at design.

JavaScript

Fix: responsive and ship capture the entry --artifact names (#1094) (#1120)

Abdul Wahab65b735c32967
diff --git a/crates/comp-verbs/src/build_phase.rs b/crates/comp-verbs/src/build_phase.rs
index 6dff6a97b..e1695b48c 100644
--- a/crates/comp-verbs/src/build_phase.rs
+++ b/crates/comp-verbs/src/build_phase.rs
@@ -2417,7 +2417,7 @@ fn hash_file(io: &Io, file: &str) -> Option<String> {
Some(d.iter().map(|b| format!("{b:02x}")).collect::<String>()[..12].to_string())
}
-fn gate_responsive(io: &Io, state: &mut Value, min: f64, out_dir: &str, renderer: Option<&dyn EntryRenderer>) -> Gate {
+fn gate_responsive(io: &Io, state: &mut Value, min: f64, out_dir: &str, artifact: Option<&str>, renderer: Option<&dyn EntryRenderer>) -> Gate {
let pending = Gate::fail(vec!["responsive comparison has not completed".into()]);
if let Err(e) = unavailable_report(io, out_dir, &pending, "responsive") {
return Gate::fail(vec![format!("cannot persist responsive gate evidence: {e}")]);
@@ -2427,7 +2427,7 @@ fn gate_responsive(io: &Io, state: &mut Value, min: f64, out_dir: &str, renderer
let _ = unavailable_report(io, out_dir, &gate, "responsive");
return gate;
}
- let native=match prepare_native_capture(io,state,None,renderer,EntryStage::Responsive) {Ok(value)=>value,Err(gate)=>{let _=unavailable_report(io,out_dir,&gate,"responsive");return gate;}};
+ let native=match prepare_native_capture(io,state,artifact,renderer,EntryStage::Responsive) {Ok(value)=>value,Err(gate)=>{let _=unavailable_report(io,out_dir,&gate,"responsive");return gate;}};
let mut gate = gate_responsive_inner(io, state, min, out_dir, native.as_ref());
if gate.ok && native.is_none() {
let after = crate::completion::input_hash(&io.cwd);
@@ -2719,7 +2719,7 @@ fn run_gate(io: &Io, state: &mut Value, phase: &str, opts: &GateOpts, organic_sc
let min = opts.min.unwrap_or(HERO_MIN);
gate_hero(io, state, &build_path, min, ".impeccable/review/diff/hero", opts.artifact.as_deref(), organic_scan, renderer)
}
- "responsive" => gate_responsive(io, state, opts.min.unwrap_or(RESPONSIVE_MIN), ".impeccable/review/diff/desktop", renderer),
+ "responsive" => gate_responsive(io, state, opts.min.unwrap_or(RESPONSIVE_MIN), ".impeccable/review/diff/desktop", opts.artifact.as_deref(), renderer),
// No measurement here, but the build still stands on the approved comp.
_ => match comp_refusal(io) { Some(why) => Gate::fail(vec![why]), None => Gate::ok("no mechanical gate".into()) },
}
@@ -3668,7 +3668,7 @@ pub fn run_with_renderer(argv: &[String],io: &mut Io,organic_scan: OrganicScan,r
if disposition == "ship" && (state["capturePolicy"] == "native-html-v1"
|| io.env("IMPECCABLE_NATIVE_CAPTURE") == Some("1")) {
let gate = gate_responsive(io, &mut state, RESPONSIVE_MIN,
- ".impeccable/review/diff/desktop", renderer);
+ ".impeccable/review/diff/desktop", arg(argv, "artifact"), renderer);
let at = now();
let responsive = &mut state["phases"]["responsive"];
responsive["attempts"] = json!(responsive["attempts"].as_u64().unwrap_or(0) + 1);
diff --git a/crates/comp-verbs/src/build_phase/integrity_tests.rs b/crates/comp-verbs/src/build_phase/integrity_tests.rs
index 7bc43a832..bc3d44b99 100644
--- a/crates/comp-verbs/src/build_phase/integrity_tests.rs
+++ b/crates/comp-verbs/src/build_phase/integrity_tests.rs
@@ -466,7 +466,7 @@ fn responsive_rejects_a_contradicted_control_even_above_the_overall_bar() {
let png = png_io::encode_png(image, &[]).unwrap();
ws.write(".impeccable/review/desktop.png", &png);
ws.write(".impeccable/review/mobile.png", &png);
- let gate = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None);
+ let gate = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None, None);
let report: Value = serde_json::from_slice(&std::fs::read(ws.path.join("diff/report.json")).unwrap()).unwrap();
assert!(report["overall"].as_f64().unwrap() >= RESPONSIVE_MIN);
if !accepted {
@@ -544,7 +544,7 @@ fn responsive_revalidates_legacy_or_changed_plate_receipts() {
util::json_pretty(&json!({"comp":"comp.png","regions":[region]})).as_bytes(),
);
state["plates"] = json!({"art":{"status":"ok","score":0.9}});
- let g = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None);
+ let g = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None, None);
assert!(!g.ok, "a missing asset cannot inherit legacy approval");
assert!(
g.reasons.iter().any(|r| r.contains("plate missing")),
@@ -594,7 +594,7 @@ fn responsive_failures_replace_previous_success_evidence() {
let image = std::fs::read(ws.path.join("comp.png")).unwrap();
ws.write(".impeccable/review/desktop.png", &image);
ws.write(".impeccable/review/mobile.png", &image);
- let good = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None);
+ let good = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None, None);
assert!(good.ok, "{:?}", good.reasons);
let report: Value =
serde_json::from_slice(&std::fs::read(ws.path.join("diff/report.json")).unwrap())
@@ -608,7 +608,7 @@ fn responsive_failures_replace_previous_success_evidence() {
std::fs::remove_file(ws.path.join("diff/regions/button.png")).unwrap();
std::fs::create_dir(ws.path.join("diff/regions/button.png")).unwrap();
}
- let bad = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None);
+ let bad = gate_responsive(&ws.io(), &mut state, RESPONSIVE_MIN, "diff", None, None);
assert!(!bad.ok);
assert_no_current_measurements(&ws);
let report: Value =
@@ -635,7 +635,7 @@ fn failed_preflight_clears_complete_evidence_for_both_gates() {
ws.write(".impeccable/review/desktop.png", &image);
ws.write(".impeccable/review/mobile.png", &image);
let run = |state: &mut Value| if responsive {
- gate_responsive(&ws.io(), state, RESPONSIVE_MIN, "diff", None)
+ gate_responsive(&ws.io(), state, RESPONSIVE_MIN, "diff", None, None)
} else {
gate_hero(&ws.io(), state, "comp.png", HERO_MIN, "diff", Some("index.html"), &no_organic_scan, None)
};
@@ -1132,7 +1132,7 @@ fn responsive_does_not_relitigate_an_accepted_first_viewport_score() {
let current = reviewed_hero(true, false);
let run = |approved: Option<&Image>| {
let mut state = json!({"comp":"comp.png","capturePolicy":"native-html-v1","phases":{}});
- gate_responsive(&ws.io(), &mut state, 0.999, "diff", Some(&DesktopRenderer { desktop: png(&current), approved: approved.map(png) }))
+ gate_responsive(&ws.io(), &mut state, 0.999, "diff", None, Some(&DesktopRenderer { desktop: png(&current), approved: approved.map(png) }))
};
let unreviewed = run(None);
assert!(!unreviewed.ok && unreviewed.reasons.iter().any(|r| r.contains("scores")), "{:?}", unreviewed.reasons);
@@ -1251,7 +1251,7 @@ fn responsive_calls_a_region_pushed_below_the_first_viewport_displaced_not_missi
let mut state = json!({"comp":"comp.png","phases":{}});
// A full-page desktop capture: the sign-off is there, 40px lower, past the frame.
ws.write(".impeccable/review/desktop.png", &png_io::encode_png(&menu_page(40.0, 480, true), &[]).unwrap());
- let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None);
+ let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None, None);
assert!(!gate.ok);
let reason = gate.reasons.iter().find(|r| r.contains("sign-off")).unwrap();
assert!(reason.contains("is displaced, not missing") && reason.contains("about 40px lower") && reason.contains("400x360 first viewport"), "{reason}");
@@ -1266,12 +1266,12 @@ fn responsive_calls_a_region_pushed_below_the_first_viewport_displaced_not_missi
assert_eq!(region["blocking"], true);
// A native frame is the first viewport alone: the column above says where it went.
ws.write(".impeccable/review/desktop.png", &png_io::encode_png(&menu_page(40.0, 360, true), &[]).unwrap());
- let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None);
+ let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None, None);
let reason = gate.reasons.iter().find(|r| r.contains("sign-off")).unwrap();
assert!(reason.contains("is displaced, not missing: the content above it in its column sits about"), "{reason}");
// Gone is still missing.
ws.write(".impeccable/review/desktop.png", &png_io::encode_png(&menu_page(0.0, 360, false), &[]).unwrap());
- let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None);
+ let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None, None);
assert!(gate.reasons.iter().any(|r| r == "at desktop width, region sign-off is missing"), "{:?}", gate.reasons);
assert_eq!(gate.worst_crops[0]["verdict"], "missing");
}
@@ -1294,7 +1294,7 @@ fn a_missing_control_does_not_borrow_its_identical_neighbour() {
{"id":"first","kind":"control","medium":"semantic","note":"first icon control","box":{"x":0.19,"y":0.49,"w":0.16,"h":0.09},"px":{"x":38,"y":98,"w":32,"h":18}},
{"id":"second","kind":"control","medium":"semantic","note":"second icon control","box":{"x":0.19,"y":0.61,"w":0.16,"h":0.09},"px":{"x":38,"y":122,"w":32,"h":18}}]})).as_bytes());
let mut state = json!({"comp":"comp.png","phases":{}});
- let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None);
+ let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None, None);
assert!(gate.reasons.iter().any(|r| r == "at desktop width, region second is missing"), "{:?} {:?}", gate.reasons, gate.advisories);
// Two distinct controls that both moved down a row: the first lands in the
// second's old box, which the second no longer occupies, so it is found.
@@ -1307,7 +1307,7 @@ fn a_missing_control_does_not_borrow_its_identical_neighbour() {
bars(&mut desktop, 148.);
ws.write("comp.png", &png(&comp));
ws.write(".impeccable/review/desktop.png", &png(&desktop));
- let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None);
+ let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None, None);
let report: Value = serde_json::from_slice(&std::fs::read(ws.path.join("diff/report.json")).unwrap()).unwrap();
assert!(!gate.reasons.iter().any(|r| r.contains("region first is missing")), "{:?} {}", gate.reasons, report["regions"]);
assert!(gate.advisories.iter().any(|a| a.contains("region first sits about 24px lower")), "{:?}", gate.advisories);
@@ -1322,7 +1322,7 @@ fn responsive_reads_a_region_shifted_inside_the_first_viewport_as_drift() {
r::fill_rect(&mut moved, 230.0 + k as f64 * 22.0, 306.0, 14.0, 18.0, [20.0, 20.0, 20.0, 255.0]);
}
ws.write(".impeccable/review/desktop.png", &png_io::encode_png(&moved, &[]).unwrap());
- let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None);
+ let gate = gate_responsive(&ws.io(), &mut state, 0.1, "diff", None, None);
assert!(gate.ok, "{:?}", gate.reasons);
assert!(gate.advisories.iter().any(|a| a.starts_with("(advisory, still inside the first viewport) at desktop width, region sign-off sits about 24px higher")), "{:?}", gate.advisories);
}
@@ -1346,7 +1346,7 @@ fn a_present_plate_off_its_box_at_desktop_width_is_drift_not_missing() {
r::blit(&mut desktop, &r::crop(&comp, 10., 10., 60., 60.), 26., 26.);
ws.write(".impeccable/review/desktop.png", &png(&desktop));
ws.write(".impeccable/review/mobile.png", &png(&desktop));
- let gate = gate_responsive(&io, &mut state, 0.1, "diff", None);
+ let gate = gate_responsive(&io, &mut state, 0.1, "diff", None, None);
assert!(!gate.reasons.iter().any(|r| r.contains("art is missing")), "{:?}", gate.reasons);
let report: Value = serde_json::from_slice(&std::fs::read(ws.path.join("diff/report.json")).unwrap()).unwrap();
assert_eq!(report["regions"][0]["verdict"], "drift", "{report}");
@@ -1369,7 +1369,7 @@ fn reviewed_desktop_workspace() -> Workspace {
fn run_reviewed_desktop(ws: &Workspace, current: &Image, approved: Option<&Image>, min: f64) -> (Gate, Value) {
let png = |i: &Image| png_io::encode_png(i, &[]).unwrap();
let mut state = json!({"comp":"comp.png","capturePolicy":"native-html-v1","phases":{}});
- let gate = gate_responsive(&ws.io(), &mut state, min, "diff", Some(&DesktopRenderer { desktop: png(current), approved: approved.map(png) }));
+ let gate = gate_responsive(&ws.io(), &mut state, min, "diff", None, Some(&DesktopRenderer { desktop: png(current), approved: approved.map(png) }));
let report = serde_json::from_slice(&std::fs::read(ws.path.join("diff/report.json")).unwrap()).unwrap();
(gate, report)
}
@@ -1569,6 +1569,43 @@ fn native_ship_is_refused_when_an_input_changes_while_the_final_capture_runs() {
assert!(reasons.iter().any(|r| r.as_str().unwrap().contains("capture input changed: index.html")), "{reasons:?}");
}
+/// Records the entry each capture asked for, then defers to `ManifestRenderer`.
+struct RecordingRenderer { inner: ManifestRenderer, asked: std::cell::RefCell<Vec<String>> }
+impl EntryRenderer for RecordingRenderer {
+ fn capture_entry(&self, request: &EntryRequest) -> Result<Box<dyn CapturedEntry>, String> {
+ self.asked.borrow_mut().push(request.artifact.clone());
+ self.inner.capture_entry(request)
+ }
+}
+
+#[test]
+fn responsive_and_ship_capture_the_entry_artifact_names() {
+ // The recorded artifact is a framework source route; --artifact names the built entry.
+ let (ws, desktop) = finished_native_workspace();
+ ws.write("src/pages/index.astro", b"<h1>Headline</h1>");
+ let mut state = load_state(&ws.io()).unwrap();
+ state["artifact"] = json!("src/pages/index.astro");
+ save_state(&ws.io(), &state);
+ let renderer = RecordingRenderer { inner: ManifestRenderer { desktop, changed_during: None }, asked: Default::default() };
+ let mut io = ws.io();
+ let ship = ["finish", "--disposition", "ship", "--artifact", "index.html"].map(String::from);
+ assert_eq!(run_with_renderer(&ship, &mut io, &no_organic_scan, Some(&renderer)), 0);
+ assert_eq!(*renderer.asked.borrow(), ["index.html"]);
+ let state = load_state(&io).unwrap();
+ assert_eq!(state["artifact"], "src/pages/index.astro");
+ assert_eq!(crate::completion::report(&ws.path, Some(&state), Some("owner"))["status"], "complete");
+
+ renderer.asked.borrow_mut().clear();
+ let mut state = load_state(&io).unwrap();
+ state["phase"] = json!("responsive");
+ state["phases"]["responsive"]["status"] = json!("open");
+ save_state(&io, &state);
+ let advance = ["advance", "--artifact", "index.html"].map(String::from);
+ assert_eq!(run_with_renderer(&advance, &mut io, &no_organic_scan, Some(&renderer)), 0);
+ assert_eq!(*renderer.asked.borrow(), ["index.html"]);
+ assert_eq!(load_state(&io).unwrap()["artifact"], "src/pages/index.astro");
+}
+
/// A native renderer whose capture leaves no input manifest.
struct BareRenderer(Vec<u8>);
impl EntryRenderer for BareRenderer {
diff --git a/docs/CLI-CONTRACT.md b/docs/CLI-CONTRACT.md
index 0faa3d6ba..0dc5e4321 100644
--- a/docs/CLI-CONTRACT.md
+++ b/docs/CLI-CONTRACT.md
@@ -595,7 +595,7 @@ Ported from the former `skill/scripts/{comp-spec,comp-diff,font-match,build-phas
**The approved comp is a fixed reference (engine addition).** When a comp is approved (`build-phase start --comp <png>`, the comps gate closing on the approved sidecar, or, for a build that has neither, the first `comp-spec --regions` on the comp `state.json` names), the engine copies its bytes to `.impeccable/build/approved-comp.<ext>` and writes `.impeccable/build/approved-comp.json` (`comp`, `pixelSha256`, `fileSha256`, `copy`, `at`). `pixelSha256` is the identity `comp-spec` writes as `compSha256` (SHA-256 of width, height and decoded RGBA, so a metadata-only rewrite such as `embed-prompt` is not an edit); it is decoded from the file's own bytes, and `comp-spec` measures and hashes that same decode (`png_io::decode_source`: PNG, WebP, JPEG or GIF from the file's own bytes; `load_raster` also decodes non-PNG sources directly on every read, so a stale conversion can never stand in for an edited source). Before anything measures against the comp, every entry point compares the comp's current pixels with that record (or, for a build that predates the record, with the spec's `compSha256`; the build's own spec then keeps the copy when they agree and no record exists, a spec at another path never does): the spec, plates, hero, sections, motion and responsive gates (so `advance`, `record hero`, `check-plate`, and the hero, responsive and plate revalidations), `finish --disposition ship`, `comp-spec --crop`, `comp-spec --comp <build comp> --regions` while a build state names that comp, `font-match --measure` / `--rank`, and `comp-diff` (against the spec's `compSha256` and the record when its `--spec` measures the `--comp` it was given, otherwise against the record kept for that `--comp`, if any). A missing or undecodable comp with a recorded identity is refused the same way, the hash clause reading `is missing or not a decodable image: expected pixel sha256 <approved>`. The build's own spec (`.impeccable/build/spec.json`, which every build-phase check reads, and `comp-spec --crop` / `font-match` / `comp-diff` when they are given that path) must measure the recorded comp: one that measures another file (a composite saved under a new name and re-specced) is refused with `.impeccable/build/spec.json measures <comp>, but the approved comp is <approved>.`, the fixed-reference sentence, and the instruction to re-run `comp-spec --regions` on the approved comp or start a new build on a newly approved file. A spec at another path is checked only against its own comp's record and `compSha256`, so independent crops stay possible, and the first-check keep never replaces a record kept for another comp. For a build that predates the record, `comp-spec --regions` compares the comp with the `compSha256` of the spec it is about to replace and refuses on a mismatch instead of adopting the edited pixels. When the copy or record cannot be written, approval refuses: `start --comp` exits 1 (`build-phase: start refused: cannot keep the approved comp: writing <path> failed (...)`), the comps gate stays open with that reason (also when the approved comp is not a decodable PNG, WebP or JPEG, and also under a quoted `--force`, which keeps the copy before closing; a quoted `--force` never waives this reason, and `advance` adds `--force refused: a quoted downgrade can relax the comp round, but never close it on an approved comp the engine cannot keep as the fixed reference; fix the reason above and advance again`), and `comp-spec --regions` exits 2. A mismatch is refused before any measurement (gate reason, or stderr with exit 2 for the verbs) with: `the approved comp <comp> has changed since approval: expected pixel sha256 <approved>, found <current>. The approved comp is the fixed reference every gate measures against; never edit it, composite into it, or regenerate it. Nothing was measured against the changed file. Restore it with <IMPECCABLE> build-phase restore-comp (the engine kept the approved copy at <copy>), then regenerate the plates or change the page code until they match the unchanged comp.` When no intact copy exists the last two sentences read `No intact engine copy exists for this build: restore the approved file from its original source, then regenerate the plates or change the page code until they match the unchanged comp.` A spec whose `compSha256` differs from the record (re-measured on an edited comp) is refused with `.impeccable/build/spec.json was measured on an image that is not the approved comp (spec compSha256 <spec>, approved <approved>): re-measuring an edited comp does not move the reference.` followed by the fixed-reference sentence and the instruction to re-run `comp-spec --regions` on the approved comp. `build-phase start --reset --comp <png>` naming the recorded comp while its pixels differ is refused (exit 2, `build-phase: start refused: ...`), adding that a newly approved comp is saved under a new file name; `start --direction` forgets the record, since its comp round approves a new comp. `build-phase restore-comp` (no state needed) verifies the copy against `pixelSha256`, moves the edited file to `.impeccable/build/edited-comp-<first 12 hex of its pixel hash>.<ext>` (outside `.impeccable/mocks/`, where the comps gate would count it), writes the copy back, and prints `RESTORED <comp> from <copy> (pixel sha256 <hash>). The edited file is kept at <path> as evidence, not as a comp. Re-run the step that refused; plates and page code built against the edited comp now have to match the approved one.` (exit 0; `comp <comp> already holds the approved pixels (sha256 <hash>); nothing restored` when nothing changed). It exits 1 when no record exists and 2 when the copy no longer matches the record. Gates measure against the editable path once it holds the approved pixels again, rather than silently against the copy, because the crop and font tools, `comp-diff` and the finish reviewer all read that path.
- `build-phase finish --disposition ship` binds the finish to the page it checked. Under native capture (`capturePolicy: "native-html-v1"` or `IMPECCABLE_NATIVE_CAPTURE=1`) ship first re-runs the responsive gate with a fresh native capture of the current files (an input that changes while that capture runs fails it, reopens responsive and records `fix`), then records `finish.artifactSha256` and `finish.captureInputs`, the `{path, sha256}` rows of the manifest that capture bound (`.impeccable/review/native/responsive/inputs.json`: the entry, the static files the capture froze, the spec and the comp). When that manifest is missing or unreadable, ship is refused (exit 2, `finish` recorded as `fix` with reason `final native capture manifest unavailable`) rather than recorded with entry-only binding. Under the screenshot policy ship refuses while the frontend files differ from the responsive screenshots and records `finish.artifactInputsSha256`; no `captureInputs` is recorded. `build-phase completion` reports `status: "changed-after-finish"` when the entry or any recorded capture input differs from what finish bound (a deleted file counts as changed, the entry included, so a deleted entry reads `changed-after-finish` rather than `unverified`), and lists the changed paths, entry first, in `changedSinceFinish`. Printed `NEXT` lines: in the review phase, `Spawn the finish reviewer ... --disposition <word>. Make every fix before ship: <recheck>, and any edit after it, a fix for a hook finding included, needs ship recorded again.`; after a ship that still covers the page, `Finish is recorded for the current entry. Any later edit to a file the final check bound (the page, what it loads, the spec, the comp), a fix for a hook finding included, voids it: run <IMPECCABLE> build-phase finish --disposition ship again before you stop; <recheck>.`; after one that no longer does, `A file the final check bound changed after finish (<up to six changed paths>), so the recorded ship no longer covers the build. Repeat final review if the change goes beyond a fix it asked for, then run <IMPECCABLE> build-phase finish --disposition ship again; <recheck>.` `<recheck>` is `ship re-captures the current files natively and must pass the responsive gate again` under native capture and `ship refuses while the frontend files differ from the responsive screenshots, so recapture desktop and mobile and advance responsive first` otherwise.
+ `build-phase finish --disposition ship` binds the finish to the page it checked. Under native capture (`capturePolicy: "native-html-v1"` or `IMPECCABLE_NATIVE_CAPTURE=1`) `advance` (hero and responsive) and `finish --disposition ship` take `--artifact <entry>` to name the entry that call captures, without rewriting the entry recorded at `start`; ship first re-runs the responsive gate with a fresh native capture of the current files (an input that changes while that capture runs fails it, reopens responsive and records `fix`), then records `finish.artifactSha256` and `finish.captureInputs`, the `{path, sha256}` rows of the manifest that capture bound (`.impeccable/review/native/responsive/inputs.json`: the entry, the static files the capture froze, the spec and the comp). When that manifest is missing or unreadable, ship is refused (exit 2, `finish` recorded as `fix` with reason `final native capture manifest unavailable`) rather than recorded with entry-only binding. Under the screenshot policy ship refuses while the frontend files differ from the responsive screenshots and records `finish.artifactInputsSha256`; no `captureInputs` is recorded. `build-phase completion` reports `status: "changed-after-finish"` when the entry or any recorded capture input differs from what finish bound (a deleted file counts as changed, the entry included, so a deleted entry reads `changed-after-finish` rather than `unverified`), and lists the changed paths, entry first, in `changedSinceFinish`. Printed `NEXT` lines: in the review phase, `Spawn the finish reviewer ... --disposition <word>. Make every fix before ship: <recheck>, and any edit after it, a fix for a hook finding included, needs ship recorded again.`; after a ship that still covers the page, `Finish is recorded for the current entry. Any later edit to a file the final check bound (the page, what it loads, the spec, the comp), a fix for a hook finding included, voids it: run <IMPECCABLE> build-phase finish --disposition ship again before you stop; <recheck>.`; after one that no longer does, `A file the final check bound changed after finish (<up to six changed paths>), so the recorded ship no longer covers the build. Repeat final review if the change goes beyond a fix it asked for, then run <IMPECCABLE> build-phase finish --disposition ship again; <recheck>.` `<recheck>` is `ship re-captures the current files natively and must pass the responsive gate again` under native capture and `ship refuses while the frontend files differ from the responsive screenshots, so recapture desktop and mobile and advance responsive first` otherwise.
---