@inerrata-corporation/errata 2.0.17-dev.3450 → 2.0.17-dev.3464

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.
@@ -15212,7 +15212,11 @@ var init_history_evidence = __esm({
15212
15212
  tempId: external_exports.string().regex(/^r[0-9]{1,3}$/),
15213
15213
  fromTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
15214
15214
  toTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
15215
- meaning: external_exports.enum(["resolves", "mitigates", "caused-by"]),
15215
+ // `addresses`: the source ties this change to this failure (a fix message, a
15216
+ // ticket/fuzz reference, a guard on the failing case). Source fidelity only —
15217
+ // whether it worked is later evidence's job. `resolves` additionally needs the
15218
+ // source to show the failure no longer occurs.
15219
+ meaning: external_exports.enum(["addresses", "resolves", "mitigates", "caused-by"]),
15216
15220
  evidence: external_exports.array(HistoryEvidenceSelectionSchema).min(1).max(8)
15217
15221
  });
15218
15222
  HistoryCandidateBatchSchema = external_exports.strictObject({
@@ -15565,6 +15569,9 @@ var init_wire = __esm({
15565
15569
  evidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
15566
15570
  verificationEvidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
15567
15571
  verifierBuild: external_exports.string().max(80).optional(),
15572
+ /** History-mined relation strength: `addresses` = the commit ties the change
15573
+ * to the failure (source fidelity); `resolves` = the source also shows it gone. */
15574
+ historyRelation: external_exports.enum(["addresses", "resolves", "mitigates", "caused-by"]).optional(),
15568
15575
  unitDigest: external_exports.string().regex(/^[a-f0-9]{64}$/).optional(),
15569
15576
  /** Triage route per-context counts (T3 induction). Carried as structured data
15570
15577
  * here; stored JSON-encoded on the Neo4j rel (`perContextJson`). */
package/errata.mjs CHANGED
@@ -15804,7 +15804,11 @@ var init_history_evidence = __esm({
15804
15804
  tempId: external_exports.string().regex(/^r[0-9]{1,3}$/),
15805
15805
  fromTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
15806
15806
  toTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
15807
- meaning: external_exports.enum(["resolves", "mitigates", "caused-by"]),
15807
+ // `addresses`: the source ties this change to this failure (a fix message, a
15808
+ // ticket/fuzz reference, a guard on the failing case). Source fidelity only —
15809
+ // whether it worked is later evidence's job. `resolves` additionally needs the
15810
+ // source to show the failure no longer occurs.
15811
+ meaning: external_exports.enum(["addresses", "resolves", "mitigates", "caused-by"]),
15808
15812
  evidence: external_exports.array(HistoryEvidenceSelectionSchema).min(1).max(8)
15809
15813
  });
15810
15814
  HistoryCandidateBatchSchema = external_exports.strictObject({
@@ -16274,6 +16278,9 @@ var init_wire = __esm({
16274
16278
  evidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
16275
16279
  verificationEvidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
16276
16280
  verifierBuild: external_exports.string().max(80).optional(),
16281
+ /** History-mined relation strength: `addresses` = the commit ties the change
16282
+ * to the failure (source fidelity); `resolves` = the source also shows it gone. */
16283
+ historyRelation: external_exports.enum(["addresses", "resolves", "mitigates", "caused-by"]).optional(),
16277
16284
  unitDigest: external_exports.string().regex(/^[a-f0-9]{64}$/).optional(),
16278
16285
  /** Triage route per-context counts (T3 induction). Carried as structured data
16279
16286
  * here; stored JSON-encoded on the Neo4j rel (`perContextJson`). */
@@ -82169,7 +82176,7 @@ function createWatchBreaker(deps) {
82169
82176
  }
82170
82177
 
82171
82178
  // src/engine.ts
82172
- var DAEMON_VERSION = true ? "2.0.17-dev.3450" : "2.0.0-alpha.0";
82179
+ var DAEMON_VERSION = true ? "2.0.17-dev.3464" : "2.0.0-alpha.0";
82173
82180
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
82174
82181
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
82175
82182
  var GIT_OP_MUTE_MS = 4e3;
@@ -87654,6 +87661,23 @@ function stageMs(value) {
87654
87661
  const ms = Number.parseInt(value, 10);
87655
87662
  return Number.isFinite(ms) ? ms : -1;
87656
87663
  }
87664
+ function unitDecisions(receipt) {
87665
+ const decisions = receipt.decisions ?? [];
87666
+ if (receipt.proposedAtoms === void 0 && decisions.length === 0) return "";
87667
+ const part = (kind, head2) => {
87668
+ const tally = /* @__PURE__ */ new Map();
87669
+ for (const d of decisions) if (d.kind === kind && d.verdict !== "accepted") {
87670
+ const key = `${d.verdict} ${d.reason}`;
87671
+ tally.set(key, (tally.get(key) ?? 0) + 1);
87672
+ }
87673
+ const why = [...tally].sort((a, b) => b[1] - a[1]).map(([key, n]) => {
87674
+ const [verdict, ...reason] = key.split(" ");
87675
+ return `${verdict} ${n} ${reason.join(" ")}`;
87676
+ });
87677
+ return `${head2}${why.length ? ` ${why.join(", ")}` : ""}`;
87678
+ };
87679
+ return ` [${part("atom", `atoms ${receipt.proposedAtoms ?? "?"}\u2192${receipt.acceptedAtoms ?? "?"}`)}; ${part("relation", `relations ${receipt.pairs}\u2192${receipt.keptPairs} pairs`)}]`;
87680
+ }
87657
87681
  function unitTiming(postStarted, prepMs, receipt, nowMs = Date.now()) {
87658
87682
  const s = (ms) => `${(ms / 1e3).toFixed(1)}s`;
87659
87683
  const parts2 = [`local ${s(prepMs)}`];
@@ -87931,7 +87955,7 @@ async function walk10(root, input, client, opts, readBlob) {
87931
87955
  }
87932
87956
  const packages = new Set(outcome.result.nodes.filter((n) => n.decision !== "rejected" && n.canonicalId.startsWith("pkg:")).map((n) => n.canonicalId)).size;
87933
87957
  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)}`);
87958
+ 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
87959
  break;
87936
87960
  }
87937
87961
  case "replayed": {
@@ -87942,7 +87966,7 @@ async function walk10(root, input, client, opts, readBlob) {
87942
87966
  case "empty":
87943
87967
  case "dry-run":
87944
87968
  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)}`);
87969
+ 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
87970
  break;
87947
87971
  case "refused":
87948
87972
  profile = stage(profile, { state: "refused", lastError: `unit ${label} refused: ${outcome.reason}` }, now);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.17-dev.3450",
3
+ "version": "2.0.17-dev.3464",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
package/pass-worker.mjs CHANGED
@@ -15070,7 +15070,11 @@ var init_history_evidence = __esm({
15070
15070
  tempId: external_exports.string().regex(/^r[0-9]{1,3}$/),
15071
15071
  fromTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
15072
15072
  toTempId: external_exports.string().regex(/^a[0-9]{1,3}$/),
15073
- meaning: external_exports.enum(["resolves", "mitigates", "caused-by"]),
15073
+ // `addresses`: the source ties this change to this failure (a fix message, a
15074
+ // ticket/fuzz reference, a guard on the failing case). Source fidelity only —
15075
+ // whether it worked is later evidence's job. `resolves` additionally needs the
15076
+ // source to show the failure no longer occurs.
15077
+ meaning: external_exports.enum(["addresses", "resolves", "mitigates", "caused-by"]),
15074
15078
  evidence: external_exports.array(HistoryEvidenceSelectionSchema).min(1).max(8)
15075
15079
  });
15076
15080
  HistoryCandidateBatchSchema = external_exports.strictObject({
@@ -15347,6 +15351,9 @@ var init_wire = __esm({
15347
15351
  evidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
15348
15352
  verificationEvidence: external_exports.array(HistoryEvidenceRefSchema).max(12).optional(),
15349
15353
  verifierBuild: external_exports.string().max(80).optional(),
15354
+ /** History-mined relation strength: `addresses` = the commit ties the change
15355
+ * to the failure (source fidelity); `resolves` = the source also shows it gone. */
15356
+ historyRelation: external_exports.enum(["addresses", "resolves", "mitigates", "caused-by"]).optional(),
15350
15357
  unitDigest: external_exports.string().regex(/^[a-f0-9]{64}$/).optional(),
15351
15358
  /** Triage route per-context counts (T3 induction). Carried as structured data
15352
15359
  * here; stored JSON-encoded on the Neo4j rel (`perContextJson`). */