pbakaus/impeccable · error

build-phase: comp {c} does not exist

Error message

build-phase: comp {c} does not exist

What it means

When `build-phase start --comp <path>` is given, the CLI checks that the comp file exists (abs(io, c).exists()) before starting. If the path does not resolve to an existing file, it prints 'build-phase: comp {c} does not exist' and exits 1.

Source

Thrown at crates/comp-verbs/src/build_phase.rs:1824

/// `impeccable build-phase <cmd> ...`
pub fn run(argv: &[String], io: &mut Io, organic_scan: OrganicScan) -> i32 {
    let cmd = argv.first().map(String::as_str);
    if cmd.is_none() || flag(argv, "help") {
        io.err("usage: build-phase.mjs start --comp <png> [--breakpoint WxH] | status [--json] | advance [--force --reason \"...\"] | record hero --build <png> | scaffold | note \"<text>\" | finish --disposition <word>\n");
        return 1;
    }
    let cmd = cmd.unwrap();
    if cmd == "start" {
        let comp = arg(argv, "comp");
        let direction = arg(argv, "direction");
        if comp.is_none() && direction.is_none() {
            io.err("build-phase: start needs --comp <approved comp png> (comp already approved) or --direction <seed key> (comp round still to run)\n");
            return 1;
        }
        if let Some(c) = comp {
            if !abs(io, c).exists() {
                io.err(&format!("build-phase: comp {c} does not exist\n"));
                return 1;
            }
        }
        if direction.is_some() && arg(argv, "kind").is_some() {
            io.out("choice ping skipped\n");
        }
        let _ = std::fs::remove_file(abs(io, &format!("{BUILD_DIR}/pending.json")));
        let build_path = read_build_path(io);
        if direction.is_some() && comp.is_none() && build_path.as_deref() == Some("code") {
            io.out("CODE-LED (from .impeccable config): no comp round and no phase gates. Write the direction contract (reference/new-work.md section 5), build, and finish per section 7. The chosen decision comp, if any, rides to the finish review as the critique reference.\n");
            return 0;
        }
        let mut breakpoint = arg(argv, "breakpoint").map(String::from);
        if breakpoint.is_none() {
            if let Some(c) = comp {
                if let Ok(img) = load_raster(io, c) {
                    breakpoint = Some(format!("{}x{}", img.width, img.height));
                }

View on GitHub (pinned to 2bc2879276)

Solutions

  1. Verify the path with ls/cat before running; expand ~ and $VARS in the shell
  2. Run the command from the project root so relative paths resolve
  3. Confirm the exact filename and extension of the exported comp
  4. If using --direction instead, drop --comp entirely

Example fix

// before
$ impeccable build-phase start --comp ./comps/hero.png
// after (path verified to exist)
$ impeccable build-phase start --comp .impeccable/comps/hero-approved.png
Defensive patterns

Strategy: validation

Validate before calling

[ -f "$COMP" ] || { echo "comp not found: $COMP"; exit 1; }
impeccable build-phase start --comp "$COMP"

Try / catch

if ! impeccable build-phase start --comp "$COMP"; then ls -l "$(dirname "$COMP")"; fi

Prevention

When it happens

Trigger: `impeccable build-phase start --comp <path>` where the path is missing, deleted, misnamed, or relative to a different working directory than the one the CLI resolves against.

Common situations: Typo in the filename or extension (e.g. .jpg vs .png); running from a different cwd than where the comp lives; the comp export was never saved or was cleaned up; using a path with unexpanded shell variables like ~ or $VAR.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08). Data as JSON: /api/errors/5817aa1f2967bbd6. Report an issue: GitHub.