{"record":{"id":"0c126947755467d6","repo":"pbakaus/impeccable","slug":"build-phase-finish-disposition-ship-fix-rebuild","errorCode":null,"errorMessage":"build-phase: finish --disposition ship|fix|rebuild|recapture\n","messagePattern":"build-phase: finish --disposition ship\\|fix\\|rebuild\\|recapture\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/comp-verbs/src/build_phase.rs","lineNumber":1998,"sourceCode":"                return 2;\n            }\n            io.out(&format!(\n                \"ADVANCED {} -> {}{}{}\\n\",\n                res.phase,\n                res.next.clone().unwrap_or_default(),\n                if res.forced { \" (FORCED; recorded)\" } else { \"\" },\n                res.gate_summary.map(|s| format!(\"  {s}\")).unwrap_or_default()\n            ));\n            for a in &res.advisories {\n                io.out(&format!(\"  {a}\\n\"));\n            }\n            io.out(&format!(\"NEXT {}\\n\", next_instruction(io, &state)));\n            0\n        }\n        \"finish\" => {\n            let disposition = arg(argv, \"disposition\");\n            if !matches!(disposition, Some(\"ship\") | Some(\"fix\") | Some(\"rebuild\") | Some(\"recapture\")) {\n                io.err(\"build-phase: finish --disposition ship|fix|rebuild|recapture\\n\");\n                return 1;\n            }\n            let disposition = disposition.unwrap();\n            let open_before: Vec<String> = PHASES\n                .iter()\n                .filter(|&&ph| {\n                    ph != \"review\"\n                        && state\n                            .pointer(&format!(\"/phases/{ph}/status\"))\n                            .and_then(Value::as_str)\n                            .map(|st| st != \"closed\" && st != \"skipped\")\n                            .unwrap_or(false)\n                })\n                .map(|s| s.to_string())\n                .collect();\n            if disposition == \"ship\" && !open_before.is_empty() {\n                let phase = state.get(\"phase\").and_then(Value::as_str).unwrap_or(\"\");\n                io.err(&format!(","sourceCodeStart":1980,"sourceCodeEnd":2016,"githubUrl":"https://github.com/pbakaus/impeccable/blob/2bc2879276c1f321a53c4ca99d3371e411329b52/crates/comp-verbs/src/build_phase.rs#L1980-L2016","documentation":"The `build-phase finish` subcommand requires a --disposition flag whose value is one of the four allowed words: ship, fix, rebuild, recapture. Any other value or a missing flag prints this usage error and exits 1 before any state transition happens.","triggerScenarios":"`impeccable build-phase finish` with no --disposition, or --disposition with an unrecognized value (e.g. 'done', 'Ship', 'shipped') — the matches! guard only accepts the exact lowercase words.","commonSituations":"Free-form disposition words instead of the enum; capitalized values (matching is case-sensitive); forgetting the flag entirely.","solutions":["Pass exactly one of: --disposition ship, fix, rebuild, or recapture (lowercase)","If unsure which disposition applies, run `impeccable build-phase status` to see the current phase guidance","Avoid synonyms like 'shipped' or 'Done'; the enum is strict"],"exampleFix":"// before\n$ impeccable build-phase finish --disposition Done\n// after\n$ impeccable build-phase finish --disposition ship","handlingStrategy":"validation","validationCode":"case \"$DISPOSITION\" in ship|fix|rebuild|recapture) ;; *) echo 'disposition must be ship|fix|rebuild|recapture'; exit 1;; esac","typeGuard":null,"tryCatchPattern":"impeccable build-phase finish --disposition \"$DISPOSITION\" || impeccable build-phase --help","preventionTips":["Treat disposition as a strict lowercase enum: ship|fix|rebuild|recapture","Use status output to decide the disposition before finishing","Never pass free-form words; script the exact enum values"],"tags":["cli","usage","enum","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"2bc2879276c1f321a53c4ca99d3371e411329b52","analyzedAt":"2026-09-08T04:51:14.109Z","contentChangedAt":"2026-09-08T04:51:14.109Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}