@inerrata-corporation/errata 2.0.2-dev.558 → 2.0.2-dev.560
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/errata.mjs +14 -4
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -18961,7 +18961,7 @@ function ingestDesignProblem(store, flag, opts) {
|
|
|
18961
18961
|
mergeEdge(store, problemId, rootCauseId, "CAUSED_BY", opts.ts);
|
|
18962
18962
|
}
|
|
18963
18963
|
let solutionId = null;
|
|
18964
|
-
if (flag.fix?.trim()) {
|
|
18964
|
+
if (flag.fix?.trim() && !isFragmentFixNote(flag.fix)) {
|
|
18965
18965
|
solutionId = `dfix_${digest({ problemId, fix: flag.fix })}`.slice(0, 56);
|
|
18966
18966
|
store.mergeNode(
|
|
18967
18967
|
buildNode(store, solutionId, "Solution", flag.fix.trim(), opts.ts, {
|
|
@@ -19164,6 +19164,12 @@ function reinforceSameAnchorProblem(store, relPath, workspaceId2, statement, sou
|
|
|
19164
19164
|
}
|
|
19165
19165
|
return existing.id;
|
|
19166
19166
|
}
|
|
19167
|
+
function isFragmentFixNote(note) {
|
|
19168
|
+
const t = note.trim();
|
|
19169
|
+
if (t.length === 0) return true;
|
|
19170
|
+
if (/^[)\]},;:.!?]/.test(t)) return true;
|
|
19171
|
+
return /^(and|but|or|nor|so|yet|also|plus)\b/i.test(t);
|
|
19172
|
+
}
|
|
19167
19173
|
function isAutoMinted(n) {
|
|
19168
19174
|
return n.label === "Solution" && String(n.description ?? "").startsWith(AUTO_MINT_PREFIX);
|
|
19169
19175
|
}
|
|
@@ -19297,7 +19303,7 @@ function closeDesignProblem(store, problemId, fixNote, t) {
|
|
|
19297
19303
|
const p = store.getNode(problemId);
|
|
19298
19304
|
if (!p || p.label !== "Problem") return false;
|
|
19299
19305
|
if (p.attrs["resolvedAs"]) return false;
|
|
19300
|
-
if (fixNote?.trim()) {
|
|
19306
|
+
if (fixNote?.trim() && !isFragmentFixNote(fixNote)) {
|
|
19301
19307
|
const sols = store.outEdges(problemId, ["SOLVED_BY"]).map((e) => store.getNode(e.to)).filter((n) => n !== null);
|
|
19302
19308
|
if (sols.every((s) => isAutoMinted(s))) {
|
|
19303
19309
|
const solId = `dfix_${digest({ problemId, fix: fixNote })}`.slice(0, 56);
|
|
@@ -22133,6 +22139,7 @@ __export(src_exports2, {
|
|
|
22133
22139
|
induceTriage: () => induceTriage,
|
|
22134
22140
|
ingestDesignProblem: () => ingestDesignProblem,
|
|
22135
22141
|
isConstraintProblem: () => isConstraintProblem,
|
|
22142
|
+
isFragmentFixNote: () => isFragmentFixNote,
|
|
22136
22143
|
isPlaceholderStatement: () => isPlaceholderStatement,
|
|
22137
22144
|
isUnfilledPlaceholder: () => isUnfilledPlaceholder,
|
|
22138
22145
|
linkProblemToLanguages: () => linkProblemToLanguages,
|
|
@@ -51635,9 +51642,12 @@ function fixRationaleBefore(sentence, idx) {
|
|
|
51635
51642
|
}
|
|
51636
51643
|
function fixRationaleAfter(sentence, endIdx) {
|
|
51637
51644
|
const win = sentence.slice(endIdx, endIdx + FIX_RATIONALE_WINDOW).replace(new RegExp(CITE_GROUP_RE.source, "g"), " ").replace(new RegExp(FLAG_RE.source, "g"), " ");
|
|
51645
|
+
if (/^\s*[)\]}]/.test(win)) return "";
|
|
51638
51646
|
const stripped = win.replace(/^[\s—:–,-]+/, "");
|
|
51639
51647
|
const m = /^[^.;!?—]*/.exec(stripped);
|
|
51640
|
-
|
|
51648
|
+
const clause = (m ? m[0] : stripped).replace(/\s+/g, " ").trim();
|
|
51649
|
+
if (/^(and|but|or|nor|so|yet|also|plus)\b/i.test(clause)) return "";
|
|
51650
|
+
return clause;
|
|
51641
51651
|
}
|
|
51642
51652
|
function deriveFixRationale(sentence, startIdx, endIdx) {
|
|
51643
51653
|
const before = fixRationaleBefore(sentence, startIdx);
|
|
@@ -54409,7 +54419,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
54409
54419
|
}
|
|
54410
54420
|
|
|
54411
54421
|
// src/engine.ts
|
|
54412
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
54422
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.560" : "2.0.0-alpha.0";
|
|
54413
54423
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
54414
54424
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
54415
54425
|
var GIT_OP_MUTE_MS = 4e3;
|