@inerrata-corporation/errata 2.0.17-dev.3450 → 2.0.17-dev.3459
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 -3
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -82169,7 +82169,7 @@ function createWatchBreaker(deps) {
|
|
|
82169
82169
|
}
|
|
82170
82170
|
|
|
82171
82171
|
// src/engine.ts
|
|
82172
|
-
var DAEMON_VERSION = true ? "2.0.17-dev.
|
|
82172
|
+
var DAEMON_VERSION = true ? "2.0.17-dev.3459" : "2.0.0-alpha.0";
|
|
82173
82173
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
82174
82174
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
82175
82175
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -87654,6 +87654,23 @@ function stageMs(value) {
|
|
|
87654
87654
|
const ms = Number.parseInt(value, 10);
|
|
87655
87655
|
return Number.isFinite(ms) ? ms : -1;
|
|
87656
87656
|
}
|
|
87657
|
+
function unitDecisions(receipt) {
|
|
87658
|
+
const decisions = receipt.decisions ?? [];
|
|
87659
|
+
if (receipt.proposedAtoms === void 0 && decisions.length === 0) return "";
|
|
87660
|
+
const part = (kind, head2) => {
|
|
87661
|
+
const tally = /* @__PURE__ */ new Map();
|
|
87662
|
+
for (const d of decisions) if (d.kind === kind && d.verdict !== "accepted") {
|
|
87663
|
+
const key = `${d.verdict} ${d.reason}`;
|
|
87664
|
+
tally.set(key, (tally.get(key) ?? 0) + 1);
|
|
87665
|
+
}
|
|
87666
|
+
const why = [...tally].sort((a, b) => b[1] - a[1]).map(([key, n]) => {
|
|
87667
|
+
const [verdict, ...reason] = key.split(" ");
|
|
87668
|
+
return `${verdict} ${n} ${reason.join(" ")}`;
|
|
87669
|
+
});
|
|
87670
|
+
return `${head2}${why.length ? ` ${why.join(", ")}` : ""}`;
|
|
87671
|
+
};
|
|
87672
|
+
return ` [${part("atom", `atoms ${receipt.proposedAtoms ?? "?"}\u2192${receipt.acceptedAtoms ?? "?"}`)}; ${part("relation", `relations ${receipt.pairs}\u2192${receipt.keptPairs} pairs`)}]`;
|
|
87673
|
+
}
|
|
87657
87674
|
function unitTiming(postStarted, prepMs, receipt, nowMs = Date.now()) {
|
|
87658
87675
|
const s = (ms) => `${(ms / 1e3).toFixed(1)}s`;
|
|
87659
87676
|
const parts2 = [`local ${s(prepMs)}`];
|
|
@@ -87931,7 +87948,7 @@ async function walk10(root, input, client, opts, readBlob) {
|
|
|
87931
87948
|
}
|
|
87932
87949
|
const packages = new Set(outcome.result.nodes.filter((n) => n.decision !== "rejected" && n.canonicalId.startsWith("pkg:")).map((n) => n.canonicalId)).size;
|
|
87933
87950
|
counts = addCounts(counts, { commitsWalked: 1, changesExtracted: 1, pairs: outcome.receipt.keptPairs, claims: outcome.receipt.claims, anchors: outcome.receipt.anchors, packages });
|
|
87934
|
-
log(`[errata] history ${label}: ${outcome.result.nodes.length} nodes, ${outcome.result.edges.length} edges (${outcome.receipt.keptPairs} pairs, ${outcome.receipt.claims} claims)${unitTiming(started2, prepMs, outcome.receipt)}`);
|
|
87951
|
+
log(`[errata] history ${label}: ${outcome.result.nodes.length} nodes, ${outcome.result.edges.length} edges (${outcome.receipt.keptPairs} pairs, ${outcome.receipt.claims} claims)${unitDecisions(outcome.receipt)}${unitTiming(started2, prepMs, outcome.receipt)}`);
|
|
87935
87952
|
break;
|
|
87936
87953
|
}
|
|
87937
87954
|
case "replayed": {
|
|
@@ -87942,7 +87959,7 @@ async function walk10(root, input, client, opts, readBlob) {
|
|
|
87942
87959
|
case "empty":
|
|
87943
87960
|
case "dry-run":
|
|
87944
87961
|
counts = addCounts(counts, { commitsWalked: 1, changesExtracted: outcome.status === "dry-run" ? 1 : 0, pairs: outcome.receipt.keptPairs, claims: outcome.receipt.claims });
|
|
87945
|
-
log(`[errata] history ${label}: ${outcome.status} (${outcome.receipt.keptPairs} pairs, dropped ${outcome.receipt.droppedByEvidence} by evidence, ${outcome.receipt.droppedByAnchor} by anchor)${unitTiming(started2, prepMs, outcome.receipt)}`);
|
|
87962
|
+
log(`[errata] history ${label}: ${outcome.status} (${outcome.receipt.keptPairs} pairs, dropped ${outcome.receipt.droppedByEvidence} by evidence, ${outcome.receipt.droppedByAnchor} by anchor)${unitDecisions(outcome.receipt)}${unitTiming(started2, prepMs, outcome.receipt)}`);
|
|
87946
87963
|
break;
|
|
87947
87964
|
case "refused":
|
|
87948
87965
|
profile = stage(profile, { state: "refused", lastError: `unit ${label} refused: ${outcome.reason}` }, now);
|