@yemi33/minions 0.1.2299 → 0.1.2300
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/engine/dispatch.js +1 -1
- package/engine.js +24 -7
- package/package.json +1 -1
package/engine/dispatch.js
CHANGED
|
@@ -577,7 +577,7 @@ function isRetryableFailureReason(reason = '', failureClass = '') {
|
|
|
577
577
|
FAILURE_CLASS.INVALID_MANAGED_SPAWN, // W-mpbhxg3b000u8411 — managed-spawn.json failed validation; re-running with the same wrong file won't fix it
|
|
578
578
|
FAILURE_CLASS.MANAGED_SPAWN_HEALTHCHECK_FAILED, // W-mpbhxg3b000u8411 — healthcheck timed out; agent must fix the spec or the service it spawned
|
|
579
579
|
FAILURE_CLASS.INJECTION_FLAGGED, // F5 (W-mpeklod3000we69c) — agent spotted a prompt-injection attempt in spliced untrusted content; a human must review the source before re-dispatch
|
|
580
|
-
FAILURE_CLASS.LIVE_CHECKOUT_DIRTY, // P-a3f9b204 — live-checkout refused to spawn because operator localPath is dirty; mechanical retry won't fix it (operator must commit/stash/discard)
|
|
580
|
+
FAILURE_CLASS.LIVE_CHECKOUT_DIRTY, // P-a3f9b204 — live-checkout refused to spawn because operator localPath is dirty; mechanical retry won't fix it (operator must commit/stash/discard). NOTE (W-mqzmkoqt000hbca2): engine.js#spawnAgent ALWAYS passes an explicit `agentRetryable` for this class, so this Set entry is never the actual gate — when auto-cleanup (liveCheckoutAutoReset/AutoStash) is enabled the engine overrides to retryable. Kept as a defensive safety net for any caller that omits the explicit override.
|
|
581
581
|
FAILURE_CLASS.LIVE_CHECKOUT_MID_OPERATION, // P-a7f3c1d9 — live-checkout refused to spawn because the operator tree is mid-operation (in-progress merge/rebase/cherry-pick/bisect or detached HEAD); mechanical retry won't fix it (operator must finish/abort the op or checkout a branch)
|
|
582
582
|
FAILURE_CLASS.LIVE_CHECKOUT_BLOB_FETCH, // PL-live-checkout-reliability-hardening — live-checkout `git checkout <existing-branch>` failed hydrating the tree through the auth-less GVFS cache server (blobless partial clone, headless); deterministic, so mechanical retry just reproduces it (operator must hydrate the branch with their own creds, then re-dispatch)
|
|
583
583
|
FAILURE_CLASS.OUTPUT_TRUNCATED, // P-8e4c2a17 — agent stdout exceeded the hard capture cap before the terminal result event; mechanical retry just reproduces the overflow (agent must reduce output volume or the task must be split)
|
package/engine.js
CHANGED
|
@@ -2437,8 +2437,21 @@ async function spawnAgent(dispatchItem, config) {
|
|
|
2437
2437
|
// burned all maxRetries. The dedicated counter is touched ONLY here (on a
|
|
2438
2438
|
// dirty failure) and cleared on a successful prepareLiveCheckout below;
|
|
2439
2439
|
// neither discovery nor the retry re-queue clears it.
|
|
2440
|
+
//
|
|
2441
|
+
// W-mqzmkoqt000hbca2 — AUTO-CLEANUP EXCEPTION: the two-strike cap assumes
|
|
2442
|
+
// the dirty tree is operator-owned and only a human can clear it. But when
|
|
2443
|
+
// `liveCheckoutAutoReset` or `liveCheckoutAutoStash` is configured (per-project
|
|
2444
|
+
// or fleet-wide), the engine itself re-cleans the tree on every dispatch
|
|
2445
|
+
// attempt, so a recurring dirty failure (e.g. a transiently failing
|
|
2446
|
+
// auto-reset/stash) is NOT operator-owned. In that case we skip the
|
|
2447
|
+
// two-strike cap and stay retryable — the next attempt re-runs auto-cleanup.
|
|
2448
|
+
// The normal `maxRetries` cap in dispatch.js still bounds the retries.
|
|
2440
2449
|
const _priorDirtyAttempts = Number(dispatchItem.meta?.item?._liveCheckoutDirtyAttempts) || 0;
|
|
2441
2450
|
const _alreadyDirtyFailed = _priorDirtyAttempts >= 1;
|
|
2451
|
+
const _autoCleanupEnabled =
|
|
2452
|
+
shared.resolveLiveCheckoutAutoReset(project, engineConfig) ||
|
|
2453
|
+
(typeof _liveCheckout.resolveLiveCheckoutAutoStash === 'function' &&
|
|
2454
|
+
!!_liveCheckout.resolveLiveCheckoutAutoStash({ project, engine: engineConfig }));
|
|
2442
2455
|
const _alertBody = [
|
|
2443
2456
|
'# Live-checkout refused: dirty worktree',
|
|
2444
2457
|
'',
|
|
@@ -2457,9 +2470,11 @@ async function spawnAgent(dispatchItem, config) {
|
|
|
2457
2470
|
...(_dirtyFiles.length > 0 ? _dirtyFiles : ['(none reported)']),
|
|
2458
2471
|
'```',
|
|
2459
2472
|
'',
|
|
2460
|
-
|
|
2461
|
-
? '
|
|
2462
|
-
:
|
|
2473
|
+
_autoCleanupEnabled
|
|
2474
|
+
? 'Auto-cleanup (`liveCheckoutAutoReset`/`liveCheckoutAutoStash`) is active — the engine re-cleans the tree on each attempt, so this dispatch will be retried automatically (subject to the normal retry cap).'
|
|
2475
|
+
: (_alreadyDirtyFailed
|
|
2476
|
+
? 'Recovery: dirty state persisted across retries — commit, stash, or discard the changes in the project checkout, then re-dispatch the work item.'
|
|
2477
|
+
: 'This dispatch will be retried once automatically in case the dirty state is transient. If dirty again on retry, commit, stash, or discard the changes, then re-dispatch.'),
|
|
2463
2478
|
].join('\n');
|
|
2464
2479
|
try { writeInboxAlert(`live-checkout-dirty-${_wiIdForAlert}`, _alertBody); }
|
|
2465
2480
|
catch (e) { log('warn', `live-checkout: writeInboxAlert failed: ${e.message}`); }
|
|
@@ -2487,10 +2502,12 @@ async function spawnAgent(dispatchItem, config) {
|
|
|
2487
2502
|
id,
|
|
2488
2503
|
DISPATCH_RESULT.ERROR,
|
|
2489
2504
|
_dirtyMsg.slice(0, 800),
|
|
2490
|
-
|
|
2491
|
-
? 'Live-checkout dirty
|
|
2492
|
-
:
|
|
2493
|
-
|
|
2505
|
+
_autoCleanupEnabled
|
|
2506
|
+
? 'Live-checkout dirty tree with auto-cleanup active — will retry (engine re-cleans each attempt; normal retry cap applies).'
|
|
2507
|
+
: (_alreadyDirtyFailed
|
|
2508
|
+
? 'Live-checkout dirty state persisted across retries — operator must commit/stash/discard before re-dispatch.'
|
|
2509
|
+
: 'Live-checkout dirty tree retried once automatically; if dirty persists, operator must commit/stash/discard.'),
|
|
2510
|
+
{ failureClass: FAILURE_CLASS.LIVE_CHECKOUT_DIRTY, agentRetryable: _autoCleanupEnabled || !_alreadyDirtyFailed },
|
|
2494
2511
|
);
|
|
2495
2512
|
cleanupTempAgent(agentId);
|
|
2496
2513
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2300",
|
|
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"
|