@inerrata-corporation/errata 2.0.6-dev.2550 → 2.0.6-dev.2561
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 +22 -9
- package/package.json +1 -1
- package/pass-worker.mjs +3 -0
package/errata.mjs
CHANGED
|
@@ -20548,6 +20548,7 @@ function upgradeAnchorHintsForFile(store, relPath, workspaceId2, ts) {
|
|
|
20548
20548
|
function upgradeAnchorHints(store, workspaceId2, ts) {
|
|
20549
20549
|
let upgraded = 0;
|
|
20550
20550
|
let standing = 0;
|
|
20551
|
+
let unresolvable = 0;
|
|
20551
20552
|
const filesByPath = /* @__PURE__ */ new Map();
|
|
20552
20553
|
for (const f of store.findNodesByLabel("File")) {
|
|
20553
20554
|
if (f.attrs["workspaceId"] && f.attrs["workspaceId"] !== workspaceId2) continue;
|
|
@@ -20558,9 +20559,13 @@ function upgradeAnchorHints(store, workspaceId2, ts) {
|
|
|
20558
20559
|
if (p.validTo != null || p.attrs["resolvedAt"]) continue;
|
|
20559
20560
|
const hint = openAnchorHint(p);
|
|
20560
20561
|
if (!hint) continue;
|
|
20561
|
-
standing++;
|
|
20562
20562
|
const file2 = filesByPath.get(hint.path.trim().replace(/^\.?\//, ""));
|
|
20563
|
-
|
|
20563
|
+
if (!file2 || !isAnchorableCodePath(hint.path)) {
|
|
20564
|
+
unresolvable++;
|
|
20565
|
+
continue;
|
|
20566
|
+
}
|
|
20567
|
+
standing++;
|
|
20568
|
+
const changedAt = Number(file2.attrs["contentChangedAt"] ?? 0);
|
|
20564
20569
|
if (changedAt <= hint.ts) continue;
|
|
20565
20570
|
if (anchorProblemToWorkingFile(store, p.id, hint.path, workspaceId2, ts, "hint-confirmed")) {
|
|
20566
20571
|
consumeAnchorHint(store, p, ts);
|
|
@@ -20568,7 +20573,7 @@ function upgradeAnchorHints(store, workspaceId2, ts) {
|
|
|
20568
20573
|
standing--;
|
|
20569
20574
|
}
|
|
20570
20575
|
}
|
|
20571
|
-
return { upgraded, standing };
|
|
20576
|
+
return { upgraded, standing, unresolvable };
|
|
20572
20577
|
}
|
|
20573
20578
|
function resolveDesignProblemByStatement(store, statement, fixNote, t) {
|
|
20574
20579
|
const problemId = identityId({ kind: "DesignProblem", statement });
|
|
@@ -23478,6 +23483,7 @@ function evaluateMechanisms(store, invocations = /* @__PURE__ */ new Map(), mech
|
|
|
23478
23483
|
const stalled = backlog !== void 0 && backlog > 0 && effectCount === 0 && (inv?.runs ?? 0) >= STALL_MIN_RUNS && span >= STALL_MIN_SPAN_MS && (backlogWas === void 0 || backlog >= backlogWas);
|
|
23479
23484
|
let verdict;
|
|
23480
23485
|
if (!inv || inv.runs === 0) verdict = "never-invoked";
|
|
23486
|
+
else if (d.configCounter && inv.lastTotals?.[d.configCounter] === 0) verdict = "unconfigured";
|
|
23481
23487
|
else if (fed.fraction < (d.fedEdges?.minFraction ?? d.fed?.minFraction ?? 0)) verdict = "starved";
|
|
23482
23488
|
else if (stalled) verdict = "stalled";
|
|
23483
23489
|
else if (effectCount === 0) verdict = "no-effect";
|
|
@@ -23505,7 +23511,7 @@ function formatMechanismStatus(rows, nowMs) {
|
|
|
23505
23511
|
return rows.map((r) => {
|
|
23506
23512
|
const pct = (r.fedFraction * 100).toFixed(r.fedFraction < 0.01 ? 2 : 1);
|
|
23507
23513
|
const age = r.lastInvokedMs === void 0 ? "never" : `${Math.max(0, Math.round((nowMs - r.lastInvokedMs) / 6e4))}m ago`;
|
|
23508
|
-
const mark = r.verdict === "ok" ? "ok " : r.verdict === "no-effect" ? "IDLE" : r.verdict === "stalled" ? "STUCK" : "DEAD";
|
|
23514
|
+
const mark = r.verdict === "ok" ? "ok " : r.verdict === "no-effect" ? "IDLE" : r.verdict === "unconfigured" ? "OFF" : r.verdict === "stalled" ? "STUCK" : "DEAD";
|
|
23509
23515
|
const hours = r.spanMs === void 0 ? 0 : Math.floor(r.spanMs / 36e5);
|
|
23510
23516
|
const over = hours >= 24 ? `${Math.floor(hours / 24)}d` : `${hours}h`;
|
|
23511
23517
|
const trend = r.verdict === "stalled" && r.backlog !== void 0 ? ` \u2014 ${r.backlog} waiting${r.backlogWas !== void 0 ? ` (was ${r.backlogWas})` : ""}, none cleared in ${over}` : "";
|
|
@@ -23712,7 +23718,8 @@ var init_mechanism_liveness = __esm({
|
|
|
23712
23718
|
// Standing nominations ARE the judge-less backlog — without the gauge a
|
|
23713
23719
|
// deployment with no judge configured reads as "nothing to fold".
|
|
23714
23720
|
backlogCounter: "standing",
|
|
23715
|
-
|
|
23721
|
+
configCounter: "judgeConfigured",
|
|
23722
|
+
note: "the ambiguous band needs the opt-in judge: set ERRATA_FOLD_JUDGE=1 + a configured chat provider (azure env), or leave it off and the nominations stand"
|
|
23716
23723
|
},
|
|
23717
23724
|
{
|
|
23718
23725
|
id: "cite-anchor-accrual",
|
|
@@ -33812,6 +33819,8 @@ function upsertFile(store, id, f, workspaceId2, skip) {
|
|
|
33812
33819
|
contentHash = createHash4("sha256").update(readFileSync10(f.absPath)).digest("hex");
|
|
33813
33820
|
} catch {
|
|
33814
33821
|
}
|
|
33822
|
+
const carried = { ...store.getNode(id)?.attrs ?? {} };
|
|
33823
|
+
for (const owned of ["contentHash", "indexSkipped", "symbolCount"]) delete carried[owned];
|
|
33815
33824
|
const node2 = {
|
|
33816
33825
|
id,
|
|
33817
33826
|
label: "File",
|
|
@@ -33830,6 +33839,7 @@ function upsertFile(store, id, f, workspaceId2, skip) {
|
|
|
33830
33839
|
community: null,
|
|
33831
33840
|
stability: "stable",
|
|
33832
33841
|
attrs: {
|
|
33842
|
+
...carried,
|
|
33833
33843
|
absPath: f.absPath,
|
|
33834
33844
|
relPath: f.relPath,
|
|
33835
33845
|
size: f.size,
|
|
@@ -78322,7 +78332,7 @@ function createWatchBreaker(deps) {
|
|
|
78322
78332
|
}
|
|
78323
78333
|
|
|
78324
78334
|
// src/engine.ts
|
|
78325
|
-
var DAEMON_VERSION = true ? "2.0.6-dev.
|
|
78335
|
+
var DAEMON_VERSION = true ? "2.0.6-dev.2561" : "2.0.0-alpha.0";
|
|
78326
78336
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
78327
78337
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
78328
78338
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -80341,7 +80351,7 @@ B: ${b}`,
|
|
|
80341
80351
|
semanticMaintenance() {
|
|
80342
80352
|
const seqBefore = store.currentIngestSeq();
|
|
80343
80353
|
const report = runSemanticMaintenance(store);
|
|
80344
|
-
let hintUpgrade = { upgraded: 0, standing: 0 };
|
|
80354
|
+
let hintUpgrade = { upgraded: 0, standing: 0, unresolvable: 0 };
|
|
80345
80355
|
try {
|
|
80346
80356
|
hintUpgrade = upgradeAnchorHints(store, profile.id, Date.now());
|
|
80347
80357
|
} catch {
|
|
@@ -80358,7 +80368,8 @@ B: ${b}`,
|
|
|
80358
80368
|
claimsEvaluated: report.claimsEvaluated,
|
|
80359
80369
|
seqAdvanced: store.currentIngestSeq() - seqBefore,
|
|
80360
80370
|
anchorHintsUpgraded: hintUpgrade.upgraded,
|
|
80361
|
-
anchorHintsStanding: hintUpgrade.standing
|
|
80371
|
+
anchorHintsStanding: hintUpgrade.standing,
|
|
80372
|
+
anchorHintsUnresolvable: hintUpgrade.unresolvable
|
|
80362
80373
|
});
|
|
80363
80374
|
if (report.revisitsCleared > 0 || report.fixCandidatesSettled > 0 || report.designResolved > 0) {
|
|
80364
80375
|
refreshContextNow();
|
|
@@ -80460,7 +80471,9 @@ B: ${b}`,
|
|
|
80460
80471
|
rejected: fj.rejected,
|
|
80461
80472
|
standing: fj.standing,
|
|
80462
80473
|
judgeErrors: fj.judgeErrors,
|
|
80463
|
-
retargeted: fj.retargeted
|
|
80474
|
+
retargeted: fj.retargeted,
|
|
80475
|
+
// Opt-in lane: 0 tells the liveness watch "off by choice", not "stuck".
|
|
80476
|
+
judgeConfigured: foldJudge ? 1 : 0
|
|
80464
80477
|
});
|
|
80465
80478
|
if (fj.folded > 0) {
|
|
80466
80479
|
console.log(`[errata] fold-judge: folded ${fj.folded} paraphrase pair(s) (${fj.foldedEmbedding} by embedding, ${fj.foldedJudge} by judge), ${fj.standing} standing`);
|
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -16968,6 +16968,8 @@ function upsertFile(store2, id, f, workspaceId, skip) {
|
|
|
16968
16968
|
contentHash = createHash3("sha256").update(readFileSync2(f.absPath)).digest("hex");
|
|
16969
16969
|
} catch {
|
|
16970
16970
|
}
|
|
16971
|
+
const carried = { ...store2.getNode(id)?.attrs ?? {} };
|
|
16972
|
+
for (const owned of ["contentHash", "indexSkipped", "symbolCount"]) delete carried[owned];
|
|
16971
16973
|
const node = {
|
|
16972
16974
|
id,
|
|
16973
16975
|
label: "File",
|
|
@@ -16986,6 +16988,7 @@ function upsertFile(store2, id, f, workspaceId, skip) {
|
|
|
16986
16988
|
community: null,
|
|
16987
16989
|
stability: "stable",
|
|
16988
16990
|
attrs: {
|
|
16991
|
+
...carried,
|
|
16989
16992
|
absPath: f.absPath,
|
|
16990
16993
|
relPath: f.relPath,
|
|
16991
16994
|
size: f.size,
|