taskplane 0.2.3 → 0.2.5
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.
|
@@ -78,6 +78,9 @@ export function parseMergeResult(resultPath: string): MergeResult {
|
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
// Normalize status to uppercase (merge agents may write lowercase)
|
|
82
|
+
parsed.status = String(parsed.status).toUpperCase();
|
|
83
|
+
|
|
81
84
|
// Validate status value
|
|
82
85
|
if (!VALID_MERGE_STATUSES.has(parsed.status)) {
|
|
83
86
|
execLog("merge", "parse", `unknown merge status "${parsed.status}" — treating as BUILD_FAILURE`, {
|
|
@@ -567,17 +567,11 @@ export function resolveBaseBranch(
|
|
|
567
567
|
batchBaseBranch: string,
|
|
568
568
|
workspaceConfig?: WorkspaceConfig | null,
|
|
569
569
|
): string {
|
|
570
|
-
// Step 1:
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
// Step 2: Detect current branch of this specific repo
|
|
579
|
-
// In repo mode this is the same repo as the batch, so it's equivalent to batchBaseBranch.
|
|
580
|
-
// In workspace mode this detects the actual HEAD of each repo independently.
|
|
570
|
+
// Step 1: Detect current branch of this specific repo.
|
|
571
|
+
// This is the branch the developer is working on — worktrees should
|
|
572
|
+
// branch from here so task files committed on this branch are visible.
|
|
573
|
+
// In repo mode this equals batchBaseBranch. In workspace mode this
|
|
574
|
+
// detects each repo's actual HEAD independently.
|
|
581
575
|
if (repoId) {
|
|
582
576
|
const detected = getCurrentBranch(repoRoot);
|
|
583
577
|
if (detected) {
|
|
@@ -585,6 +579,15 @@ export function resolveBaseBranch(
|
|
|
585
579
|
}
|
|
586
580
|
}
|
|
587
581
|
|
|
582
|
+
// Step 2: Per-repo default branch from workspace config.
|
|
583
|
+
// Used when repo HEAD is detached or undetectable.
|
|
584
|
+
if (repoId && workspaceConfig) {
|
|
585
|
+
const repoConfig = workspaceConfig.repos.get(repoId);
|
|
586
|
+
if (repoConfig?.defaultBranch) {
|
|
587
|
+
return repoConfig.defaultBranch;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
588
591
|
// Step 3: Ultimate fallback — batch-level base branch
|
|
589
592
|
return batchBaseBranch;
|
|
590
593
|
}
|