@inerrata-corporation/errata 2.0.6-dev.2635 → 2.0.6-dev.2654
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 +21 -11
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -78515,7 +78515,7 @@ function createWatchBreaker(deps) {
|
|
|
78515
78515
|
}
|
|
78516
78516
|
|
|
78517
78517
|
// src/engine.ts
|
|
78518
|
-
var DAEMON_VERSION = true ? "2.0.6-dev.
|
|
78518
|
+
var DAEMON_VERSION = true ? "2.0.6-dev.2654" : "2.0.0-alpha.0";
|
|
78519
78519
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
78520
78520
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
78521
78521
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -78971,7 +78971,7 @@ function createWorkspaceEngine(opts) {
|
|
|
78971
78971
|
);
|
|
78972
78972
|
return null;
|
|
78973
78973
|
}) : null;
|
|
78974
|
-
const doneRender = prebuilt ?
|
|
78974
|
+
const doneRender = markPass(`${prebuilt ? "context-render" : "context-render-inline"}:${profile.name}`);
|
|
78975
78975
|
const pendingUpdate = opts.pendingUpdate?.() ?? null;
|
|
78976
78976
|
const daemonDistress = opts.daemonDistress?.() ?? null;
|
|
78977
78977
|
const reviewItems = pickReviewItems();
|
|
@@ -79008,7 +79008,7 @@ function createWorkspaceEngine(opts) {
|
|
|
79008
79008
|
}
|
|
79009
79009
|
} : {}
|
|
79010
79010
|
});
|
|
79011
|
-
doneRender
|
|
79011
|
+
doneRender();
|
|
79012
79012
|
try {
|
|
79013
79013
|
const seq = store.currentIngestSeq();
|
|
79014
79014
|
const stamped = recordRenderLedger(store, ledger, seq, Date.now());
|
|
@@ -80559,9 +80559,11 @@ B: ${b}`,
|
|
|
80559
80559
|
}
|
|
80560
80560
|
return report;
|
|
80561
80561
|
},
|
|
80562
|
-
semanticMaintenance() {
|
|
80562
|
+
async semanticMaintenance() {
|
|
80563
|
+
const yieldLoop = () => new Promise((r) => setImmediate(r));
|
|
80563
80564
|
const seqBefore = store.currentIngestSeq();
|
|
80564
80565
|
const report = runSemanticMaintenance(store);
|
|
80566
|
+
await yieldLoop();
|
|
80565
80567
|
let hintUpgrade = { upgraded: 0, standing: 0, unresolvable: 0, blocked: 0 };
|
|
80566
80568
|
try {
|
|
80567
80569
|
hintUpgrade = upgradeAnchorHints(store, profile.id, Date.now());
|
|
@@ -80586,6 +80588,7 @@ B: ${b}`,
|
|
|
80586
80588
|
if (report.revisitsCleared > 0 || report.fixCandidatesSettled > 0 || report.designResolved > 0) {
|
|
80587
80589
|
refreshContextNow();
|
|
80588
80590
|
}
|
|
80591
|
+
await yieldLoop();
|
|
80589
80592
|
try {
|
|
80590
80593
|
const t0 = Date.now();
|
|
80591
80594
|
appendPassLedger(
|
|
@@ -80596,6 +80599,7 @@ B: ${b}`,
|
|
|
80596
80599
|
);
|
|
80597
80600
|
} catch {
|
|
80598
80601
|
}
|
|
80602
|
+
await yieldLoop();
|
|
80599
80603
|
livenessWatch.maybeRun();
|
|
80600
80604
|
return report;
|
|
80601
80605
|
},
|
|
@@ -85571,7 +85575,8 @@ async function startMultiDaemon(opts = {}) {
|
|
|
85571
85575
|
if (opts2.affinity === "note") sessionAffinity.note(body2["session_id"], owner.root);
|
|
85572
85576
|
owner.lastHookAt = Date.now();
|
|
85573
85577
|
const sub = c.req.path;
|
|
85574
|
-
const
|
|
85578
|
+
const tag = (v) => typeof v === "string" ? ` ${v.slice(0, 40)}` : "";
|
|
85579
|
+
const done = markPass(`${sub}:${owner.entry.name}${tag(body2["hook_event_name"])}${tag(body2["tool_name"])}`);
|
|
85575
85580
|
try {
|
|
85576
85581
|
return await owner.webApp.fetch(
|
|
85577
85582
|
new Request(`http://local${sub}`, {
|
|
@@ -85955,12 +85960,12 @@ async function startMultiDaemon(opts = {}) {
|
|
|
85955
85960
|
}
|
|
85956
85961
|
return out2;
|
|
85957
85962
|
},
|
|
85958
|
-
semanticMaintenanceAll() {
|
|
85963
|
+
async semanticMaintenanceAll() {
|
|
85959
85964
|
const out2 = /* @__PURE__ */ new Map();
|
|
85960
85965
|
for (const r of records) {
|
|
85961
85966
|
const done = markPass(`semantic:${r.entry.name}`);
|
|
85962
85967
|
try {
|
|
85963
|
-
out2.set(r.id, r.engine.semanticMaintenance());
|
|
85968
|
+
out2.set(r.id, await r.engine.semanticMaintenance());
|
|
85964
85969
|
} catch (err2) {
|
|
85965
85970
|
console.warn(
|
|
85966
85971
|
`[errata] semantic maintenance failed for ${r.entry.name}: ${err2 instanceof Error ? err2.message : err2}`
|
|
@@ -90010,9 +90015,12 @@ async function cmdDash(args2) {
|
|
|
90010
90015
|
}).catch(() => {
|
|
90011
90016
|
});
|
|
90012
90017
|
};
|
|
90013
|
-
|
|
90018
|
+
let semanticRunning = false;
|
|
90019
|
+
const runSemanticPass = async (reason) => {
|
|
90020
|
+
if (semanticRunning) return;
|
|
90021
|
+
semanticRunning = true;
|
|
90014
90022
|
try {
|
|
90015
|
-
const reports = handle2.semanticMaintenanceAll();
|
|
90023
|
+
const reports = await handle2.semanticMaintenanceAll();
|
|
90016
90024
|
let cleared = 0;
|
|
90017
90025
|
let settled = 0;
|
|
90018
90026
|
let raised = 0;
|
|
@@ -90028,6 +90036,8 @@ async function cmdDash(args2) {
|
|
|
90028
90036
|
}
|
|
90029
90037
|
} catch (err2) {
|
|
90030
90038
|
console.warn(`[semantic] pass failed: ${err2 instanceof Error ? err2.message : err2}`);
|
|
90039
|
+
} finally {
|
|
90040
|
+
semanticRunning = false;
|
|
90031
90041
|
}
|
|
90032
90042
|
};
|
|
90033
90043
|
const scheduleQuiescenceFlush = () => {
|
|
@@ -90039,7 +90049,7 @@ async function cmdDash(args2) {
|
|
|
90039
90049
|
};
|
|
90040
90050
|
const settleThenConsolidate = (reason, force) => {
|
|
90041
90051
|
const flushed = runBoundaryFlush(reason);
|
|
90042
|
-
setImmediate(() => runSemanticPass(reason));
|
|
90052
|
+
setImmediate(() => void runSemanticPass(reason));
|
|
90043
90053
|
void flushed.finally(() => triggerConsolidation(force));
|
|
90044
90054
|
};
|
|
90045
90055
|
handle2.onSessionBoundary(() => settleThenConsolidate("session-end", true));
|
|
@@ -90276,7 +90286,7 @@ async function cmdDash(args2) {
|
|
|
90276
90286
|
};
|
|
90277
90287
|
triggerConsolidation = (force) => void maybeConsolidate(force);
|
|
90278
90288
|
const nightlyInterval = setInterval(() => {
|
|
90279
|
-
runSemanticPass("periodic");
|
|
90289
|
+
void runSemanticPass("periodic");
|
|
90280
90290
|
triggerConsolidation(false);
|
|
90281
90291
|
}, NIGHTLY_INTERVAL_MS);
|
|
90282
90292
|
const shutdown = async (signal) => {
|