@link-assistant/hive-mind 1.26.0 → 1.26.1

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,5 +1,15 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.26.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 278415a: fix: post "Ready to merge" comment after auto-restart sequence with --auto-restart-until-mergeable (Issue #1371)
8
+
9
+ When `--auto-restart-until-mergeable` was used after a regular auto-restart sequence (triggered by uncommitted changes), the "Ready to merge" comment was silently suppressed because `checkForExistingComment` found a matching comment from a previous `solve` run.
10
+
11
+ The deduplication logic in `watchUntilMergeable` now uses an in-memory flag (`readyToMergeCommentPosted`) scoped to the current session, rather than searching all PR comment history. This correctly prevents duplicate comments within a single run while allowing new notifications when a fresh `solve` invocation starts.
12
+
3
13
  ## 1.26.0
4
14
 
5
15
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.26.0",
3
+ "version": "1.26.1",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -345,6 +345,13 @@ export const watchUntilMergeable = async params => {
345
345
  // `restartCount` counts actual AI tool executions (when we actually restart the AI)
346
346
  let restartCount = 0;
347
347
 
348
+ // Issue #1371: Track whether a "Ready to merge" comment was posted in THIS session.
349
+ // This replaces the all-time history check (checkForExistingComment) which incorrectly
350
+ // suppressed new notifications when a previous solve run had already posted one.
351
+ // In-memory deduplication correctly handles the case where multiple check cycles in
352
+ // the same run detect mergeability simultaneously, without blocking fresh runs.
353
+ let readyToMergeCommentPosted = false;
354
+
348
355
  let currentBackoffSeconds = watchInterval;
349
356
 
350
357
  await log('');
@@ -430,18 +437,19 @@ export const watchUntilMergeable = async params => {
430
437
  await log(formatAligned('', 'PR is ready to be merged manually', '', 2));
431
438
  await log(formatAligned('', 'Exiting auto-restart-until-mergeable mode', '', 2));
432
439
 
433
- // Issue #1323: Post success comment only if one doesn't already exist
434
- // This prevents duplicate comments when multiple processes reach this point
440
+ // Issue #1371: Post success comment only if not already posted in this session.
441
+ // Use in-memory flag instead of checking all PR comment history (issue #1323),
442
+ // since the historical check incorrectly suppressed notifications when a
443
+ // previous solve run had already posted a "Ready to merge" comment.
435
444
  try {
436
- const readyToMergeSignature = '## ✅ Ready to merge';
437
- const hasExistingComment = await checkForExistingComment(owner, repo, prNumber, readyToMergeSignature, argv.verbose);
438
- if (!hasExistingComment) {
445
+ if (!readyToMergeCommentPosted) {
439
446
  // Issue #1345: Differentiate message when no CI is configured
440
447
  const ciLine = noCiConfigured ? '- No CI/CD checks are configured for this repository' : '- All CI checks have passed';
441
448
  const commentBody = `## ✅ Ready to merge\n\nThis pull request is now ready to be merged:\n${ciLine}\n- No merge conflicts\n- No pending changes\n\n---\n*Monitored by hive-mind with --auto-restart-until-mergeable flag*`;
442
449
  await $`gh pr comment ${prNumber} --repo ${owner}/${repo} --body ${commentBody}`;
450
+ readyToMergeCommentPosted = true;
443
451
  } else {
444
- await log(formatAligned('', 'Skipping duplicate "Ready to merge" comment', '', 2));
452
+ await log(formatAligned('', 'Skipping duplicate "Ready to merge" comment (already posted this session)', '', 2));
445
453
  }
446
454
  } catch {
447
455
  // Don't fail if comment posting fails