@yemi33/minions 0.1.331 → 0.1.333

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.333 (2026-04-03)
4
+
5
+ ### Fixes
6
+ - guarantee test cleanup via finally block in test harness
7
+
8
+ ## 0.1.332 (2026-04-03)
9
+
10
+ ### Fixes
11
+ - retry doesn't revert completed work items + restore skipPr guard
12
+
3
13
  ## 0.1.331 (2026-04-03)
4
14
 
5
15
  ### Fixes
@@ -137,7 +137,7 @@ function completeDispatch(id, result = DISPATCH_RESULT.SUCCESS, reason = '', res
137
137
  const items = safeJson(wiPath);
138
138
  if (!items || !Array.isArray(items)) throw new Error('work items unreadable');
139
139
  const wi = items.find(i => i.id === item.meta.item.id);
140
- if (wi && wi.status !== WI_STATUS.PAUSED) {
140
+ if (wi && wi.status !== WI_STATUS.PAUSED && wi.status !== WI_STATUS.DONE && !wi.completedAt) {
141
141
  wi._retryCount = retries + 1;
142
142
  wi.status = WI_STATUS.PENDING;
143
143
  wi._lastRetryReason = reason || '';
@@ -1175,9 +1175,14 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
1175
1175
  const items = safeJson(wiPath) || [];
1176
1176
  const wi = items.find(i => i.id === meta.item.id);
1177
1177
  if (wi) {
1178
- wi._retryCount = retries + 1; wi.status = WI_STATUS.PENDING; delete wi.dispatched_at; delete wi.dispatched_to;
1179
- if (type === WORK_TYPE.DECOMPOSE) delete wi._decomposing; // clear so item can retry decomposition
1180
- shared.safeWrite(wiPath, items);
1178
+ // Don't revert if already completed by another code path
1179
+ if (wi.status === WI_STATUS.DONE || wi.completedAt) {
1180
+ log('info', `Skip retry for ${meta.item.id} — already completed`);
1181
+ } else {
1182
+ wi._retryCount = retries + 1; wi.status = WI_STATUS.PENDING; delete wi.dispatched_at; delete wi.dispatched_to;
1183
+ if (type === WORK_TYPE.DECOMPOSE) delete wi._decomposing;
1184
+ shared.safeWrite(wiPath, items);
1185
+ }
1181
1186
  }
1182
1187
  }
1183
1188
  } catch (err) { log('warn', `Retry update: ${err.message}`); }
@@ -1261,7 +1266,7 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
1261
1266
  }
1262
1267
 
1263
1268
  // Detect implement tasks that completed without creating a PR
1264
- if (isSuccess && (type === WORK_TYPE.IMPLEMENT || type === WORK_TYPE.IMPLEMENT_LARGE || type === WORK_TYPE.FIX) && prsCreatedCount === 0 && meta?.item?.id) {
1269
+ if (isSuccess && (type === WORK_TYPE.IMPLEMENT || type === WORK_TYPE.IMPLEMENT_LARGE || type === WORK_TYPE.FIX) && prsCreatedCount === 0 && meta?.item?.id && !meta?.item?.skipPr && meta?.project?.localPath) {
1265
1270
  // Check if a PR already exists linked to this work item (from a previous attempt)
1266
1271
  const projects = shared.getProjects(config);
1267
1272
  const existingPrFound = Object.values(getPrLinks()).includes(meta.item.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.331",
3
+ "version": "0.1.333",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"