@link-assistant/hive-mind 1.31.2 → 1.31.4

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,42 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.31.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Extract large inline script blocks from release.yml into ./scripts/ to fix CI line-limit violation (issue #1428)
8
+
9
+ fix: configure release pipeline to react to docker=true so Dockerfile changes trigger Docker image rebuild (Issue #1423)
10
+
11
+ Previously, commits that changed only `Dockerfile` or `coolify/Dockerfile` produced `docker=true` but `code=false`. The `release` job required all test jobs to `succeed` — but those tests were correctly skipped (no JavaScript code changed). Since `skipped != 'success'`, the release job was also skipped, and no Docker image was rebuilt.
12
+
13
+ This was observed when PR #1420 (fixing `/home/hive/.config` ownership) was merged: both Dockerfiles changed, but CI run `23040959919` showed all Docker publish jobs as skipped.
14
+
15
+ The `release` job condition is now updated to:
16
+ - Also trigger when `docker-changed == 'true'` (not only `code=true`)
17
+ - Accept `skipped` as well as `success` for test/lint jobs (skipped = intentionally not run, not a failure)
18
+ - Block on any actual job `failure`
19
+
20
+ This directly configures CI/CD to react to `docker=true` — without misclassifying Dockerfiles as "code" files.
21
+
22
+ Full root cause analysis and timeline in `docs/case-studies/issue-1423/`.
23
+
24
+ Migrate GitHub Actions to Node.js 24 compatible versions to eliminate deprecation warnings before the June 2026 deadline
25
+
26
+ ## 1.31.3
27
+
28
+ ### Patch Changes
29
+
30
+ - b77704d: fix: set Docker image version labels to actual release version (Issue #1419)
31
+
32
+ The `docker/metadata-action@v5` defaulted the `org.opencontainers.image.version`
33
+ OCI label to the Git ref name `"main"` instead of the actual release version.
34
+ Added explicit `labels` override to all four Docker metadata steps in both regular
35
+ and instant release pipelines.
36
+
37
+ Also added `.config` directory ownership and write-access verification to the Docker
38
+ image verification script to prevent the permission regression from recurring.
39
+
3
40
  ## 1.31.2
4
41
 
5
42
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.31.2",
3
+ "version": "1.31.4",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "homepage": "https://github.com/link-assistant/hive-mind#readme",
49
49
  "engines": {
50
- "node": ">=18.0.0"
50
+ "node": ">=24.0.0"
51
51
  },
52
52
  "files": [
53
53
  "src",
@@ -18,7 +18,9 @@ if (typeof globalThis.use === 'undefined') {
18
18
  }
19
19
  }
20
20
 
21
- const getenv = await use('getenv');
21
+ const getenvModule = await use('getenv');
22
+ // Node 24 CJS/ESM interop may return the whole module object instead of the function directly
23
+ const getenv = typeof getenvModule === 'function' ? getenvModule : getenvModule.default || getenvModule;
22
24
 
23
25
  // Use semver package for version comparison (see issue #1146)
24
26
  import semver from 'semver';
package/src/hive.mjs CHANGED
@@ -20,8 +20,10 @@ if (earlyArgs.includes('--help') || earlyArgs.includes('-h')) {
20
20
  globalThis.use = use;
21
21
  const yargsModule = await use('yargs@17.7.2');
22
22
  const yargs = yargsModule.default || yargsModule;
23
- const { hideBin } = await use('yargs@17.7.2/helpers');
24
- const rawArgs = hideBin(process.argv);
23
+ const helpersModuleHelp = await use('yargs@17.7.2/helpers');
24
+ const _helpersHelp = helpersModuleHelp.default || helpersModuleHelp;
25
+ const hideBinHelp = _helpersHelp.hideBin || (argv => argv.slice(2));
26
+ const rawArgs = hideBinHelp(process.argv);
25
27
  // Reuse createYargsConfig from shared module to avoid duplication
26
28
  const { createYargsConfig } = await import('./hive.config.lib.mjs');
27
29
  const helpYargs = createYargsConfig(yargs(rawArgs)).version(false);
@@ -86,7 +88,9 @@ if (isDirectExecution) {
86
88
  );
87
89
  const yargsModule = await withTimeout(use('yargs@17.7.2'), 30000, 'loading yargs');
88
90
  const yargs = yargsModule.default || yargsModule;
89
- const { hideBin } = await withTimeout(use('yargs@17.7.2/helpers'), 30000, 'loading yargs helpers');
91
+ const helpersModuleMain = await withTimeout(use('yargs@17.7.2/helpers'), 30000, 'loading yargs helpers');
92
+ const _helpersMain = helpersModuleMain.default || helpersModuleMain;
93
+ const hideBin = _helpersMain.hideBin || (argv => argv.slice(2));
90
94
  const path = (await withTimeout(use('path'), 30000, 'loading path')).default;
91
95
  const fs = (await withTimeout(use('fs'), 30000, 'loading fs')).promises;
92
96
  // Import shared library functions
@@ -19,7 +19,10 @@ const $silent = $({ mirror: false, capture: true });
19
19
 
20
20
  const yargsModule = await use('yargs@17.7.2');
21
21
  const yargs = yargsModule.default || yargsModule;
22
- const { hideBin } = await use('yargs@17.7.2/helpers');
22
+ const helpersModule = await use('yargs@17.7.2/helpers');
23
+ // Node 24 CJS/ESM interop may return the whole module object instead of named exports directly
24
+ const _helpers = helpersModule.default || helpersModule;
25
+ const hideBin = _helpers.hideBin || (argv => argv.slice(2));
23
26
  const fs = (await use('fs')).promises;
24
27
 
25
28
  // Import log function from lib.mjs
@@ -36,7 +36,9 @@ if (typeof globalThis.use === 'undefined') {
36
36
  }
37
37
  }
38
38
 
39
- const getenv = await use('getenv');
39
+ const getenvModule = await use('getenv');
40
+ // Node 24 CJS/ESM interop may return the whole module object instead of the function directly
41
+ const getenv = typeof getenvModule === 'function' ? getenvModule : getenvModule.default || getenvModule;
40
42
  const linoModule = await use('links-notation');
41
43
  const LinoParser = linoModule.Parser || linoModule.default?.Parser;
42
44
 
@@ -17,7 +17,10 @@ export const initializeConfig = async use => {
17
17
  // Import yargs with specific version for hideBin support
18
18
  const yargsModule = await use('yargs@17.7.2');
19
19
  const yargs = yargsModule.default || yargsModule;
20
- const { hideBin } = await use('yargs@17.7.2/helpers');
20
+ const helpersModule = await use('yargs@17.7.2/helpers');
21
+ // Node 24 CJS/ESM interop may return the whole module object instead of named exports directly
22
+ const helpers = helpersModule.default || helpersModule;
23
+ const hideBin = helpers.hideBin || (argv => argv.slice(2));
21
24
 
22
25
  return { yargs, hideBin };
23
26
  };
package/src/solve.mjs CHANGED
@@ -77,8 +77,7 @@ const { startAutoRestartUntilMergeable } = await import('./solve.auto-merge.lib.
77
77
  const { runAutoEnsureRequirements } = await import('./solve.auto-ensure.lib.mjs');
78
78
  const exitHandler = await import('./exit-handler.lib.mjs');
79
79
  const { initializeExitHandler, installGlobalExitHandlers, safeExit } = exitHandler;
80
- const interruptLib = await import('./solve.interrupt.lib.mjs');
81
- const { createInterruptWrapper } = interruptLib;
80
+ const { createInterruptWrapper } = await import('./solve.interrupt.lib.mjs');
82
81
  const getResourceSnapshot = memoryCheck.getResourceSnapshot;
83
82
 
84
83
  // Import new modular components
@@ -125,9 +124,7 @@ try {
125
124
  }
126
125
  global.verboseMode = argv.verbose;
127
126
 
128
- // If user specified a custom log directory, we would need to move the log file
129
- // However, this adds complexity, so we accept that early logs go to cwd
130
- // The trade-off is: early logs in cwd vs missing version/command in error cases
127
+ // Early logs go to cwd; custom log dir takes effect after argv is parsed
131
128
 
132
129
  // Conditionally import tool-specific functions after argv is parsed
133
130
  let checkForUncommittedChanges;
@@ -190,7 +187,6 @@ if (!urlValidation.isValid) {
190
187
  }
191
188
  const { isIssueUrl, isPrUrl, normalizedUrl, owner, repo, number: urlNumber } = urlValidation;
192
189
  issueUrl = normalizedUrl || issueUrl;
193
- // Store owner and repo globally for error handlers and interrupt context
194
190
  global.owner = owner;
195
191
  global.repo = repo;
196
192
  cleanupContext.owner = owner;
@@ -517,17 +513,13 @@ if (isPrUrl) {
517
513
  issueNumber = urlNumber;
518
514
  await log(`📝 Issue mode: Working with issue #${issueNumber}`);
519
515
  }
520
- // Create or find temporary directory for cloning the repository
521
- // Pass workspace info for --enable-workspaces mode (works with all tools)
522
516
  const workspaceInfo = argv.enableWorkspaces ? { owner, repo, issueNumber } : null;
523
517
  const { tempDir, workspaceTmpDir, needsClone } = await setupTempDirectory(argv, workspaceInfo);
524
- // Populate cleanup context for signal handlers (owner/repo updated again here for redundancy)
525
518
  cleanupContext.tempDir = tempDir;
526
519
  cleanupContext.argv = argv;
527
520
  cleanupContext.owner = owner;
528
521
  cleanupContext.repo = repo;
529
522
  if (prNumber) cleanupContext.prNumber = prNumber;
530
- // Initialize limitReached variable outside try block for finally clause
531
523
  let limitReached = false;
532
524
  try {
533
525
  // Set up repository and clone using the new module
@@ -24,7 +24,9 @@ const { loadLenvConfig } = await import('./lenv-reader.lib.mjs');
24
24
  const dotenvxModule = await use('@dotenvx/dotenvx');
25
25
  const dotenvx = dotenvxModule.default || dotenvxModule;
26
26
 
27
- const getenv = await use('getenv');
27
+ const getenvModule = await use('getenv');
28
+ // Node 24 CJS/ESM interop may return the whole module object instead of the function directly
29
+ const getenv = typeof getenvModule === 'function' ? getenvModule : getenvModule.default || getenvModule;
28
30
 
29
31
  // Load .env configuration as base
30
32
  // quiet: true suppresses info messages, ignore: ['MISSING_ENV_FILE'] suppresses error when .env doesn't exist
@@ -37,7 +39,10 @@ loadLenvConfig({ override: true, quiet: true });
37
39
 
38
40
  const yargsModule = await use('yargs@17.7.2');
39
41
  const yargs = yargsModule.default || yargsModule;
40
- const { hideBin } = await use('yargs@17.7.2/helpers');
42
+ const helpersModuleBot = await use('yargs@17.7.2/helpers');
43
+ // Node 24 CJS/ESM interop may return the whole module object instead of named exports directly
44
+ const _helpersBot = helpersModuleBot.default || helpersModuleBot;
45
+ const hideBin = _helpersBot.hideBin || (argv => argv.slice(2));
41
46
  // Import yargs configurations, GitHub utilities, and telegram helpers
42
47
  const { createYargsConfig: createSolveYargsConfig, detectMalformedFlags } = await import('./solve.config.lib.mjs');
43
48
  const { createYargsConfig: createHiveYargsConfig } = await import('./hive.config.lib.mjs');