taskplane 0.2.4 → 0.2.6
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.
|
@@ -71,13 +71,28 @@ export function parseMergeResult(resultPath: string): MergeResult {
|
|
|
71
71
|
`Merge result missing required field "source_branch": ${resultPath}`,
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
+
// Normalize verification: accept either a nested object or flat fields
|
|
74
75
|
if (!parsed.verification || typeof parsed.verification !== "object") {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
// Merge agents may write flat verification_passed/verification_commands fields
|
|
77
|
+
// instead of a nested verification object. Normalize to the expected shape.
|
|
78
|
+
if (typeof parsed.verification_passed === "boolean" || Array.isArray(parsed.verification_commands)) {
|
|
79
|
+
parsed.verification = {
|
|
80
|
+
commands_run: parsed.verification_commands || [],
|
|
81
|
+
all_passed: parsed.verification_passed !== false,
|
|
82
|
+
output: "",
|
|
83
|
+
notes: "",
|
|
84
|
+
};
|
|
85
|
+
} else {
|
|
86
|
+
throw new MergeError(
|
|
87
|
+
"MERGE_RESULT_MISSING_FIELDS",
|
|
88
|
+
`Merge result missing required field "verification": ${resultPath}`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
79
91
|
}
|
|
80
92
|
|
|
93
|
+
// Normalize status to uppercase (merge agents may write lowercase)
|
|
94
|
+
parsed.status = String(parsed.status).toUpperCase();
|
|
95
|
+
|
|
81
96
|
// Validate status value
|
|
82
97
|
if (!VALID_MERGE_STATUSES.has(parsed.status)) {
|
|
83
98
|
execLog("merge", "parse", `unknown merge status "${parsed.status}" — treating as BUILD_FAILURE`, {
|