@nathapp/nax 0.67.6 → 0.67.7
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/nax.js +22 -5
- package/package.json +1 -1
package/dist/nax.js
CHANGED
|
@@ -52096,7 +52096,12 @@ async function runRectification(ctx, state, phaseCosts, phaseOutputs) {
|
|
|
52096
52096
|
storyId: ctx.storyId
|
|
52097
52097
|
});
|
|
52098
52098
|
}
|
|
52099
|
-
const exhaustedReasons = new Set([
|
|
52099
|
+
const exhaustedReasons = new Set([
|
|
52100
|
+
"max-attempts-total",
|
|
52101
|
+
"max-attempts-per-strategy",
|
|
52102
|
+
"bail-when",
|
|
52103
|
+
"no-strategy"
|
|
52104
|
+
]);
|
|
52100
52105
|
if (exhaustedReasons.has(cycleResult.exitReason) && cycleResult.finalFindings.length > 0) {
|
|
52101
52106
|
return { rectificationExhausted: true, unfixedFindings: cycleResult.finalFindings };
|
|
52102
52107
|
}
|
|
@@ -52821,6 +52826,9 @@ async function decideStageAction(ctx, planResult, inspection, opts) {
|
|
|
52821
52826
|
const isLiteMode = opts.tddMode?.isLite ?? false;
|
|
52822
52827
|
const shouldRollback = shouldRollbackTddFailure(opts.tddMode, inspection.failureCategory);
|
|
52823
52828
|
const { agentResult, selfVerificationFailed, pauseReason, failureCategory, needsHumanReview, combinedOutput } = inspection;
|
|
52829
|
+
if (isTdd && !planResult.success) {
|
|
52830
|
+
ctx.tddFailureCategory = failureCategory;
|
|
52831
|
+
}
|
|
52824
52832
|
if (planResult.rectificationExhausted && planResult.unfixedFindings && planResult.unfixedFindings.length > 0) {
|
|
52825
52833
|
const sources = new Set(planResult.unfixedFindings.map((f) => f.source));
|
|
52826
52834
|
const allMechanical = [...sources].every((s) => s === "lint" || s === "typecheck");
|
|
@@ -52830,6 +52838,16 @@ async function decideStageAction(ctx, planResult, inspection, opts) {
|
|
|
52830
52838
|
});
|
|
52831
52839
|
return { action: "continue" };
|
|
52832
52840
|
}
|
|
52841
|
+
if (!(isTdd && shouldRollback)) {
|
|
52842
|
+
const findingSources = [...sources].filter((source) => typeof source === "string");
|
|
52843
|
+
logger.error("execution", "Rectification exhausted with unfixed findings", {
|
|
52844
|
+
storyId: ctx.story.id,
|
|
52845
|
+
findingsCount: planResult.unfixedFindings.length,
|
|
52846
|
+
findingSources
|
|
52847
|
+
});
|
|
52848
|
+
await cleanupSessionOnFailure(ctx);
|
|
52849
|
+
return { action: "escalate", reason: "Rectification exhausted with unfixed findings" };
|
|
52850
|
+
}
|
|
52833
52851
|
}
|
|
52834
52852
|
if (selfVerificationFailed) {
|
|
52835
52853
|
logger.warn("execution", "Self-verification reported explicit failure", {
|
|
@@ -52865,7 +52883,6 @@ Reason: ${pauseReason}`,
|
|
|
52865
52883
|
return { action: "pause", reason: pauseReason };
|
|
52866
52884
|
}
|
|
52867
52885
|
if (isTdd && !planResult.success) {
|
|
52868
|
-
ctx.tddFailureCategory = failureCategory;
|
|
52869
52886
|
if (shouldRollback && opts.initialRef) {
|
|
52870
52887
|
try {
|
|
52871
52888
|
await _postRunDeps.rollbackToRef(ctx.workdir, opts.initialRef);
|
|
@@ -56736,7 +56753,7 @@ var package_default;
|
|
|
56736
56753
|
var init_package = __esm(() => {
|
|
56737
56754
|
package_default = {
|
|
56738
56755
|
name: "@nathapp/nax",
|
|
56739
|
-
version: "0.67.
|
|
56756
|
+
version: "0.67.7",
|
|
56740
56757
|
description: "AI Coding Agent Orchestrator \u2014 loops until done",
|
|
56741
56758
|
type: "module",
|
|
56742
56759
|
bin: {
|
|
@@ -56831,8 +56848,8 @@ var init_version = __esm(() => {
|
|
|
56831
56848
|
NAX_VERSION = package_default.version;
|
|
56832
56849
|
NAX_COMMIT = (() => {
|
|
56833
56850
|
try {
|
|
56834
|
-
if (/^[0-9a-f]{6,10}$/.test("
|
|
56835
|
-
return "
|
|
56851
|
+
if (/^[0-9a-f]{6,10}$/.test("1c26c38d"))
|
|
56852
|
+
return "1c26c38d";
|
|
56836
56853
|
} catch {}
|
|
56837
56854
|
try {
|
|
56838
56855
|
const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
|