substrate-ai 0.8.3 → 0.8.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/dist/cli/index.js +5 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -1651,9 +1651,11 @@ async function runResumeAction(options) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
if (outputFormat === "human") process.stdout.write(`Resuming from phase: ${resumePhase}\n`);
|
|
1653
1653
|
let concept = "";
|
|
1654
|
+
let scopedStories;
|
|
1654
1655
|
try {
|
|
1655
1656
|
const config = JSON.parse(run.config_json ?? "{}");
|
|
1656
1657
|
concept = config.concept ?? "";
|
|
1658
|
+
if (Array.isArray(config.explicitStories) && config.explicitStories.length > 0) scopedStories = config.explicitStories;
|
|
1657
1659
|
} catch {}
|
|
1658
1660
|
const dbDir = dbPath.replace("/substrate.db", "");
|
|
1659
1661
|
return runFullPipelineFromPhase({
|
|
@@ -1670,7 +1672,7 @@ async function runResumeAction(options) {
|
|
|
1670
1672
|
existingRunId: runId,
|
|
1671
1673
|
projectRoot,
|
|
1672
1674
|
registry,
|
|
1673
|
-
stories: options.stories
|
|
1675
|
+
stories: options.stories ?? scopedStories
|
|
1674
1676
|
});
|
|
1675
1677
|
} catch (err) {
|
|
1676
1678
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -3293,7 +3295,8 @@ async function handleStallRecovery(health, state, config, deps, io) {
|
|
|
3293
3295
|
const REVIEW_PHASES = new Set(["IN_REVIEW", "code-review"]);
|
|
3294
3296
|
const activePhases = Object.values(health.stories.details ?? {}).map((s) => s.phase);
|
|
3295
3297
|
const inReviewPhase = activePhases.some((p) => REVIEW_PHASES.has(p));
|
|
3296
|
-
const
|
|
3298
|
+
const orchestratorIdle = health.process.child_pids.length === 0 && health.stories.active > 0;
|
|
3299
|
+
const effectiveThreshold = inReviewPhase && !orchestratorIdle ? stallThreshold * 2 : stallThreshold;
|
|
3297
3300
|
if (health.staleness_seconds < effectiveThreshold) return null;
|
|
3298
3301
|
const directPids = [...health.process.orchestrator_pid !== null ? [health.process.orchestrator_pid] : [], ...health.process.child_pids];
|
|
3299
3302
|
const descendantPids = getAllDescendants(directPids);
|