baro-ai 0.47.5 → 0.47.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.
- package/dist/cli.mjs +36 -2
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -39860,10 +39860,16 @@ var Conductor = class extends BaseObserver {
|
|
|
39860
39860
|
async handleLevelCompute() {
|
|
39861
39861
|
if (this.phase !== "computing") return;
|
|
39862
39862
|
if (!this.prd) return;
|
|
39863
|
-
const
|
|
39863
|
+
const blockedStoryIds = this.computeBlockedStoryIds();
|
|
39864
|
+
const failedIds = new Set(this.globalFailed);
|
|
39865
|
+
const runnableStories = this.prd.userStories.filter(
|
|
39866
|
+
(s2) => !s2.passes && !failedIds.has(s2.id) && !blockedStoryIds.has(s2.id)
|
|
39867
|
+
);
|
|
39868
|
+
const levels = buildDag(runnableStories);
|
|
39864
39869
|
if (levels.length === 0) {
|
|
39865
39870
|
const allPassed = this.prd.userStories.every((s2) => s2.passes) && this.globalDropped.length === 0;
|
|
39866
|
-
this.
|
|
39871
|
+
const abortReason = allPassed ? null : this.globalFailed.length > 0 ? blockedStoryIds.size > 0 ? `blocked by failed dependencies: failed ${this.globalFailed.join(", ")}; blocked ${[...blockedStoryIds].join(", ")}` : `stories failed: ${this.globalFailed.join(", ")}` : null;
|
|
39872
|
+
this.terminateRun(allPassed, abortReason);
|
|
39867
39873
|
return;
|
|
39868
39874
|
}
|
|
39869
39875
|
const level = levels[0];
|
|
@@ -40094,6 +40100,34 @@ ${prompt}`;
|
|
|
40094
40100
|
}
|
|
40095
40101
|
this.resolveDone(summary);
|
|
40096
40102
|
}
|
|
40103
|
+
/**
|
|
40104
|
+
* Stories whose dependency chain includes a terminally failed story cannot
|
|
40105
|
+
* become runnable in this run. Keep them out of the remaining DAG so
|
|
40106
|
+
* `buildDag` cannot silently promote them after the failed dependency is
|
|
40107
|
+
* filtered out. Do NOT mark them passed/dropped here: this is a checkpoint,
|
|
40108
|
+
* and the user may choose to rerun the failed prerequisite on resume.
|
|
40109
|
+
*/
|
|
40110
|
+
computeBlockedStoryIds() {
|
|
40111
|
+
if (!this.prd || this.globalFailed.length === 0) {
|
|
40112
|
+
return /* @__PURE__ */ new Set();
|
|
40113
|
+
}
|
|
40114
|
+
const failed = new Set(this.globalFailed);
|
|
40115
|
+
const blocked = /* @__PURE__ */ new Set();
|
|
40116
|
+
let changed = true;
|
|
40117
|
+
while (changed) {
|
|
40118
|
+
changed = false;
|
|
40119
|
+
for (const story of this.prd.userStories) {
|
|
40120
|
+
if (story.passes || failed.has(story.id) || blocked.has(story.id)) {
|
|
40121
|
+
continue;
|
|
40122
|
+
}
|
|
40123
|
+
if ((story.dependsOn ?? []).some((id) => failed.has(id) || blocked.has(id))) {
|
|
40124
|
+
blocked.add(story.id);
|
|
40125
|
+
changed = true;
|
|
40126
|
+
}
|
|
40127
|
+
}
|
|
40128
|
+
}
|
|
40129
|
+
return blocked;
|
|
40130
|
+
}
|
|
40097
40131
|
resolvePrompt(story) {
|
|
40098
40132
|
const candidatePath = this.opts.promptTemplatePath ?? join(this.opts.cwd, "prompt.md");
|
|
40099
40133
|
let prompt;
|