@inerrata-corporation/errata 2.0.3-dev.1764 → 2.0.3-dev.1791

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 CHANGED
@@ -32238,7 +32238,8 @@ async function runIndexer(store, opts) {
32238
32238
  parentId = fid2;
32239
32239
  }
32240
32240
  const fid = fileNodeId(opts.workspaceId, f.relPath);
32241
- upsertFile(store, fid, f, opts.workspaceId);
32241
+ const skip = !f.provider ? "no-provider" : f.size > maxBytes ? "oversize" : void 0;
32242
+ upsertFile(store, fid, f, opts.workspaceId, skip);
32242
32243
  report.nodesEmitted++;
32243
32244
  upsertEdge(store, parentId, "CONTAINS", fid, 1);
32244
32245
  report.edgesEmitted++;
@@ -32283,6 +32284,7 @@ async function runIndexer(store, opts) {
32283
32284
  symbols = f.provider.extractSymbols(source, f.absPath);
32284
32285
  } catch {
32285
32286
  report.filesSkipped++;
32287
+ stampIndexOutcome(store, fileNodeId(opts.workspaceId, f.relPath), { indexSkipped: "parse-error" });
32286
32288
  continue;
32287
32289
  }
32288
32290
  reExports = scanReExports(source);
@@ -32293,6 +32295,9 @@ async function runIndexer(store, opts) {
32293
32295
  }
32294
32296
  symbolsByFile.set(f.relPath, symbols);
32295
32297
  if (reExports.length > 0) reExportsByFile.set(f.relPath, reExports);
32298
+ if (symbols.length === 0) {
32299
+ stampIndexOutcome(store, fileNodeId(opts.workspaceId, f.relPath), { symbolCount: 0 });
32300
+ }
32296
32301
  report.filesParsed++;
32297
32302
  report.byLanguage[f.provider.id] = (report.byLanguage[f.provider.id] ?? 0) + 1;
32298
32303
  if (report.filesParsed % 250 === 0) perf(`parse @ ${report.filesParsed}/${files.length}`);
@@ -32792,7 +32797,7 @@ function gitListFiles(root, ignores, providers) {
32792
32797
  }
32793
32798
  return out2;
32794
32799
  }
