karajan-code 4.49.3 → 4.49.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karajan-code",
3
- "version": "4.49.3",
3
+ "version": "4.49.4",
4
4
  "description": "Local multi-agent coding orchestrator with TDD, SonarQube, and code review pipeline",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
@@ -76,6 +76,7 @@
76
76
  "postinstall": "node scripts/postinstall.js",
77
77
  "setup": "node scripts/install.js",
78
78
  "test": "vitest run",
79
+ "test:scenarios": "vitest run --config tests/scenarios/vitest.config.js --root .",
79
80
  "test:watch": "vitest",
80
81
  "test:coverage": "vitest run --coverage",
81
82
  "lint": "eslint src/ packages/",
@@ -259,7 +259,12 @@ export function registerPipeline(program, { pkgVersion }) {
259
259
  // ENV-B1 (KJC-TSK-0637): the gate mode records a verdict tied to
260
260
  // the exact diff so the pre-commit hook can enforce cross-AI review.
261
261
  if (flags.staged || flags.check || flags.range || flags.installGate || flags.prune) {
262
- await reviewGateCommand({ config, logger, flags: { ...flags, task } });
262
+ // KJC-BUG-0349: the gate's task is optional, but --task-file carries
263
+ // the evidence the reviewer must weigh; it was never read here.
264
+ const gateTask = task || flags.taskFile
265
+ ? await resolveTaskInput({ task, taskFile: flags.taskFile, projectDir: config.projectDir, logger })
266
+ : task;
267
+ await reviewGateCommand({ config, logger, flags: { ...flags, task: gateTask } });
263
268
  return;
264
269
  }
265
270
  const resolvedTask = await resolveTaskInput({ task, taskFile: flags.taskFile, projectDir: config.projectDir, logger });
@@ -8,7 +8,7 @@ import { waitForAnalysis } from "./api.js";
8
8
  import { resolveSonarProjectKey } from "./project-key.js";
9
9
  import {
10
10
  resolveSonarHost,
11
- resolveSonarToken as resolveToken,
11
+ resolveSonarTokenAsync,
12
12
  resolveSonarCredentials,
13
13
  } from "./config-resolver.js";
14
14
 
@@ -210,8 +210,9 @@ async function maybeRunCoverage(config) {
210
210
  return checkLcovExists(lcovPath, blockOnFailure, run.stdout || "");
211
211
  }
212
212
 
213
- async function resolveSonarTokenWithFallback(config, apiHost) {
214
- const explicitToken = resolveToken(config);
213
+ export async function resolveSonarTokenWithFallback(config, apiHost) {
214
+ // KJC-BUG-0350: the async resolver also reads the token the bootstrap persisted.
215
+ const explicitToken = await resolveSonarTokenAsync(config);
215
216
  if (explicitToken) return explicitToken;
216
217
 
217
218
  const { user: adminUser, passwords } = await resolveSonarCredentials(config);