@yemi33/minions 0.1.2098 → 0.1.2099

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.
Files changed (2) hide show
  1. package/engine/shared.js +22 -0
  2. package/package.json +1 -1
package/engine/shared.js CHANGED
@@ -5202,6 +5202,14 @@ function getPrFixAutomationCause({ dispatchKey = '', source = '', task = '' } =
5202
5202
  return PR_FIX_CAUSE.UNKNOWN;
5203
5203
  }
5204
5204
 
5205
+ // Source-branch head SHA, normalized across hosts. GitHub PRs carry
5206
+ // `headSha`/`headRefOid` (engine/github.js:718-742 keeps both in sync); ADO PRs
5207
+ // carry `_adoSourceCommit`/`headRefOid` (engine/ado.js:1083-1129) and a legacy
5208
+ // `_adoHeadCommit`. Mirrors engine/lifecycle.js:1849 getPrFixBaselineHead.
5209
+ function _prHeadSha(pr) {
5210
+ return String(pr?.headRefOid || pr?.headSha || pr?._adoSourceCommit || pr?._adoHeadCommit || '').trim();
5211
+ }
5212
+
5205
5213
  function prFixEvidenceFingerprint(pr, cause = PR_FIX_CAUSE.UNKNOWN) {
5206
5214
  const review = pr?.minionsReview || {};
5207
5215
  const feedback = pr?.humanFeedback || {};
@@ -5214,6 +5222,13 @@ function prFixEvidenceFingerprint(pr, cause = PR_FIX_CAUSE.UNKNOWN) {
5214
5222
  evidence.buildFailReason = pr?.buildFailReason || '';
5215
5223
  evidence.buildErrorLog = pr?.buildErrorLog || '';
5216
5224
  evidence.buildStatusDetail = pr?._buildStatusDetail || '';
5225
+ // #2979 — head SHA + lastPushedAt are the only fingerprint components that
5226
+ // change across a rebase + force-push. Without them, a no-op-fix pause was
5227
+ // sticky forever because failing pipeline name / fail reason / error log
5228
+ // are unchanged across the push. Existing paused records re-fingerprint on
5229
+ // the next poll and clear naturally when the head moves.
5230
+ evidence.headRefOid = _prHeadSha(pr);
5231
+ evidence.lastPushedAt = pr?.lastPushedAt || '';
5217
5232
  } else if (cause === PR_FIX_CAUSE.MERGE_CONFLICT) {
5218
5233
  evidence.mergeConflict = !!pr?._mergeConflict;
5219
5234
  evidence.mergeStatus = pr?.mergeStatus || '';
@@ -5223,6 +5238,13 @@ function prFixEvidenceFingerprint(pr, cause = PR_FIX_CAUSE.UNKNOWN) {
5223
5238
  evidence.lastReviewedAt = pr?.lastReviewedAt || '';
5224
5239
  evidence.reviewedAt = review.reviewedAt || '';
5225
5240
  evidence.reviewNote = review.note || pr?.reviewNote || '';
5241
+ // #2979 — same rationale as BUILD_FAILURE: review feedback fingerprints
5242
+ // were sticky across force-push because reviewStatus / reviewedAt /
5243
+ // reviewNote don't change when the author rebases. Adding the head SHA
5244
+ // gives REVIEW_FEEDBACK the same natural-unsticking property HUMAN_FEEDBACK
5245
+ // already has via lastProcessedCommentDate.
5246
+ evidence.headRefOid = _prHeadSha(pr);
5247
+ evidence.lastPushedAt = pr?.lastPushedAt || '';
5226
5248
  }
5227
5249
  return crypto.createHash('sha1').update(JSON.stringify(evidence)).digest('hex').slice(0, 16);
5228
5250
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2098",
3
+ "version": "0.1.2099",
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"