@link-assistant/hive-mind 1.69.0 → 1.69.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,11 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.69.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2911597: Fix feedback comment counting to run local git timestamp checks in the prepared repository directory, avoiding misleading `not a git repository` diagnostics in detached solve sessions.
8
+
3
9
  ## 1.69.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.69.0",
3
+ "version": "1.69.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",
@@ -8,7 +8,7 @@ import { reportError } from './sentry.lib.mjs';
8
8
 
9
9
  import { wrapDollarWithGhRetry as _wrapDollarWithGhRetry } from './github-rate-limit.lib.mjs'; // rate-limit marker (#1726): gh API calls flow through $ wrapped by caller
10
10
  export const detectAndCountFeedback = async params => {
11
- const { prNumber, branchName, owner, repo, issueNumber, isContinueMode, argv, mergeStateStatus, prState, workStartTime, log, formatAligned, cleanErrorMessage, $ } = params;
11
+ const { prNumber, branchName, owner, repo, issueNumber, isContinueMode, argv, mergeStateStatus, prState, workStartTime, log, formatAligned, cleanErrorMessage, $, repositoryPath = null } = params;
12
12
 
13
13
  let newPrComments = 0;
14
14
  let newPrReviewComments = 0;
@@ -53,14 +53,18 @@ export const detectAndCountFeedback = async params => {
53
53
  if (argv.verbose) {
54
54
  await log(` PR #${prNumber} on branch: ${branchName}`, { verbose: true });
55
55
  await log(` Owner/Repo: ${owner}/${repo}`, { verbose: true });
56
+ if (repositoryPath) {
57
+ await log(` Repository path: ${repositoryPath}`, { verbose: true });
58
+ }
56
59
  }
57
60
 
58
61
  // Get the last commit timestamp from the PR branch
59
62
  let lastCommitTime = null;
60
- let lastCommitResult = await $`git log -1 --format="%aI" origin/${branchName}`;
63
+ const git$ = repositoryPath ? $({ cwd: repositoryPath }) : $;
64
+ let lastCommitResult = await git$`git log -1 --format="%aI" origin/${branchName}`;
61
65
  if (lastCommitResult.code !== 0) {
62
66
  // Fallback to local branch if remote doesn't exist
63
- lastCommitResult = await $`git log -1 --format="%aI" ${branchName}`;
67
+ lastCommitResult = await git$`git log -1 --format="%aI" ${branchName}`;
64
68
  }
65
69
 
66
70
  if (lastCommitResult.code === 0) {
package/src/solve.mjs CHANGED
@@ -623,6 +623,7 @@ try {
623
623
  log,
624
624
  formatAligned,
625
625
  cleanErrorMessage,
626
+ tempDir,
626
627
  $,
627
628
  });
628
629
 
@@ -8,7 +8,7 @@ import { wrapDollarWithGhRetry as _wrapDollarWithGhRetry } from './github-rate-l
8
8
  const feedback = await import('./solve.feedback.lib.mjs');
9
9
  const { detectAndCountFeedback } = feedback;
10
10
 
11
- export async function prepareFeedbackAndTimestamps({ prNumber, branchName: _branchName, owner, repo, issueNumber, isContinueMode: _isContinueMode, mergeStateStatus: _mergeStateStatus, prState: _prState, argv: _argv, log, formatAligned, cleanErrorMessage: _cleanErrorMessage, $ }) {
11
+ export async function prepareFeedbackAndTimestamps({ tempDir = null, prNumber, branchName: _branchName, owner, repo, issueNumber, isContinueMode: _isContinueMode, mergeStateStatus: _mergeStateStatus, prState: _prState, argv: _argv, log, formatAligned, cleanErrorMessage: _cleanErrorMessage, $ }) {
12
12
  // Count new comments and detect feedback
13
13
  let { feedbackLines } = await detectAndCountFeedback({
14
14
  prNumber,
@@ -25,6 +25,7 @@ export async function prepareFeedbackAndTimestamps({ prNumber, branchName: _bran
25
25
  formatAligned,
26
26
  cleanErrorMessage: _cleanErrorMessage,
27
27
  $,
28
+ repositoryPath: tempDir,
28
29
  });
29
30
 
30
31
  // Get timestamps from GitHub servers before executing the command
@@ -209,6 +209,7 @@ export const watchForFeedback = async params => {
209
209
  formatAligned,
210
210
  cleanErrorMessage,
211
211
  $,
212
+ repositoryPath: tempDir,
212
213
  });
213
214
 
214
215
  // Check if there's any feedback or if it's the first iteration in temporary mode