@yemi33/minions 0.1.2276 → 0.1.2278
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/docs/deprecated.json +2 -0
- package/engine/ado.js +6 -11
- package/engine/lifecycle.js +76 -0
- package/engine.js +1 -1
- package/package.json +1 -1
package/docs/deprecated.json
CHANGED
|
@@ -223,6 +223,8 @@
|
|
|
223
223
|
"id": "ado-throttle-arg-less-shim",
|
|
224
224
|
"description": "Arg-less form of isAdoThrottled() in engine/ado.js. Introduced by W-mq03l6zh0006f0a1-b as a back-compat shim during the per-org ADO throttle isolation rollout: pre-rollout, isAdoThrottled() collapsed the single process-global tracker to one boolean; post-rollout, the canonical form is isAdoThrottled(orgBase) against the per-org Map. The arg-less call site is preserved transiently so engine code (and any in-process callers) that haven't yet been threaded through with a per-org `orgBase` keep returning the safe global-OR (true if ANY org is currently throttled) — preventing a regression where new poll work bypasses a still-warm throttle backoff on an unrelated noisy org.",
|
|
225
225
|
"deprecated": "2026-06-04",
|
|
226
|
+
"status": "removed",
|
|
227
|
+
"removedDate": "2026-06-25",
|
|
226
228
|
"code": [
|
|
227
229
|
{
|
|
228
230
|
"file": "engine/ado.js",
|
package/engine/ado.js
CHANGED
|
@@ -2630,18 +2630,13 @@ async function fetchSinglePrBuildStatus(project, prNumber) {
|
|
|
2630
2630
|
|
|
2631
2631
|
// ─── ADO Throttle Queries ────────────────────────────────────────────────────
|
|
2632
2632
|
|
|
2633
|
-
/** Returns true if
|
|
2634
|
-
*
|
|
2635
|
-
* (back-compat OR
|
|
2633
|
+
/** Returns true if the given org is currently throttled. Auto-clears stale state.
|
|
2634
|
+
* orgBase is required — callers must pass shared.getAdoOrgBase(project).
|
|
2635
|
+
* (The arg-less back-compat OR shim was removed: docs/deprecated.json id: ado-throttle-arg-less-shim) */
|
|
2636
2636
|
const isAdoThrottled = (orgBase) => {
|
|
2637
|
-
if (orgBase
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
}
|
|
2641
|
-
for (const tracker of _adoThrottlesByOrg.values()) {
|
|
2642
|
-
if (tracker.isThrottled()) return true;
|
|
2643
|
-
}
|
|
2644
|
-
return false;
|
|
2637
|
+
if (orgBase == null) throw new TypeError('isAdoThrottled requires an orgBase argument');
|
|
2638
|
+
const tracker = _adoThrottlesByOrg.get(canonicalAdoOrgKey(orgBase));
|
|
2639
|
+
return tracker ? tracker.isThrottled() : false;
|
|
2645
2640
|
};
|
|
2646
2641
|
|
|
2647
2642
|
/** Returns a snapshot of the throttle state.
|
package/engine/lifecycle.js
CHANGED
|
@@ -5353,6 +5353,8 @@ async function runPostCompletionHooks(dispatchItem, agentId, code, stdout, confi
|
|
|
5353
5353
|
try { stampPrdItemWorkItemId(meta.item.id, meta.item.sourcePlan); } catch (err) { log('warn', `stampPrdItemWorkItemId: ${err.message}`); }
|
|
5354
5354
|
}
|
|
5355
5355
|
promoteCompletionArtifacts(meta, agentId, dispatchItem.id, structuredCompletion, { resultSummary });
|
|
5356
|
+
// M003 — auto-dispatch a live-validation WI when a coding WI completes.
|
|
5357
|
+
try { autoDispatchLiveValidationWi(meta, config); } catch (err) { log('warn', `autoDispatchLiveValidationWi: ${err.message}`); }
|
|
5356
5358
|
}
|
|
5357
5359
|
// Failure retry is handled by completeDispatch in dispatch.js — not duplicated here.
|
|
5358
5360
|
// Only clear _decomposing flag on failure so decompose items don't get permanently stuck.
|
|
@@ -6124,6 +6126,78 @@ function pruneScopeMismatchDuplicatePrs(config) {
|
|
|
6124
6126
|
return { pruned, scanned };
|
|
6125
6127
|
}
|
|
6126
6128
|
|
|
6129
|
+
// M003 — After a coding WI completes successfully, auto-dispatch a live-validation
|
|
6130
|
+
// WI when project.liveValidation.autoDispatch === true and the completed item is
|
|
6131
|
+
// a coding WI (not the validation type itself). Skips if the coding WI has no PR.
|
|
6132
|
+
// Deduplicates: a non-terminal WI with meta.liveValidationFor === codingWiId
|
|
6133
|
+
// blocks a second dispatch.
|
|
6134
|
+
function autoDispatchLiveValidationWi(meta, config) {
|
|
6135
|
+
const item = meta?.item;
|
|
6136
|
+
if (!item?.id || !item?.type) return;
|
|
6137
|
+
|
|
6138
|
+
const projectName = meta?.project?.name;
|
|
6139
|
+
if (!projectName) return;
|
|
6140
|
+
|
|
6141
|
+
// Look up the full project config (which carries liveValidation) from config.
|
|
6142
|
+
const projects = shared.getProjects(config || {});
|
|
6143
|
+
const project = projects.find(p => p && p.name === projectName);
|
|
6144
|
+
if (!project) return;
|
|
6145
|
+
|
|
6146
|
+
const lv = project.liveValidation;
|
|
6147
|
+
if (!lv || lv.autoDispatch !== true || !lv.type) return;
|
|
6148
|
+
|
|
6149
|
+
// Only auto-dispatch for coding WIs — skip if this IS the validation type.
|
|
6150
|
+
if (item.type === lv.type) return;
|
|
6151
|
+
|
|
6152
|
+
// Resolve PR reference: prefer the canonical stamped _pr field (set by
|
|
6153
|
+
// stampWiPrRef which runs earlier in runPostCompletionHooks), then fall
|
|
6154
|
+
// back to extractWorkItemPrRef for structured fields / references[].
|
|
6155
|
+
const prRef = item._pr || item._prUrl || shared.extractWorkItemPrRef(item) || null;
|
|
6156
|
+
if (!prRef) return;
|
|
6157
|
+
|
|
6158
|
+
const codingWiId = item.id;
|
|
6159
|
+
const wiPath = resolveWorkItemPath(meta);
|
|
6160
|
+
if (!wiPath) return;
|
|
6161
|
+
|
|
6162
|
+
try {
|
|
6163
|
+
mutateWorkItems(wiPath, items => {
|
|
6164
|
+
if (!Array.isArray(items)) return items;
|
|
6165
|
+
|
|
6166
|
+
// Dedup: skip if a non-terminal WI already tracks this coding WI.
|
|
6167
|
+
const existing = items.find(i =>
|
|
6168
|
+
i &&
|
|
6169
|
+
i.meta &&
|
|
6170
|
+
i.meta.liveValidationFor === codingWiId &&
|
|
6171
|
+
!PLAN_TERMINAL_STATUSES.has(i.status)
|
|
6172
|
+
);
|
|
6173
|
+
if (existing) {
|
|
6174
|
+
log('info', `liveValidation: dedup — non-terminal validation WI ${existing.id} already exists for ${codingWiId}`);
|
|
6175
|
+
return items;
|
|
6176
|
+
}
|
|
6177
|
+
|
|
6178
|
+
const validationWi = {
|
|
6179
|
+
id: 'W-' + shared.uid(),
|
|
6180
|
+
title: 'Validate: ' + (item.title || codingWiId),
|
|
6181
|
+
type: lv.type,
|
|
6182
|
+
status: WI_STATUS.PENDING,
|
|
6183
|
+
depends_on: [codingWiId],
|
|
6184
|
+
references: [prRef],
|
|
6185
|
+
meta: { liveValidationFor: codingWiId },
|
|
6186
|
+
project: projectName,
|
|
6187
|
+
priority: item.priority || 'medium',
|
|
6188
|
+
created: ts(),
|
|
6189
|
+
createdBy: 'lifecycle:live-validation-auto-dispatch',
|
|
6190
|
+
};
|
|
6191
|
+
|
|
6192
|
+
items.push(validationWi);
|
|
6193
|
+
log('info', `liveValidation: auto-dispatched validation WI ${validationWi.id} (type=${lv.type}) for coding WI ${codingWiId}`);
|
|
6194
|
+
return items;
|
|
6195
|
+
});
|
|
6196
|
+
} catch (err) {
|
|
6197
|
+
log('warn', `autoDispatchLiveValidationWi for ${codingWiId}: ${err.message}`);
|
|
6198
|
+
}
|
|
6199
|
+
}
|
|
6200
|
+
|
|
6127
6201
|
module.exports = {
|
|
6128
6202
|
checkPlanCompletion,
|
|
6129
6203
|
archivePlan,
|
|
@@ -6198,4 +6272,6 @@ module.exports = {
|
|
|
6198
6272
|
// W-mqtplpk6001oe6d5 — stamp PR ref + workItemId onto WI and PRD item at completion time.
|
|
6199
6273
|
stampWiPrRef,
|
|
6200
6274
|
stampPrdItemWorkItemId,
|
|
6275
|
+
// M003 — auto-dispatch live-validation WI after coding WI completion.
|
|
6276
|
+
autoDispatchLiveValidationWi,
|
|
6201
6277
|
};
|
package/engine.js
CHANGED
|
@@ -6700,7 +6700,7 @@ async function discoverFromPrs(config, project) {
|
|
|
6700
6700
|
? (config.engine?.adoPollEnabled ?? ENGINE_DEFAULTS.adoPollEnabled)
|
|
6701
6701
|
: (config.engine?.ghPollEnabled ?? ENGINE_DEFAULTS.ghPollEnabled));
|
|
6702
6702
|
const evalLoopEnabled = config.engine?.evalLoop !== false;
|
|
6703
|
-
const fixThrottled = isAdoProject ? isAdoThrottled() : isGhThrottled();
|
|
6703
|
+
const fixThrottled = isAdoProject ? isAdoThrottled(shared.getAdoOrgBase(project)) : isGhThrottled();
|
|
6704
6704
|
const autoReviewPrs = config.engine?.autoReviewPrs ?? ENGINE_DEFAULTS.autoReviewPrs;
|
|
6705
6705
|
const autoReReviewPrs = config.engine?.autoReReviewPrs ?? ENGINE_DEFAULTS.autoReReviewPrs;
|
|
6706
6706
|
// P-b2e5d8c7: engine.autoFixPaused is a hard-stop master switch over every
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2278",
|
|
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"
|