@kody-ade/kody-engine 0.3.53 → 0.3.54

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.
Files changed (2) hide show
  1. package/dist/bin/kody.js +35 -6
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@kody-ade/kody-engine",
6
- version: "0.3.53",
6
+ version: "0.3.54",
7
7
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
8
8
  license: "MIT",
9
9
  type: "module",
@@ -807,9 +807,16 @@ function autoDispatch(opts) {
807
807
  const aliased = firstToken ? aliases[firstToken] ?? firstToken : null;
808
808
  let executable = null;
809
809
  let consumedFirstToken = false;
810
- if (aliased && getProfileInputs(aliased) !== null) {
811
- executable = aliased;
812
- consumedFirstToken = true;
810
+ if (aliased) {
811
+ if (getProfileInputs(aliased) !== null) {
812
+ executable = aliased;
813
+ consumedFirstToken = true;
814
+ } else if (firstToken && aliases[firstToken] && aliases[firstToken] === aliased) {
815
+ process.stderr.write(
816
+ `[kody] dispatch: alias '${firstToken}' \u2192 '${aliased}' has no matching executable; falling back to default
817
+ `
818
+ );
819
+ }
813
820
  }
814
821
  if (!executable) {
815
822
  executable = isPr ? opts?.config?.defaultPrExecutable ?? "fix" : opts?.config?.defaultExecutable ?? null;
@@ -3340,8 +3347,8 @@ var ensurePr2 = async (ctx) => {
3340
3347
  }
3341
3348
  };
3342
3349
  function computeFailureReason(ctx) {
3343
- const misses = ctx.data.coverageMisses ?? [];
3344
- if (misses.length > 0) return `missing tests: ${misses.map((m) => m.expectedTest).join(", ")}`;
3350
+ const expectedTests = collectExpectedTests(ctx.data.coverageMisses);
3351
+ if (expectedTests.length > 0) return `missing tests: ${expectedTests.join(", ")}`;
3345
3352
  const agentDone = Boolean(ctx.data.agentDone);
3346
3353
  if (!agentDone) {
3347
3354
  return ctx.data.agentFailureReason || ctx.data.agentError || ctx.data.commitCrash || "agent did not emit DONE";
@@ -3349,6 +3356,28 @@ function computeFailureReason(ctx) {
3349
3356
  if (ctx.data.verifyOk === false) return ctx.data.verifyReason || "verify failed";
3350
3357
  return "";
3351
3358
  }
3359
+ function collectExpectedTests(raw) {
3360
+ if (!Array.isArray(raw) || raw.length === 0) return [];
3361
+ const out = [];
3362
+ let unparseable = 0;
3363
+ for (const item of raw) {
3364
+ if (!item || typeof item !== "object") {
3365
+ unparseable++;
3366
+ continue;
3367
+ }
3368
+ const r = item;
3369
+ const candidate = r.expectedTest ?? r.expected ?? r.file;
3370
+ if (typeof candidate === "string" && candidate.length > 0) out.push(candidate);
3371
+ else unparseable++;
3372
+ }
3373
+ if (unparseable > 0) {
3374
+ process.stderr.write(
3375
+ `[kody] ensurePr: ${unparseable} coverageMisses entry/entries had no recognizable test path \u2014 shape may have drifted
3376
+ `
3377
+ );
3378
+ }
3379
+ return out;
3380
+ }
3352
3381
 
3353
3382
  // src/scripts/finishFlow.ts
3354
3383
  import { execFileSync as execFileSync10 } from "child_process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.3.53",
3
+ "version": "0.3.54",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",