@inerrata-corporation/errata 2.0.2-dev.710 → 2.0.2-dev.714

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.
Files changed (2) hide show
  1. package/errata.mjs +38 -6
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -15447,6 +15447,15 @@ function extractIdentifierTokens(text) {
15447
15447
  }
15448
15448
  return out2;
15449
15449
  }
15450
+ function sidecarDropBucket(reason) {
15451
+ if (reason === null) return null;
15452
+ if (reason === "empty summary") return "empty";
15453
+ if (reason === "summary too long") return "too_long";
15454
+ if (reason === "contains a path shape") return "path_shape";
15455
+ if (reason === "contains a quoted literal") return "quoted_literal";
15456
+ if (reason.startsWith("contains verbatim identifier")) return "verbatim_identifier";
15457
+ return "other";
15458
+ }
15450
15459
  function summaryRejectionReason(summary, isKnownToken) {
15451
15460
  if (!summary.trim()) return "empty summary";
15452
15461
  if (summary.length > MAX_SYMBOL_SUMMARY_CHARS) return "summary too long";
@@ -16062,6 +16071,7 @@ __export(src_exports, {
16062
16071
  retrievalTokens: () => retrievalTokens,
16063
16072
  sha256: () => sha256,
16064
16073
  sha256Short: () => sha256Short,
16074
+ sidecarDropBucket: () => sidecarDropBucket,
16065
16075
  splitPnpmKey: () => splitPnpmKey,
16066
16076
  substituteSymbolSummaries: () => substituteSymbolSummaries,
16067
16077
  summarizeIngestResult: () => summarizeIngestResult,
@@ -55551,7 +55561,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
55551
55561
  }
55552
55562
 
55553
55563
  // src/engine.ts
55554
- var DAEMON_VERSION = true ? "2.0.2-dev.710" : "2.0.0-alpha.0";
55564
+ var DAEMON_VERSION = true ? "2.0.2-dev.714" : "2.0.0-alpha.0";
55555
55565
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
55556
55566
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
55557
55567
  var GIT_OP_MUTE_MS = 4e3;
@@ -57934,6 +57944,21 @@ function stripCodebaseScope(scope) {
57934
57944
  delete s["codebase"];
57935
57945
  return s;
57936
57946
  }
57947
+ function compositionCounters(c) {
57948
+ const { sidecarDropReasons, ...scalars } = c;
57949
+ const buckets = [
57950
+ "empty",
57951
+ "too_long",
57952
+ "path_shape",
57953
+ "quoted_literal",
57954
+ "verbatim_identifier",
57955
+ "other"
57956
+ ];
57957
+ return {
57958
+ ...scalars,
57959
+ ...Object.fromEntries(buckets.map((b) => [`sidecarDrop_${b}`, sidecarDropReasons[b] ?? 0]))
57960
+ };
57961
+ }
57937
57962
  function contributedWireId(n) {
57938
57963
  const cloudId = n.attrs["cloudNodeId"];
57939
57964
  return isMembraneSaltedId(cloudId) ? cloudId : n.id;
@@ -58046,7 +58071,9 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
58046
58071
  unshippable: 0,
58047
58072
  heldOrphans: 0,
58048
58073
  privacyRewritten: 0,
58049
- sidecarDropped: 0
58074
+ sidecarDropped: 0,
58075
+ sidecarDropReasons: {},
58076
+ sidecarTruncatedAtCap: 0
58050
58077
  };
58051
58078
  for (const label of INSTANCE_LABELS) {
58052
58079
  const ref = [];
@@ -58239,11 +58266,16 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
58239
58266
  const entry = lexicon.get(tok);
58240
58267
  if (!entry?.summary) continue;
58241
58268
  const scrubbed = generalize(entry.summary, { level, project: projectIdentity }).text.trim();
58242
- if (!scrubbed || summaryRejectionReason(scrubbed, isKnown) !== null) {
58269
+ const dropBucket = !scrubbed ? "empty" : sidecarDropBucket(summaryRejectionReason(scrubbed, isKnown));
58270
+ if (dropBucket !== null) {
58243
58271
  composition.sidecarDropped++;
58272
+ composition.sidecarDropReasons[dropBucket] = (composition.sidecarDropReasons[dropBucket] ?? 0) + 1;
58244
58273
  continue;
58245
58274
  }
58246
- if (count >= MAX_SIDECAR_SYMBOLS) break outer;
58275
+ if (count >= MAX_SIDECAR_SYMBOLS) {
58276
+ composition.sidecarTruncatedAtCap = 1;
58277
+ break outer;
58278
+ }
58247
58279
  sidecar[tok] = { kind: entry.kind, summary: scrubbed };
58248
58280
  count++;
58249
58281
  }
@@ -59659,7 +59691,7 @@ async function startMultiDaemon(opts = {}) {
59659
59691
  });
59660
59692
  if (!instances && composition) {
59661
59693
  appendPassLedger(r.engine.paths.configDir, "ship", 0, {
59662
- ...composition,
59694
+ ...compositionCounters(composition),
59663
59695
  accepted: 0,
59664
59696
  rejected: 0,
59665
59697
  blocked: 0
@@ -59734,7 +59766,7 @@ async function startMultiDaemon(opts = {}) {
59734
59766
  });
59735
59767
  }
59736
59768
  appendPassLedger(r.engine.paths.configDir, "ship", Date.now() - shipStartedAt, {
59737
- ...instances.composition,
59769
+ ...compositionCounters(instances.composition),
59738
59770
  accepted: res.accepted,
59739
59771
  rejected: rejected.size,
59740
59772
  blocked: blocked.size
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.710",
3
+ "version": "2.0.2-dev.714",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {