feature-factory 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/factory.js +13 -6
- package/package.json +1 -1
package/bin/factory.js
CHANGED
|
@@ -1039,12 +1039,19 @@ const HANDLERS = {
|
|
|
1039
1039
|
const at = stamp(flags);
|
|
1040
1040
|
const next = await transition(runDir, {
|
|
1041
1041
|
participants: [{ familyId: "envelope", mode: "terminalize" }],
|
|
1042
|
-
apply: (state) =>
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1042
|
+
apply: (state) => {
|
|
1043
|
+
// Enforcement, not instruction: `completed` is the only terminal status that asserts the run earned a
|
|
1044
|
+
// result, and the ordering that gave it meaning -- publish, then terminalize with reason
|
|
1045
|
+
// `draft-pr-recorded` -- lived in WORKFLOW.md alone, so a driver that skipped the work could still
|
|
1046
|
+
// record success. mimir 1483 did exactly that: ~70 seconds, no commits, no pushed branch, no PR, and
|
|
1047
|
+
// a status a consumer binding on `status == "completed"` read as a shipped epic. `blocked` and
|
|
1048
|
+
// `partial` stay unguarded because they claim less, and cleanup re-terminalizes an already-published
|
|
1049
|
+
// run whose `pr_url` is set, so it still passes.
|
|
1050
|
+
if (status === "completed" && !state.pr_url) {
|
|
1051
|
+
throw new CliError("factory terminal completed requires a recorded pr_url; use blocked or partial");
|
|
1052
|
+
}
|
|
1053
|
+
return { ...state, updated_at: at, status, terminal_result: { status, reason: flags.reason } };
|
|
1054
|
+
},
|
|
1048
1055
|
});
|
|
1049
1056
|
return emit(flags, { run_id: runId, status: next.status, reason: next.terminal_result.reason });
|
|
1050
1057
|
},
|