@inerrata-corporation/errata 2.0.2-dev.627 → 2.0.2-dev.629
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 +32 -6
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -54800,7 +54800,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
54800
54800
|
}
|
|
54801
54801
|
|
|
54802
54802
|
// src/engine.ts
|
|
54803
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
54803
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.629" : "2.0.0-alpha.0";
|
|
54804
54804
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
54805
54805
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
54806
54806
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -57331,9 +57331,12 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
57331
57331
|
if (outs.length === 0) continue;
|
|
57332
57332
|
const dg = digest(outs.map(({ e, wireTo }) => `${e.type}>${wireTo}`).sort());
|
|
57333
57333
|
const owner = store.getNode(sourceId) ?? opts.sharedStore?.getNode(sourceId);
|
|
57334
|
-
|
|
57335
|
-
semanticEdgeDigests[sourceId] = dg;
|
|
57336
|
-
for (const { e, wireTo } of outs)
|
|
57334
|
+
const digestSkip = owner?.attrs["semanticEdgesContributedDigest"] === dg;
|
|
57335
|
+
if (!digestSkip) semanticEdgeDigests[sourceId] = dg;
|
|
57336
|
+
for (const { e, wireTo } of outs) {
|
|
57337
|
+
if (digestSkip && !shippedById.has(e.to)) continue;
|
|
57338
|
+
edges.push({ ...e, from: wireFrom, to: wireTo, attrs: {} });
|
|
57339
|
+
}
|
|
57337
57340
|
}
|
|
57338
57341
|
if (nodes.length === 0 && anchorEdges.length === 0 && edges.length === 0) return null;
|
|
57339
57342
|
let symbolSummaries;
|
|
@@ -57358,6 +57361,29 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
57358
57361
|
if (count > 0) symbolSummaries = sidecar;
|
|
57359
57362
|
}
|
|
57360
57363
|
edges.push(...anchorEdges);
|
|
57364
|
+
const bindingEndpoints = /* @__PURE__ */ new Set();
|
|
57365
|
+
for (const e of edges) {
|
|
57366
|
+
if (e.type === "CAUSED_BY" || e.type === "SOLVED_BY") {
|
|
57367
|
+
bindingEndpoints.add(e.from);
|
|
57368
|
+
bindingEndpoints.add(e.to);
|
|
57369
|
+
}
|
|
57370
|
+
}
|
|
57371
|
+
const heldOrphans = /* @__PURE__ */ new Set();
|
|
57372
|
+
for (const wn of nodes) {
|
|
57373
|
+
if (wn.label !== "RootCause" && wn.label !== "Solution") continue;
|
|
57374
|
+
const src = store.getNode(wn.id) ?? opts.sharedStore?.getNode(wn.id);
|
|
57375
|
+
if (typeof src?.attrs["contributedAtSeq"] === "number") continue;
|
|
57376
|
+
if (bindingEndpoints.has(wn.id)) continue;
|
|
57377
|
+
heldOrphans.add(wn.id);
|
|
57378
|
+
}
|
|
57379
|
+
const shippableNodes = heldOrphans.size === 0 ? nodes : nodes.filter((n) => !heldOrphans.has(n.id));
|
|
57380
|
+
const shippableEdges = heldOrphans.size === 0 ? edges : edges.filter((e) => !heldOrphans.has(e.from) && !heldOrphans.has(e.to));
|
|
57381
|
+
if (heldOrphans.size > 0) {
|
|
57382
|
+
console.warn(
|
|
57383
|
+
`[errata] held ${heldOrphans.size} causal-orphan node(s) \u2014 no shippable binding edge this drain (VS-orphan-gate)`
|
|
57384
|
+
);
|
|
57385
|
+
}
|
|
57386
|
+
if (shippableNodes.length === 0 && shippableEdges.length === 0) return null;
|
|
57361
57387
|
const base = {
|
|
57362
57388
|
daemonVersion,
|
|
57363
57389
|
// Origin key (= project, the salted `wp_…`) — the door stamps it onto created
|
|
@@ -57369,8 +57395,8 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
|
|
|
57369
57395
|
// Context nodes FIRST: a chunked drain (cloud-client, 25-node chunks) then
|
|
57370
57396
|
// co-locates the few Language/Package stubs with the first instance chunk,
|
|
57371
57397
|
// maximizing in-payload endpoint resolution.
|
|
57372
|
-
nodes: [...contextNodes, ...
|
|
57373
|
-
edges,
|
|
57398
|
+
nodes: [...contextNodes, ...shippableNodes],
|
|
57399
|
+
edges: shippableEdges,
|
|
57374
57400
|
// Spread-if-present: an absent sidecar keeps `base` — and therefore the
|
|
57375
57401
|
// payloadDigest — byte-identical to the pre-sidecar batch (backward compat).
|
|
57376
57402
|
...symbolSummaries ? { symbolSummaries } : {}
|