codeharness 0.13.0 → 0.13.2
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/dist/index.js +47 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1348,7 +1348,7 @@ function importStoriesToBeads(stories, opts, beadsFns) {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
|
|
1350
1350
|
// src/commands/init.ts
|
|
1351
|
-
var HARNESS_VERSION = true ? "0.13.
|
|
1351
|
+
var HARNESS_VERSION = true ? "0.13.2" : "0.0.0-dev";
|
|
1352
1352
|
function getStackLabel(stack) {
|
|
1353
1353
|
if (stack === "nodejs") return "Node.js (package.json)";
|
|
1354
1354
|
if (stack === "python") return "Python";
|
|
@@ -3343,7 +3343,42 @@ function validateProofQuality(proofPath) {
|
|
|
3343
3343
|
const narrativeMatches = [...content.matchAll(narrativeAcPattern)];
|
|
3344
3344
|
const narrativeAcNumbers = new Set(narrativeMatches.map((m) => m[1]));
|
|
3345
3345
|
if (narrativeAcNumbers.size === 0) {
|
|
3346
|
-
|
|
3346
|
+
const bulletAcPattern = /^- AC ?(\d+)[^:\n]*:/gm;
|
|
3347
|
+
const bulletMatches = [...content.matchAll(bulletAcPattern)];
|
|
3348
|
+
const bulletAcNumbers = new Set(bulletMatches.map((m) => m[1]));
|
|
3349
|
+
if (bulletAcNumbers.size === 0) {
|
|
3350
|
+
return { verified: 0, pending: 0, escalated: 0, total: 0, passed: false };
|
|
3351
|
+
}
|
|
3352
|
+
let bVerified = 0;
|
|
3353
|
+
let bPending = 0;
|
|
3354
|
+
let bEscalated = 0;
|
|
3355
|
+
for (const acNum of bulletAcNumbers) {
|
|
3356
|
+
const bulletPattern = new RegExp(`^- AC ?${acNum}[^:\\n]*:(.*)$`, "m");
|
|
3357
|
+
const bulletMatch = content.match(bulletPattern);
|
|
3358
|
+
if (!bulletMatch) {
|
|
3359
|
+
bPending++;
|
|
3360
|
+
continue;
|
|
3361
|
+
}
|
|
3362
|
+
const bulletText = bulletMatch[1].toLowerCase();
|
|
3363
|
+
if (bulletText.includes("n/a") || bulletText.includes("escalat") || bulletText.includes("superseded")) {
|
|
3364
|
+
bEscalated++;
|
|
3365
|
+
} else {
|
|
3366
|
+
bVerified++;
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
const hasAnyEvidence = /```output\n/m.test(content);
|
|
3370
|
+
if (!hasAnyEvidence) {
|
|
3371
|
+
bPending += bVerified;
|
|
3372
|
+
bVerified = 0;
|
|
3373
|
+
}
|
|
3374
|
+
const bTotal = bVerified + bPending + bEscalated;
|
|
3375
|
+
return {
|
|
3376
|
+
verified: bVerified,
|
|
3377
|
+
pending: bPending,
|
|
3378
|
+
escalated: bEscalated,
|
|
3379
|
+
total: bTotal,
|
|
3380
|
+
passed: bPending === 0 && bVerified > 0
|
|
3381
|
+
};
|
|
3347
3382
|
}
|
|
3348
3383
|
const sortedAcs = narrativeMatches.map((m) => ({ num: m[1], idx: m.index })).filter((v, i, a) => a.findIndex((x) => x.num === v.num) === i).sort((a, b) => a.idx - b.idx);
|
|
3349
3384
|
for (let i = 0; i < sortedAcs.length; i++) {
|
|
@@ -3566,7 +3601,15 @@ function verifyStory(storyId, isJson, root) {
|
|
|
3566
3601
|
} else {
|
|
3567
3602
|
showboatStatus = showboatResult.passed ? "pass" : "fail";
|
|
3568
3603
|
if (!showboatResult.passed) {
|
|
3569
|
-
|
|
3604
|
+
if (isJson) {
|
|
3605
|
+
jsonOutput({
|
|
3606
|
+
status: "fail",
|
|
3607
|
+
message: `Showboat verify failed: ${showboatResult.output}`,
|
|
3608
|
+
proofQuality: { verified: proofQuality.verified, pending: proofQuality.pending, escalated: proofQuality.escalated, total: proofQuality.total }
|
|
3609
|
+
});
|
|
3610
|
+
} else {
|
|
3611
|
+
fail(`Showboat verify failed: ${showboatResult.output}`);
|
|
3612
|
+
}
|
|
3570
3613
|
process.exitCode = 1;
|
|
3571
3614
|
return;
|
|
3572
3615
|
}
|
|
@@ -6854,7 +6897,7 @@ function registerGithubImportCommand(program) {
|
|
|
6854
6897
|
}
|
|
6855
6898
|
|
|
6856
6899
|
// src/index.ts
|
|
6857
|
-
var VERSION = true ? "0.13.
|
|
6900
|
+
var VERSION = true ? "0.13.2" : "0.0.0-dev";
|
|
6858
6901
|
function createProgram() {
|
|
6859
6902
|
const program = new Command();
|
|
6860
6903
|
program.name("codeharness").description("Makes autonomous coding agents produce software that actually works").version(VERSION).option("--json", "Output in machine-readable JSON format");
|