32795
- function upsertFile(store, id, f, workspaceId2) {
32800
+ function upsertFile(store, id, f, workspaceId2, skip) {
32796
32801
  const now = nowTs();
32797
32802
  let contentHash;
32798
32803
  try {
@@ -32822,11 +32827,17 @@ function upsertFile(store, id, f, workspaceId2) {
32822
32827
  size: f.size,
32823
32828
  language: f.language ?? null,
32824
32829
  workspaceId: workspaceId2,
32825
- ...contentHash ? { contentHash } : {}
32830
+ ...contentHash ? { contentHash } : {},
32831
+ ...skip ? { indexSkipped: skip } : {}
32826
32832
  }
32827
32833
  };
32828
32834
  store.mergeNode(node2);
32829
32835
  }
32836
+ function stampIndexOutcome(store, fileId, outcome) {
32837
+ const fnode = store.getNode(fileId);
32838
+ if (!fnode) return;
32839
+ store.updateNode(fileId, { attrs: { ...fnode.attrs, ...outcome } });
32840
+ }
32830
32841
  function upsertFolder(store, id, name2, workspaceId2, relPath) {
32831
32842
  const now = nowTs();
32832
32843
  const node2 = {
@@ -40250,7 +40261,8 @@ async function findStaleFiles(store, rootPath, workspaceId2) {
40250
40261
  } else {
40251
40262
  const edges = store.outEdges(fnode.id, ["DEFINES", "CONTAINS"]);
40252
40263
  if (edges.length === 0) {
40253
- stale.push(abs);
40264
+ const converged = fnode.attrs["symbolCount"] === 0 || typeof fnode.attrs["indexSkipped"] === "string";
40265
+ if (!converged) stale.push(abs);
40254
40266
  } else {
40255
40267
  const targets = edges.map((e) => e.to);
40256
40268
  pending.push({ abs, targets });
@@ -57750,7 +57762,7 @@ function createWatchBreaker(deps) {
57750
57762
  }
57751
57763
 
57752
57764
  // src/engine.ts
57753
- var DAEMON_VERSION = true ? "2.0.3-dev.1764" : "2.0.0-alpha.0";
57765
+ var DAEMON_VERSION = true ? "2.0.3-dev.1791" : "2.0.0-alpha.0";
57754
57766
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
57755
57767
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
57756
57768
  var GIT_OP_MUTE_MS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.3-dev.1764",
3
+ "version": "2.0.3-dev.1791",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
package/pass-worker.mjs CHANGED
@@ -16333,7 +16333,8 @@ async function runIndexer(store2, opts) {
16333
16333
  parentId = fid2;
16334
16334
  }
16335
16335
  const fid = fileNodeId(opts.workspaceId, f.relPath);
16336
- upsertFile(store2, fid, f, opts.workspaceId);
16336
+ const skip = !f.provider ? "no-provider" : f.size > maxBytes ? "oversize" : void 0;
16337
+ upsertFile(store2, fid, f, opts.workspaceId, skip);
16337
16338
  report.nodesEmitted++;
16338
16339
  upsertEdge(store2, parentId, "CONTAINS", fid, 1);
16339
16340
  report.edgesEmitted++;
@@ -16378,6 +16379,7 @@ async function runIndexer(store2, opts) {
16378
16379
  symbols = f.provider.extractSymbols(source, f.absPath);
16379
16380
  } catch {
16380
16381
  report.filesSkipped++;
16382
+ stampIndexOutcome(store2, fileNodeId(opts.workspaceId, f.relPath), { indexSkipped: "parse-error" });
16381
16383
  continue;
16382
16384
  }
16383
16385
  reExports = scanReExports(source);
@@ -16388,6 +16390,9 @@ async function runIndexer(store2, opts) {
16388
16390
  }
16389
16391
  symbolsByFile.set(f.relPath, symbols);
16390
16392
  if (reExports.length > 0) reExportsByFile.set(f.relPath, reExports);
16393
+ if (symbols.length === 0) {
16394
+ stampIndexOutcome(store2, fileNodeId(opts.workspaceId, f.relPath), { symbolCount: 0 });
16395
+ }
16391
16396
  report.filesParsed++;
16392
16397
  report.byLanguage[f.provider.id] = (report.byLanguage[f.provider.id] ?? 0) + 1;
16393
16398
  if (report.filesParsed % 250 === 0) perf(`parse @ ${report.filesParsed}/${files.length}`);
@@ -16887,7 +16892,7 @@ function gitListFiles(root, ignores, providers) {
16887
16892
  }
16888
16893
  return out2;
16889
16894
  }
16890
- function upsertFile(store2, id, f, workspaceId) {
16895
+ function upsertFile(store2, id, f, workspaceId, skip) {
16891
16896
  const now = nowTs();
16892
16897
  let contentHash;
16893
16898
  try {
@@ -16917,11 +16922,17 @@ function upsertFile(store2, id, f, workspaceId) {
16917
16922
  size: f.size,
16918
16923
  language: f.language ?? null,
16919
16924
  workspaceId,
16920
- ...contentHash ? { contentHash } : {}
16925
+ ...contentHash ? { contentHash } : {},
16926
+ ...skip ? { indexSkipped: skip } : {}
16921
16927
  }
16922
16928
  };
16923
16929
  store2.mergeNode(node);
16924
16930
  }
16931
+ function stampIndexOutcome(store2, fileId, outcome) {
16932
+ const fnode = store2.getNode(fileId);
16933
+ if (!fnode) return;
16934
+ store2.updateNode(fileId, { attrs: { ...fnode.attrs, ...outcome } });
16935
+ }
16925
16936
  function upsertFolder(store2, id, name2, workspaceId, relPath) {
16926
16937
  const now = nowTs();
16927
16938
  const node = {
@@ -27345,7 +27356,8 @@ async function findStaleFiles(store2, rootPath, workspaceId) {
27345
27356
  } else {
27346
27357
  const edges = store2.outEdges(fnode.id, ["DEFINES", "CONTAINS"]);
27347
27358
  if (edges.length === 0) {
27348
- stale.push(abs);
27359
+ const converged = fnode.attrs["symbolCount"] === 0 || typeof fnode.attrs["indexSkipped"] === "string";
27360
+ if (!converged) stale.push(abs);
27349
27361
  } else {
27350
27362
  const targets = edges.map((e) => e.to);
27351
27363
  pending.push({ abs, targets });