@inerrata-corporation/errata 2.0.6-dev.2581 → 2.0.6-dev.2592
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 +23 -5
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -78120,6 +78120,14 @@ function passState() {
|
|
|
78120
78120
|
recent: [...recent]
|
|
78121
78121
|
};
|
|
78122
78122
|
}
|
|
78123
|
+
function describeHolders(running, finished, windowStart, now) {
|
|
78124
|
+
const parts2 = [...running].map((p) => `${p.name} +${((now - p.startedAt) / 1e3).toFixed(1)}s`);
|
|
78125
|
+
for (const p of finished) {
|
|
78126
|
+
if (p.endedAt < windowStart) break;
|
|
78127
|
+
parts2.push(`${p.name} ended ${(p.ms / 1e3).toFixed(1)}s`);
|
|
78128
|
+
}
|
|
78129
|
+
return parts2.length === 0 ? "idle" : parts2.join(" | ");
|
|
78130
|
+
}
|
|
78123
78131
|
function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
78124
78132
|
if (started) return;
|
|
78125
78133
|
started = true;
|
|
@@ -78128,8 +78136,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
78128
78136
|
const now = Date.now();
|
|
78129
78137
|
const lag = now - last - HEARTBEAT_MS;
|
|
78130
78138
|
if (lag > thresholdMs) {
|
|
78131
|
-
const
|
|
78132
|
-
const who = holders.length === 0 ? "idle" : holders.map((p) => `${p.name} +${((now - p.startedAt) / 1e3).toFixed(1)}s`).join(" | ");
|
|
78139
|
+
const who = describeHolders(active.values(), recent, last, now);
|
|
78133
78140
|
console.warn(
|
|
78134
78141
|
`[loop-lag] ${(/* @__PURE__ */ new Date()).toISOString()} event loop held ~${(lag / 1e3).toFixed(1)}s during "${who}"`
|
|
78135
78142
|
);
|
|
@@ -78389,7 +78396,7 @@ function createWatchBreaker(deps) {
|
|
|
78389
78396
|
}
|
|
78390
78397
|
|
|
78391
78398
|
// src/engine.ts
|
|
78392
|
-
var DAEMON_VERSION = true ? "2.0.6-dev.
|
|
78399
|
+
var DAEMON_VERSION = true ? "2.0.6-dev.2592" : "2.0.0-alpha.0";
|
|
78393
78400
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
78394
78401
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
78395
78402
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -85019,6 +85026,11 @@ async function startMultiDaemon(opts = {}) {
|
|
|
85019
85026
|
let boundaryFlushUnits = 0;
|
|
85020
85027
|
let boundaryFlushLastAdvanceAt = 0;
|
|
85021
85028
|
let boundaryFlushBatches = 0;
|
|
85029
|
+
let endFlushPass = null;
|
|
85030
|
+
const markFlushStage = (stage2) => {
|
|
85031
|
+
endFlushPass?.();
|
|
85032
|
+
endFlushPass = markPass(`flush:${stage2}`);
|
|
85033
|
+
};
|
|
85022
85034
|
const beginFlush = (stage2) => {
|
|
85023
85035
|
boundaryFlushing = true;
|
|
85024
85036
|
boundaryFlushStartedAt = Date.now();
|
|
@@ -85028,9 +85040,11 @@ async function startMultiDaemon(opts = {}) {
|
|
|
85028
85040
|
boundaryFlushItems = 0;
|
|
85029
85041
|
boundaryFlushDetail = "";
|
|
85030
85042
|
boundaryFlushStage = stage2;
|
|
85043
|
+
markFlushStage(stage2);
|
|
85031
85044
|
};
|
|
85032
85045
|
const flushStage = (stage2) => {
|
|
85033
85046
|
boundaryFlushStage = stage2;
|
|
85047
|
+
markFlushStage(stage2);
|
|
85034
85048
|
};
|
|
85035
85049
|
let boundaryFlushItems = 0;
|
|
85036
85050
|
let boundaryFlushDetail = "";
|
|
@@ -85073,6 +85087,8 @@ async function startMultiDaemon(opts = {}) {
|
|
|
85073
85087
|
const endFlush = () => {
|
|
85074
85088
|
boundaryFlushing = false;
|
|
85075
85089
|
boundaryFlushStage = "";
|
|
85090
|
+
endFlushPass?.();
|
|
85091
|
+
endFlushPass = null;
|
|
85076
85092
|
};
|
|
85077
85093
|
const fireBoundary = () => {
|
|
85078
85094
|
for (const l of boundaryListeners) {
|
|
@@ -85557,13 +85573,14 @@ async function startMultiDaemon(opts = {}) {
|
|
|
85557
85573
|
log: (line) => console.log(line)
|
|
85558
85574
|
});
|
|
85559
85575
|
const pullProjectAnchors = async (r, client, salt) => {
|
|
85576
|
+
const donePass = markPass(`anchor-pull:${r.engine.profile.name}`);
|
|
85560
85577
|
const sync = await syncProjectAnchors({
|
|
85561
85578
|
root: r.root,
|
|
85562
85579
|
profile: r.engine.profile,
|
|
85563
85580
|
store: r.engine.store,
|
|
85564
85581
|
cloud: client,
|
|
85565
85582
|
salt
|
|
85566
|
-
});
|
|
85583
|
+
}).finally(donePass);
|
|
85567
85584
|
if (sync.synced) {
|
|
85568
85585
|
if (sync.anchors + sync.updated > 0) {
|
|
85569
85586
|
r.engine.markContextDirty();
|
|
@@ -86356,7 +86373,8 @@ async function startMultiDaemon(opts = {}) {
|
|
|
86356
86373
|
settleRunning = true;
|
|
86357
86374
|
try {
|
|
86358
86375
|
for (const r of records) {
|
|
86359
|
-
|
|
86376
|
+
const donePass = markPass(`settle:${r.engine.profile.name}`);
|
|
86377
|
+
await r.engine.embedSettled().finally(donePass);
|
|
86360
86378
|
}
|
|
86361
86379
|
} finally {
|
|
86362
86380
|
settleRunning = false;
|