@yemi33/minions 0.1.700 → 0.1.702

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,8 +1,14 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.700 (2026-04-09)
3
+ ## 0.1.702 (2026-04-09)
4
4
 
5
5
  ### Fixes
6
+ - build fix grace period — wait for CI before re-dispatching
7
+
8
+ ## 0.1.701 (2026-04-09)
9
+
10
+ ### Fixes
11
+ - prevent duplicate fix dispatch when review-fix and human-feedback fire on same tick
6
12
  - PRD E2E section not updating when pullRequests change
7
13
  - ADO build error log fetches all failing pipelines, not just first
8
14
  - verify/implement playbooks must include PR URL in final message
package/engine/ado.js CHANGED
@@ -383,6 +383,8 @@ async function pollPrStatus(config) {
383
383
  pr.buildStatus = buildStatus;
384
384
  if (buildFailReason) pr.buildFailReason = buildFailReason;
385
385
  else delete pr.buildFailReason;
386
+ // Build transitioned — clear grace period so next failure can trigger immediately
387
+ delete pr._buildFixPushedAt;
386
388
  if (buildStatus !== 'failing') {
387
389
  delete pr._buildFailNotified;
388
390
  delete pr.buildErrorLog;
package/engine/github.js CHANGED
@@ -393,6 +393,8 @@ async function pollPrStatus(config) {
393
393
  pr.buildStatus = buildStatus;
394
394
  if (buildFailReason) pr.buildFailReason = buildFailReason;
395
395
  else delete pr.buildFailReason;
396
+ // Build transitioned — clear grace period so next failure can trigger immediately
397
+ delete pr._buildFixPushedAt;
396
398
  if (buildStatus !== 'failing') {
397
399
  delete pr._buildFailNotified;
398
400
  delete pr.buildErrorLog;
package/engine.js CHANGED
@@ -1556,6 +1556,7 @@ async function discoverFromPrs(config, project) {
1556
1556
  }
1557
1557
 
1558
1558
  // PRs with changes requested → route back to author for fix
1559
+ let fixDispatched = false;
1559
1560
  if (reviewStatus === 'changes-requested' && !awaitingReReview) {
1560
1561
  const key = `fix-${project?.name || 'default'}-${pr.id}`;
1561
1562
  if (isAlreadyDispatched(key) || isOnCooldown(key, cooldownMs)) continue;
@@ -1566,13 +1567,13 @@ async function discoverFromPrs(config, project) {
1566
1567
  pr_id: pr.id, pr_branch: pr.branch || '',
1567
1568
  review_note: pr.minionsReview?.note || pr.reviewNote || 'See PR thread comments',
1568
1569
  }, `Fix PR ${pr.id} review feedback`, { dispatchKey: key, source: 'pr', pr, branch: pr.branch, project: projMeta });
1569
- if (item) { newWork.push(item); setCooldown(key); }
1570
+ if (item) { newWork.push(item); setCooldown(key); fixDispatched = true; }
1570
1571
  }
1571
1572
 
1572
- // PRs with pending human feedback (or coalesced comments from while agent was fixing)
1573
+ // PRs with pending human feedback (skip if review-fix already dispatched above)
1573
1574
  const humanFixKey = `human-fix-${project?.name || 'default'}-${pr.id}`;
1574
1575
  const hasCoalescedFeedback = (dispatchCooldowns.get(humanFixKey)?.pendingContexts || []).length > 0;
1575
- if ((pr.humanFeedback?.pendingFix || hasCoalescedFeedback) && !awaitingReReview) {
1576
+ if ((pr.humanFeedback?.pendingFix || hasCoalescedFeedback) && !awaitingReReview && !fixDispatched) {
1576
1577
  const key = humanFixKey;
1577
1578
  if (isAlreadyDispatched(key) || isOnCooldown(key, cooldownMs)) {
1578
1579
  // Coalesce: save feedback for next dispatch
@@ -1600,6 +1601,12 @@ async function discoverFromPrs(config, project) {
1600
1601
  }
1601
1602
 
1602
1603
  // PRs with build failures — route to author (has session context from implementing)
1604
+ // Grace period: after a build fix push, wait for CI to run before re-dispatching
1605
+ // Skip if build hasn't transitioned since last fix (still showing the old failure)
1606
+ if (pr._buildFixPushedAt && pr.buildStatus === 'failing') {
1607
+ const gracePeriodMs = config.engine?.buildFixGracePeriod ?? 600000; // 10 min default
1608
+ if (Date.now() - new Date(pr._buildFixPushedAt).getTime() < gracePeriodMs) continue;
1609
+ }
1603
1610
  if (pr.status === PR_STATUS.ACTIVE && pr.buildStatus === 'failing') {
1604
1611
  const maxBuildFix = config.engine?.maxBuildFixAttempts ?? ENGINE_DEFAULTS.maxBuildFixAttempts;
1605
1612
 
@@ -1645,7 +1652,10 @@ async function discoverFromPrs(config, project) {
1645
1652
  const prPath = projectPrPath(project);
1646
1653
  mutatePullRequests(prPath, prs => {
1647
1654
  const target = prs.find(p => p.id === pr.id);
1648
- if (target) target.buildFixAttempts = (target.buildFixAttempts || 0) + 1;
1655
+ if (target) {
1656
+ target.buildFixAttempts = (target.buildFixAttempts || 0) + 1;
1657
+ target._buildFixPushedAt = ts();
1658
+ }
1649
1659
  });
1650
1660
  } catch (e) { log('warn', 'increment build fix attempts: ' + e.message); }
1651
1661
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.700",
3
+ "version": "0.1.702",
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"