@inerrata-corporation/errata 2.0.2-dev.558 → 2.0.2-dev.568
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 +20 -6
- 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);
|
|
@@ -54357,7 +54367,8 @@ function createLivenessWatch(deps) {
|
|
|
54357
54367
|
});
|
|
54358
54368
|
}
|
|
54359
54369
|
const rows = evaluateMechanisms(deps.store, invocations);
|
|
54360
|
-
const
|
|
54370
|
+
const workspaceActive = invocations.has("capture") || invocations.has("render");
|
|
54371
|
+
const bad = workspaceActive ? rows.filter((r) => hasStarvedMechanism([r])) : [];
|
|
54361
54372
|
appendPassLedger(deps.configDir, "liveness-watch", Date.now() - started2, {
|
|
54362
54373
|
mechanisms: rows.length,
|
|
54363
54374
|
alarms: bad.length
|
|
@@ -54409,7 +54420,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
54409
54420
|
}
|
|
54410
54421
|
|
|
54411
54422
|
// src/engine.ts
|
|
54412
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
54423
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.568" : "2.0.0-alpha.0";
|
|
54413
54424
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
54414
54425
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
54415
54426
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -56480,6 +56491,9 @@ import { join as join30 } from "node:path";
|
|
|
56480
56491
|
var HEAD_BYTES = 8 * 1024;
|
|
56481
56492
|
var INDEX_TTL_MS = 10 * 60 * 1e3;
|
|
56482
56493
|
var MIN_SYMBOL_LEN = 4;
|
|
56494
|
+
function isNameShapedSymbol(name2) {
|
|
56495
|
+
return /[A-Z0-9_$]/.test(name2);
|
|
56496
|
+
}
|
|
56483
56497
|
var NAMED_IMPORT_RE = /import\s+(?:type\s+)?(.+?)\s+from\s+['"]([^'"]+)['"]/g;
|
|
56484
56498
|
var REQUIRE_RE = /(?:const|let|var)\s+(.+?)\s*=\s*require\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
56485
56499
|
function isBareExternal(spec, internalNames) {
|
|
@@ -56559,7 +56573,7 @@ function publicSymbolIndex(store, workspaceRoot, deps = {}) {
|
|
|
56559
56573
|
for (const m of head2.matchAll(re)) {
|
|
56560
56574
|
if (!isBareExternal(m[2], internal)) continue;
|
|
56561
56575
|
for (const name2 of bindingNames(m[1])) {
|
|
56562
|
-
if (name2.length >= MIN_SYMBOL_LEN) symbols.add(name2);
|
|
56576
|
+
if (name2.length >= MIN_SYMBOL_LEN && isNameShapedSymbol(name2)) symbols.add(name2);
|
|
56563
56577
|
}
|
|
56564
56578
|
}
|
|
56565
56579
|
}
|