@ikunin/sprintpilot 2.2.4 → 2.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.
|
@@ -526,9 +526,32 @@ function composeRuntimeState(persisted, profile, projectRoot) {
|
|
|
526
526
|
// Forward-compat for ma.parallel_stories: the queue is the source
|
|
527
527
|
// multiple workers will pull from when the parallel-batch path is
|
|
528
528
|
// wired into the state machine.
|
|
529
|
-
|
|
529
|
+
// Validate persisted.story_queue entries against sprint-status. Same
|
|
530
|
+
// rejection rules as current_story (epic-rollup shape / retrospective
|
|
531
|
+
// / missing from sprint-status / marked done) — applies to every queue
|
|
532
|
+
// member. Without this, a legacy queue persisted by an older
|
|
533
|
+
// orchestrator (or after a sprint-status edit that removed entries)
|
|
534
|
+
// would feed garbage keys to subsequent emissions.
|
|
535
|
+
//
|
|
536
|
+
// Defensive: if sprint-status can't be read, only the shape-based
|
|
537
|
+
// rejections (epic-N, retrospective) apply; presence/status checks
|
|
538
|
+
// are skipped. Same don't-punish-missing-artifact policy as
|
|
539
|
+
// current_story validation.
|
|
540
|
+
const rawPersistedQueue = Array.isArray(persisted.story_queue)
|
|
530
541
|
? persisted.story_queue.filter((k) => typeof k === 'string' && k.length > 0)
|
|
531
542
|
: [];
|
|
543
|
+
const persistedQueue = [];
|
|
544
|
+
for (const k of rawPersistedQueue) {
|
|
545
|
+
const reason = persistedStoryRejectionReason(k, projectRoot);
|
|
546
|
+
if (reason) {
|
|
547
|
+
process.stderr.write(
|
|
548
|
+
`[autopilot] WARN story_queue entry "${k}" rejected: ${reason}. ` +
|
|
549
|
+
'Dropping from queue.\n',
|
|
550
|
+
);
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
persistedQueue.push(k);
|
|
554
|
+
}
|
|
532
555
|
const isNewStoryStartPhase =
|
|
533
556
|
phase === STATES.CREATE_STORY ||
|
|
534
557
|
phase === STATES.NANO_QUICK_DEV ||
|
package/package.json
CHANGED