@yemi33/minions 0.1.2290 → 0.1.2291

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/dashboard.js CHANGED
@@ -6804,13 +6804,13 @@ const server = http.createServer(async (req, res) => {
6804
6804
  if (originWi) item._originWi = originWi;
6805
6805
  await copyWorkItemPrFields(item, body, null, { project: targetProject });
6806
6806
  // W-mq5wfh1v000e0da9 — Auto-enroll the PR into pull-requests.json when
6807
- // this is a `type: fix` WI carrying a structured PR pointer and the PR
6808
- // isn't tracked yet. Without this, the engine's `pr_not_found` gate
6809
- // skips the fix forever (engine.js dispatch loop). Idempotent — safe to
6807
+ // this is a `type: fix/review/test` WI carrying a structured PR pointer and
6808
+ // the PR isn't tracked yet. Without this, the engine's `pr_not_found` gate
6809
+ // skips the WI forever (engine.js dispatch loop). Idempotent — safe to
6810
6810
  // call on every WI create. Failures are swallowed (best-effort belt;
6811
6811
  // engine.js#dispatch loop also calls this as defense-in-depth).
6812
6812
  try {
6813
- shared.autoEnrollPrFromFixWorkItem(item, targetProject, MINIONS_DIR);
6813
+ shared.autoEnrollPrFromWorkItem(item, targetProject, MINIONS_DIR);
6814
6814
  } catch (e) {
6815
6815
  shared.log('warn', `auto-enroll PR for ${item.id}: ${e.message}`);
6816
6816
  }
@@ -101,7 +101,6 @@ const shared = require('./shared');
101
101
  // still bounded. Threaded through `baseOpts` so every git call inherits it; the
102
102
  // injected `_git` mock in unit tests ignores opts so the seam is unaffected.
103
103
  const LIVE_CHECKOUT_GIT_MAX_BUFFER = 50 * 1024 * 1024;
104
-
105
104
  // PL-live-checkout-reliability-hardening — partial-clone / GVFS blob-fetch
106
105
  // signature match. On a Scalar/GVFS-managed ADO repo (blobless partial clone),
107
106
  // switching the working tree onto a branch whose tree differs from HEAD must
package/engine/shared.js CHANGED
@@ -7245,11 +7245,12 @@ function classifyPrRefForVerification(prRef, project = null) {
7245
7245
  // per the "structured-vs-loose split" — enrollment must be intentional.
7246
7246
  //
7247
7247
  // Returns:
7248
- // { skipped: true, reason } — not a fix / no ref / no URL / upsert error
7248
+ // { skipped: true, reason } — not a pr-requiring type / no ref / no URL / upsert error
7249
7249
  // { alreadyEnrolled: true, id } — PR already in pull-requests.json
7250
7250
  // { enrolled: true, id, prPath } — newly enrolled
7251
- function autoEnrollPrFromFixWorkItem(item, project, minionsDir) {
7252
- if (!item || item.type !== WORK_TYPE.FIX) return { skipped: true, reason: 'not-fix' };
7251
+ const _PR_REQUIRING_TYPES = new Set([WORK_TYPE.FIX, WORK_TYPE.REVIEW, WORK_TYPE.TEST]);
7252
+ function autoEnrollPrFromWorkItem(item, project, minionsDir) {
7253
+ if (!item || !_PR_REQUIRING_TYPES.has(item.type)) return { skipped: true, reason: 'not-pr-requiring-type' };
7253
7254
  const prRef = extractStructuredWorkItemPrRef(item);
7254
7255
  if (!prRef) return { skipped: true, reason: 'no-structured-ref' };
7255
7256
  const url = deriveUrlForPrRef(prRef, project);
@@ -7280,10 +7281,12 @@ function autoEnrollPrFromFixWorkItem(item, project, minionsDir) {
7280
7281
  ? { enrolled: true, id: result.id, prPath }
7281
7282
  : { alreadyEnrolled: true, id: result.id };
7282
7283
  } catch (e) {
7283
- log('warn', `autoEnrollPrFromFixWorkItem ${item.id}: ${e.message}`);
7284
+ log('warn', `autoEnrollPrFromWorkItem ${item.id}: ${e.message}`);
7284
7285
  return { skipped: true, reason: 'upsert-error', error: e.message };
7285
7286
  }
7286
7287
  }
7288
+ // Backward-compat alias — external callers that reference autoEnrollPrFromFixWorkItem keep working.
7289
+ const autoEnrollPrFromFixWorkItem = autoEnrollPrFromWorkItem;
7287
7290
 
7288
7291
  // ─── Cross-Platform Process Kill Helpers ─────────────────────────────────────
7289
7292
 
@@ -9015,6 +9018,7 @@ module.exports = {
9015
9018
  isContextOnlyPrRecord,
9016
9019
  upsertPullRequestRecord,
9017
9020
  isAutoManagedPrRecord, // W-mq5s5ttx000j7ab8-a — exported for engine + watch-plugin gate consolidation
9021
+ autoEnrollPrFromWorkItem,
9018
9022
  autoEnrollPrFromFixWorkItem,
9019
9023
  deriveUrlForPrRef, // exported for testing
9020
9024
  classifyPrRefForVerification, // issue #246 — host routing for loose PR-ref verification
package/engine.js CHANGED
@@ -8096,16 +8096,15 @@ function discoverFromWorkItems(config, project) {
8096
8096
  skipped.noAgent++; continue;
8097
8097
  }
8098
8098
 
8099
- // W-mq5wfh1v000e0da9 — defense-in-depth: auto-enroll the PR for fix WIs
8099
+ // W-mq5wfh1v000e0da9 — defense-in-depth: auto-enroll the PR for fix/review/test WIs
8100
8100
  // carrying a structured PR pointer. Primary enrollment runs in the
8101
8101
  // dashboard `POST /api/work-items` handler, but WIs created via CLI / restored
8102
8102
  // from disk / older code paths might land here without the PR record.
8103
- // No-op if the PR is already tracked. Failures swallowed the gate below
8104
- // still trips on missing PR records and surfaces `pr_not_found`.
8103
+ // No-op if the PR is already tracked or if the type doesn't require a PR.
8104
+ // Failures swallowed — the gate below still trips on missing PR records
8105
+ // and surfaces `pr_not_found`.
8105
8106
  try {
8106
- if (item.type === WORK_TYPE.FIX) {
8107
- shared.autoEnrollPrFromFixWorkItem(item, project, MINIONS_DIR);
8108
- }
8107
+ shared.autoEnrollPrFromWorkItem(item, project, MINIONS_DIR);
8109
8108
  } catch (e) { log('warn', `auto-enroll PR for ${item.id}: ${e.message}`); }
8110
8109
 
8111
8110
  const linkedPr = resolveWorkItemPrRecord(item, project);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2290",
3
+ "version": "0.1.2291",
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"