taskplane 0.22.9 → 0.22.10
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.
|
@@ -1685,6 +1685,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
1685
1685
|
discovery.pending,
|
|
1686
1686
|
discovery.completed,
|
|
1687
1687
|
orchConfig,
|
|
1688
|
+
{
|
|
1689
|
+
workspaceRepoIds: execCtx!.workspaceConfig
|
|
1690
|
+
? execCtx!.workspaceConfig.repos.keys()
|
|
1691
|
+
: undefined,
|
|
1692
|
+
},
|
|
1688
1693
|
);
|
|
1689
1694
|
|
|
1690
1695
|
ctx.ui.notify(
|
|
@@ -617,8 +617,24 @@ function normalizeRepoIdCandidate(raw: string): string | null {
|
|
|
617
617
|
return candidate;
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
-
|
|
620
|
+
interface SegmentPlanBuildOptions {
|
|
621
|
+
/** Optional workspace repo IDs used to validate file-scope repo prefixes. */
|
|
622
|
+
workspaceRepoIds?: Iterable<string>;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
function collectKnownRepoIds(
|
|
626
|
+
pending: Map<string, ParsedTask>,
|
|
627
|
+
workspaceRepoIds?: Iterable<string>,
|
|
628
|
+
): Set<string> {
|
|
621
629
|
const known = new Set<string>();
|
|
630
|
+
|
|
631
|
+
if (workspaceRepoIds) {
|
|
632
|
+
for (const repoIdRaw of workspaceRepoIds) {
|
|
633
|
+
const repoId = normalizeRepoIdCandidate(String(repoIdRaw));
|
|
634
|
+
if (repoId) known.add(repoId);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
622
638
|
for (const task of pending.values()) {
|
|
623
639
|
if (task.resolvedRepoId) {
|
|
624
640
|
const repoId = normalizeRepoIdCandidate(task.resolvedRepoId);
|
|
@@ -784,8 +800,11 @@ export function buildSegmentPlanForTask(
|
|
|
784
800
|
}
|
|
785
801
|
|
|
786
802
|
/** Build a deterministic taskId→segmentPlan map for the whole pending set. */
|
|
787
|
-
export function buildTaskSegmentPlans(
|
|
788
|
-
|
|
803
|
+
export function buildTaskSegmentPlans(
|
|
804
|
+
pending: Map<string, ParsedTask>,
|
|
805
|
+
options: SegmentPlanBuildOptions = {},
|
|
806
|
+
): TaskSegmentPlanMap {
|
|
807
|
+
const knownRepoIds = collectKnownRepoIds(pending, options.workspaceRepoIds);
|
|
789
808
|
const plans: TaskSegmentPlanMap = new Map();
|
|
790
809
|
for (const taskId of [...pending.keys()].sort()) {
|
|
791
810
|
const task = pending.get(taskId);
|
|
@@ -1349,10 +1368,16 @@ export function allocateLanes(
|
|
|
1349
1368
|
* Returns WaveAssignment[] with wave numbers and lane assignments,
|
|
1350
1369
|
* plus any errors encountered.
|
|
1351
1370
|
*/
|
|
1371
|
+
export interface WaveComputationOptions {
|
|
1372
|
+
/** Optional workspace repo IDs used by segment inference in workspace mode. */
|
|
1373
|
+
workspaceRepoIds?: Iterable<string>;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1352
1376
|
export function computeWaveAssignments(
|
|
1353
1377
|
pending: Map<string, ParsedTask>,
|
|
1354
1378
|
completed: Set<string>,
|
|
1355
1379
|
config: OrchestratorConfig,
|
|
1380
|
+
options: WaveComputationOptions = {},
|
|
1356
1381
|
): WaveComputationResult {
|
|
1357
1382
|
const errors: DiscoveryError[] = [];
|
|
1358
1383
|
|
|
@@ -1372,7 +1397,9 @@ export function computeWaveAssignments(
|
|
|
1372
1397
|
}
|
|
1373
1398
|
|
|
1374
1399
|
// Step 3.5: Build additive segment planning output (deterministic map)
|
|
1375
|
-
const segmentPlans = buildTaskSegmentPlans(pending
|
|
1400
|
+
const segmentPlans = buildTaskSegmentPlans(pending, {
|
|
1401
|
+
workspaceRepoIds: options.workspaceRepoIds,
|
|
1402
|
+
});
|
|
1376
1403
|
|
|
1377
1404
|
// Step 4: Assign tasks to lanes within each wave
|
|
1378
1405
|
const waveAssignments: WaveAssignment[] = [];
|