karajan-code 4.59.0 → 4.59.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karajan-code",
3
- "version": "4.59.0",
3
+ "version": "4.59.1",
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",
@@ -18,11 +18,14 @@ const baseOf = (range) => {
18
18
  /** The repo's allow list at the base of the range; empty when the base has no such file. */
19
19
  export async function repoPrivacyAllow({ projectDir, range, run = runCommand }) {
20
20
  const base = baseOf(range);
21
- const res = await run("git", ["-C", projectDir, "show", `${base}:${REPO_PRIVACY}`]);
22
- if (res.exitCode !== 0) {
23
- if (/does not exist|exists on disk, but not in/.test(res.stderr ?? "")) return [];
24
- throw new Error(`git show ${base}:${REPO_PRIVACY} failed: ${(res.stderr || "").trim()}`);
21
+ // KJC-BUG-0387: exit codes, never git's messages, which follow the user's language.
22
+ const git = (...args) => run("git", ["-C", projectDir, ...args]);
23
+ if ((await git("rev-parse", "--verify", "--quiet", `${base}^{commit}`)).exitCode !== 0) {
24
+ throw new Error(`cannot read the privacy allow list: the base ${base} is not a commit here`);
25
25
  }
26
+ if ((await git("cat-file", "-e", `${base}:${REPO_PRIVACY}`)).exitCode !== 0) return [];
27
+ const res = await git("show", `${base}:${REPO_PRIVACY}`);
28
+ if (res.exitCode !== 0) throw new Error(`git show ${base}:${REPO_PRIVACY} failed: ${(res.stderr || "").trim()}`);
26
29
  let raw;
27
30
  try {
28
31
  raw = parseYaml(res.stdout) || {};