@yemi33/minions 0.1.77 → 0.1.78
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/CHANGELOG.md +5 -0
- package/engine.js +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine.js
CHANGED
|
@@ -1967,6 +1967,22 @@ function discoverWork(config) {
|
|
|
1967
1967
|
allWorkItems.push(...meetingWork);
|
|
1968
1968
|
} catch (e) { log('warn', 'discover meeting work: ' + e.message); }
|
|
1969
1969
|
|
|
1970
|
+
// Periodic plan completion sweep — catch PRDs that completed while engine was down
|
|
1971
|
+
// or where checkPlanCompletion missed the completion event
|
|
1972
|
+
try {
|
|
1973
|
+
const lifecycle = require('./engine/lifecycle');
|
|
1974
|
+
const prdDir = path.join(MINIONS_DIR, 'prd');
|
|
1975
|
+
if (fs.existsSync(prdDir)) {
|
|
1976
|
+
for (const f of fs.readdirSync(prdDir).filter(f => f.endsWith('.json'))) {
|
|
1977
|
+
const plan = safeJson(path.join(prdDir, f));
|
|
1978
|
+
if (!plan?.missing_features || plan.status === 'completed') continue;
|
|
1979
|
+
if (plan.status !== 'approved' && plan.status !== 'active') continue;
|
|
1980
|
+
// Simulate the meta object checkPlanCompletion expects
|
|
1981
|
+
lifecycle.checkPlanCompletion({ item: { sourcePlan: f } }, config);
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
} catch (e) { log('warn', 'plan completion sweep: ' + e.message); }
|
|
1985
|
+
|
|
1970
1986
|
// Gate reviews and fixes: do not dispatch until all implement items are complete
|
|
1971
1987
|
const hasIncompleteImplements = projects.some(project => {
|
|
1972
1988
|
const items = safeJson(projectWorkItemsPath(project)) || [];
|
package/package.json
CHANGED