@inerrata-corporation/errata 2.0.2-dev.631 → 2.0.2-dev.635

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 +157 -42
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -18178,10 +18178,10 @@ function matchPackagesInText(text, index) {
18178
18178
  for (const [key, node2] of index) {
18179
18179
  if (key.length < MIN_NAME_LEN) continue;
18180
18180
  if (!hay.includes(key)) continue;
18181
- const esc3 = escapeRe3(key);
18182
- const bounded = new RegExp(`(?<![\\w@/.\\-])${esc3}(?![\\w])`);
18181
+ const esc4 = escapeRe3(key);
18182
+ const bounded = new RegExp(`(?<![\\w@/.\\-])${esc4}(?![\\w])`);
18183
18183
  if (!bounded.test(hay)) continue;
18184
- const verMatch = new RegExp(`${esc3}\\s*@?\\s*v?(\\d+(?:\\.\\d+){0,2})\\b`).exec(hay);
18184
+ const verMatch = new RegExp(`${esc4}\\s*@?\\s*v?(\\d+(?:\\.\\d+){0,2})\\b`).exec(hay);
18185
18185
  const hasSep = NAME_SEPARATOR.test(key);
18186
18186
  if (!hasSep && !verMatch) continue;
18187
18187
  if (seen.has(node2.id)) continue;
@@ -27403,6 +27403,54 @@ var init_src8 = __esm({
27403
27403
  }
27404
27404
  });
27405
27405
 
27406
+ // ../../packages/privacy-edge/src/self-reference.ts
27407
+ function locatorTerms(loc, full, part) {
27408
+ if (!loc) return;
27409
+ full.add(loc);
27410
+ const segs = loc.split("/").filter(Boolean);
27411
+ if (segs.length >= 2) {
27412
+ part.add(segs[segs.length - 1]);
27413
+ part.add(segs[segs.length - 2]);
27414
+ }
27415
+ }
27416
+ function scrubSelfReferences(text, project) {
27417
+ let out2 = text;
27418
+ out2 = out2.replace(
27419
+ /\b(MRs?|PRs?|merge requests?|pull requests?|issues?|tickets?)\s+#?[0-9]+\b/gi,
27420
+ (_m, kind) => {
27421
+ const k = kind.toLowerCase();
27422
+ if (k.startsWith("p")) return "a pull request";
27423
+ if (k.startsWith("i")) return "an issue";
27424
+ if (k.startsWith("t")) return "a ticket";
27425
+ return "a merge request";
27426
+ }
27427
+ ).replace(new RegExp(`${L}![0-9]{1,6}(?![0-9])`, "g"), "a merge request").replace(new RegExp(`(?<![A-Za-z0-9#])#[0-9]{2,6}(?![0-9])`, "g"), "an issue");
27428
+ const full = /* @__PURE__ */ new Set();
27429
+ const part = /* @__PURE__ */ new Set();
27430
+ locatorTerms(project.repoLocator, full, part);
27431
+ for (const a of project.aliases ?? []) locatorTerms(a, full, part);
27432
+ if (project.name) part.add(project.name);
27433
+ for (const a of project.aka ?? []) part.add(a);
27434
+ const ordered = [
27435
+ ...[...full].map((t) => ({ t, repl: "the repository" })),
27436
+ ...[...part].map((t) => ({ t, repl: "the project" }))
27437
+ ].filter((x) => x.t && x.t.length >= 2).sort((a, b) => b.t.length - a.t.length);
27438
+ for (const { t, repl } of ordered) {
27439
+ out2 = out2.replace(new RegExp(`${L}${esc2(t)}${R}`, "gi"), repl);
27440
+ }
27441
+ out2 = out2.replace(/\b(the|a|an|its|our|this)\s+the\s+(project|repository)\b/gi, "the $2");
27442
+ return out2;
27443
+ }
27444
+ var L, R, esc2;
27445
+ var init_self_reference = __esm({
27446
+ "../../packages/privacy-edge/src/self-reference.ts"() {
27447
+ "use strict";
27448
+ L = "(?<![A-Za-z0-9])";
27449
+ R = "(?![A-Za-z0-9])";
27450
+ esc2 = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
27451
+ }
27452
+ });
27453
+
27406
27454
  // ../../packages/privacy-edge/src/generalize.ts
27407
27455
  function generalize(text, opts = {}) {
27408
27456
  const level = opts.level ?? 1;
@@ -27415,6 +27463,7 @@ function generalize(text, opts = {}) {
27415
27463
  return generalizePhrase(cls, level);
27416
27464
  });
27417
27465
  }
27466
+ if (opts.project) out2 = scrubSelfReferences(out2, opts.project);
27418
27467
  return { text: out2, report: { level, classes: [...seen] } };
27419
27468
  }
27420
27469
  var TOKEN_RULES;
@@ -27424,6 +27473,7 @@ var init_generalize = __esm({
27424
27473
  init_src8();
27425
27474
  init_date_shapes();
27426
27475
  init_ontology();
27476
+ init_self_reference();
27427
27477
  TOKEN_RULES = [
27428
27478
  { re: /<api-key:[0-9a-f]+>/gi, cls: "credential" },
27429
27479
  { re: /<email:[0-9a-f]+>/gi, cls: "email" },
@@ -27445,6 +27495,7 @@ var init_src9 = __esm({
27445
27495
  init_ontology();
27446
27496
  init_date_shapes();
27447
27497
  init_generalize();
27498
+ init_self_reference();
27448
27499
  }
27449
27500
  });
27450
27501
 
@@ -27478,10 +27529,15 @@ function buildSymbolLexicon(store, summariesByBodyHash2) {
27478
27529
  }
27479
27530
  return lex;
27480
27531
  }
27532
+ function isBareMatchableStem(stem) {
27533
+ return stem.length >= 5 && /^[A-Za-z0-9]+(?:[-_][A-Za-z0-9]+)+$/.test(stem);
27534
+ }
27481
27535
  function buildFileLexicon(store) {
27482
27536
  const byKey = /* @__PURE__ */ new Map();
27483
27537
  const byBasename = /* @__PURE__ */ new Map();
27538
+ const byStem = /* @__PURE__ */ new Map();
27484
27539
  const basenameCount = /* @__PURE__ */ new Map();
27540
+ const stemRelPaths = /* @__PURE__ */ new Map();
27485
27541
  const entries = [];
27486
27542
  for (const n of store.findNodesByLabel("File")) {
27487
27543
  const relPath = typeof n.attrs["relPath"] === "string" && n.attrs["relPath"].length > 0 ? n.attrs["relPath"] : n.description;
@@ -27490,6 +27546,12 @@ function buildFileLexicon(store) {
27490
27546
  if (!basename5.includes(".")) continue;
27491
27547
  entries.push({ relPath, basename: basename5 });
27492
27548
  basenameCount.set(basename5, (basenameCount.get(basename5) ?? 0) + 1);
27549
+ const stem = basename5.slice(0, basename5.indexOf("."));
27550
+ if (isBareMatchableStem(stem)) {
27551
+ let s = stemRelPaths.get(stem);
27552
+ if (!s) stemRelPaths.set(stem, s = /* @__PURE__ */ new Set());
27553
+ s.add(relPath);
27554
+ }
27493
27555
  }
27494
27556
  for (const { relPath, basename: basename5 } of entries) {
27495
27557
  const entry = { relPath };
@@ -27499,8 +27561,18 @@ function buildFileLexicon(store) {
27499
27561
  const list = byBasename.get(basename5);
27500
27562
  if (list) list.push(entry);
27501
27563
  else byBasename.set(basename5, [entry]);
27564
+ const stem = basename5.slice(0, basename5.indexOf("."));
27565
+ if (isBareMatchableStem(stem) && !CONVENTION_STEMS.has(stem) && !byStem.has(stem)) {
27566
+ const dirStems = new Set(
27567
+ [...stemRelPaths.get(stem) ?? []].map((p) => {
27568
+ const bn = p.split("/").pop();
27569
+ return p.slice(0, p.length - bn.length) + bn.slice(0, bn.indexOf("."));
27570
+ })
27571
+ );
27572
+ if (dirStems.size === 1) byStem.set(stem, entry);
27573
+ }
27502
27574
  }
27503
- return { byKey, byBasename };
27575
+ return { byKey, byBasename, byStem };
27504
27576
  }
27505
27577
  function resolveFileToken(token, lexicon) {
27506
27578
  const exact = lexicon.byKey.get(token);
@@ -27531,24 +27603,40 @@ function fileRolePhrase(relPath, level = 1) {
27531
27603
  if (/\.(json|ya?ml|toml|env)$/i.test(relPath)) return "a config file";
27532
27604
  return "a source file";
27533
27605
  }
27534
- function generalizeSymbols(text, lexicon, level = 1, fileLexicon) {
27606
+ function generalizeFileRefs(text, fileLexicon, level = 1) {
27535
27607
  let out2 = text;
27536
- if (fileLexicon) {
27537
- const files = [];
27538
- const seenFiles = /* @__PURE__ */ new Set();
27539
- for (const m of out2.matchAll(FILE_TOKEN_RE)) {
27540
- const tok = m[0];
27541
- if (seenFiles.has(tok)) continue;
27542
- seenFiles.add(tok);
27543
- const entry = resolveFileToken(tok, fileLexicon);
27544
- if (entry) files.push([tok, entry]);
27545
- }
27546
- files.sort((a, b) => b[0].length - a[0].length);
27547
- for (const [tok, entry] of files) {
27548
- const re = new RegExp(`(?<![\\w$/\\\\.-])${escapeRe4(tok)}(?![\\w$-])`, "g");
27549
- out2 = out2.replace(re, fileRolePhrase(entry.relPath, level));
27550
- }
27608
+ const files = [];
27609
+ const seenFiles = /* @__PURE__ */ new Set();
27610
+ for (const m of out2.matchAll(FILE_TOKEN_RE)) {
27611
+ const tok = m[0];
27612
+ if (seenFiles.has(tok)) continue;
27613
+ seenFiles.add(tok);
27614
+ const entry = resolveFileToken(tok, fileLexicon);
27615
+ if (entry) files.push([tok, entry]);
27616
+ }
27617
+ files.sort((a, b) => b[0].length - a[0].length);
27618
+ for (const [tok, entry] of files) {
27619
+ const re = new RegExp(`(?<![\\w$/\\\\.-])${escapeRe4(tok)}(?![\\w$-])`, "g");
27620
+ out2 = out2.replace(re, fileRolePhrase(entry.relPath, level));
27621
+ }
27622
+ const stems = [];
27623
+ const seenStems = /* @__PURE__ */ new Set();
27624
+ for (const m of out2.matchAll(STEM_TOKEN_RE)) {
27625
+ const tok = m[0];
27626
+ if (seenStems.has(tok)) continue;
27627
+ seenStems.add(tok);
27628
+ const entry = fileLexicon.byStem.get(tok);
27629
+ if (entry) stems.push([tok, entry]);
27551
27630
  }
27631
+ stems.sort((a, b) => b[0].length - a[0].length);
27632
+ for (const [tok, entry] of stems) {
27633
+ const re = new RegExp(`(?<![\\w$/\\\\.-])${escapeRe4(tok)}(?![\\w$/\\\\.-])`, "g");
27634
+ out2 = out2.replace(re, fileRolePhrase(entry.relPath, level));
27635
+ }
27636
+ return out2;
27637
+ }
27638
+ function generalizeSymbols(text, lexicon, level = 1, fileLexicon) {
27639
+ let out2 = fileLexicon ? generalizeFileRefs(text, fileLexicon, level) : text;
27552
27640
  const present = [];
27553
27641
  const seen = /* @__PURE__ */ new Set();
27554
27642
  for (const m of out2.matchAll(TOKEN_RE3)) {
@@ -27567,7 +27655,7 @@ function generalizeSymbols(text, lexicon, level = 1, fileLexicon) {
27567
27655
  }
27568
27656
  return generalize(out2, { level }).text;
27569
27657
  }
27570
- var SYMBOL_LABELS2, KIND_PHRASE, RE_RESERVED2, escapeRe4, CONVENTION_FILENAMES, CONVENTION_BASENAME_MIN_FILES, FILE_TOKEN_RE, TOKEN_RE3;
27658
+ var SYMBOL_LABELS2, KIND_PHRASE, RE_RESERVED2, escapeRe4, CONVENTION_FILENAMES, CONVENTION_BASENAME_MIN_FILES, CONVENTION_STEMS, FILE_TOKEN_RE, STEM_TOKEN_RE, TOKEN_RE3;
27571
27659
  var init_generalize_graph = __esm({
27572
27660
  "src/generalize-graph.ts"() {
27573
27661
  "use strict";
@@ -27616,7 +27704,27 @@ var init_generalize_graph = __esm({
27616
27704
  "index.mjs"
27617
27705
  ]);
27618
27706
  CONVENTION_BASENAME_MIN_FILES = 3;
27707
+ CONVENTION_STEMS = /* @__PURE__ */ new Set([
27708
+ "well-known",
27709
+ "read-only",
27710
+ "type-safe",
27711
+ "end-to-end",
27712
+ "fail-open",
27713
+ "fail-closed",
27714
+ "up-to-date",
27715
+ "server-side",
27716
+ "client-side",
27717
+ "cross-origin",
27718
+ "same-origin",
27719
+ "well-formed",
27720
+ "first-class",
27721
+ "in-memory",
27722
+ "single-page",
27723
+ "use-case",
27724
+ "out-of-band"
27725
+ ]);
27619
27726
  FILE_TOKEN_RE = /(?:[A-Za-z0-9_.-]+\/)*[A-Za-z0-9_-][A-Za-z0-9_.-]*\.[A-Za-z0-9]+/g;
27727
+ STEM_TOKEN_RE = /[A-Za-z0-9]+(?:[-_][A-Za-z0-9]+)+/g;
27620
27728
  TOKEN_RE3 = /[A-Za-z_$][A-Za-z0-9_$]*(?:\.[A-Za-z_$][A-Za-z0-9_$]*)*/g;
27621
27729
  }
27622
27730
  });
@@ -48889,13 +48997,13 @@ var init_witness_ledger = __esm({
48889
48997
  var report_render_exports = {};
48890
48998
  __export(report_render_exports, {
48891
48999
  LIVE_VERBS: () => LIVE_VERBS,
48892
- esc: () => esc2,
49000
+ esc: () => esc3,
48893
49001
  renderRepoPage: () => renderRepoPage,
48894
49002
  renderReport: () => renderReport,
48895
49003
  renderRollupIndex: () => renderRollupIndex,
48896
49004
  slug: () => slug
48897
49005
  });
48898
- function esc2(s) {
49006
+ function esc3(s) {
48899
49007
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
48900
49008
  }
48901
49009
  function slug(name2) {
@@ -48909,9 +49017,9 @@ function nextHtml(n, opts) {
48909
49017
  const cmd2 = `errata ${n.verb}${n.arg ? " " + n.arg : ""}`;
48910
49018
  const live = isLive2(n.verb);
48911
49019
  if (!live && !opts.includeFutureVerbs) return "";
48912
- const hint = n.hint ? ` \u2014 ${esc2(n.hint)}` : "";
49020
+ const hint = n.hint ? ` \u2014 ${esc3(n.hint)}` : "";
48913
49021
  const cls = live ? "next" : "next soon";
48914
- const tag = live ? `<code>${esc2(cmd2)}</code>` : `<span class="vsoon">${esc2(cmd2)} \xB7 soon</span>`;
49022
+ const tag = live ? `<code>${esc3(cmd2)}</code>` : `<span class="vsoon">${esc3(cmd2)} \xB7 soon</span>`;
48915
49023
  return `<div class="${cls}">next: ${tag}${hint}</div>`;
48916
49024
  }
48917
49025
  function shell(title, body2) {
@@ -48921,7 +49029,7 @@ function shell(title, body2) {
48921
49029
  <meta charset="utf-8">
48922
49030
  <meta name="viewport" content="width=device-width, initial-scale=1">
48923
49031
  <meta name="robots" content="noindex">
48924
- <title>${esc2(title)}</title>
49032
+ <title>${esc3(title)}</title>
48925
49033
  <style>
48926
49034
  :root{
48927
49035
  --bg:#0c0809; --panel:#160f10; --panel2:#1d1416; --line:#2c1f22; --ink:#efe7e9; --mut:#a6939a; --faint:#7c6a70;
@@ -49032,17 +49140,17 @@ function trustHtml(t, note) {
49032
49140
  function learnedCard(c, opts) {
49033
49141
  const segs = [];
49034
49142
  if (c.chain.causedBy)
49035
- segs.push(`<span class="e">CAUSED_BY</span> <span class="rc">${esc2(c.chain.causedBy)}</span>`);
49143
+ segs.push(`<span class="e">CAUSED_BY</span> <span class="rc">${esc3(c.chain.causedBy)}</span>`);
49036
49144
  if (c.chain.fixedBy) {
49037
49145
  const verified = c.chain.verified ? " \xB7 verified" : "";
49038
- segs.push(`<span class="e">FIXED_BY</span> <span class="fix">${esc2(c.chain.fixedBy)}${verified}</span>`);
49146
+ segs.push(`<span class="e">FIXED_BY</span> <span class="fix">${esc3(c.chain.fixedBy)}${verified}</span>`);
49039
49147
  }
49040
49148
  if (c.chain.instanceOf)
49041
- segs.push(`<span class="e">INSTANCE_OF</span> <span class="rc">${esc2(c.chain.instanceOf)}</span>`);
49149
+ segs.push(`<span class="e">INSTANCE_OF</span> <span class="rc">${esc3(c.chain.instanceOf)}</span>`);
49042
49150
  const chain = segs.length > 0 ? `\u2514\u2500 ${segs.join(" \u2500 ")}` : '\u2514\u2500 <span class="rc">(no causal chain yet)</span>';
49043
49151
  return `<div class="lcard">
49044
49152
  <div class="row1">
49045
- <span class="prob">${esc2(c.problem)}</span>
49153
+ <span class="prob">${esc3(c.problem)}</span>
49046
49154
  <span class="badge ${PROV_CLASS[c.provenance]}">${BADGE2[c.provenance]} ${PROV_LABEL[c.provenance]}</span>
49047
49155
  </div>
49048
49156
  <div class="chain">${chain}</div>
@@ -49051,9 +49159,9 @@ function learnedCard(c, opts) {
49051
49159
  }
49052
49160
  function hotspotsPanel(hs) {
49053
49161
  const rows = hs.map(
49054
- (h) => `<div class="hs"><span class="f">${esc2(h.file)}</span><div class="bar"><i style="width:${Math.round(
49162
+ (h) => `<div class="hs"><span class="f">${esc3(h.file)}</span><div class="bar"><i style="width:${Math.round(
49055
49163
  Math.max(0, Math.min(1, h.weight)) * 100
49056
- )}%"></i></div><span class="n">${h.problemCount} ${esc2(h.unit ?? "probs")}</span></div>`
49164
+ )}%"></i></div><span class="n">${h.problemCount} ${esc3(h.unit ?? "probs")}</span></div>`
49057
49165
  ).join("\n ");
49058
49166
  return `<div class="panel">
49059
49167
  <h3>hotspots \xB7 risk concentration</h3>
@@ -49062,7 +49170,7 @@ function hotspotsPanel(hs) {
49062
49170
  }
49063
49171
  function revisitPanel(items) {
49064
49172
  const rows = items.map(
49065
- (r) => `<div class="rev"><span class="id">${esc2(r.id)}</span><p><b>${esc2(r.claim)}</b> \u2014 ${esc2(
49173
+ (r) => `<div class="rev"><span class="id">${esc3(r.id)}</span><p><b>${esc3(r.claim)}</b> \u2014 ${esc3(
49066
49174
  r.reason
49067
49175
  )}</p></div>`
49068
49176
  ).join("\n ");
@@ -49155,7 +49263,7 @@ function spineViz(spine, idSuffix) {
49155
49263
  </script>`;
49156
49264
  }
49157
49265
  function renderRepoPage(repo, data, opts = {}) {
49158
- const consent = `consent in/out: <span style="color:var(--grn)">${esc2(data.consent.inbound)}</span> / <span style="color:var(--grn)">${esc2(
49266
+ const consent = `consent in/out: <span style="color:var(--grn)">${esc3(data.consent.inbound)}</span> / <span style="color:var(--grn)">${esc3(
49159
49267
  data.consent.outbound
49160
49268
  )}</span>`;
49161
49269
  const learned = repo.learned.length > 0 ? `<div class="learn">
@@ -49164,8 +49272,8 @@ ${repo.learned.map((c) => learnedCard(c, opts)).join("\n")}
49164
49272
  const body2 = `<p class="next"><a href="report.html">\u2190 all repos</a></p>
49165
49273
  <div class="rhead">
49166
49274
  <div class="rh-top">
49167
- <div class="rh-title">errata report \xB7 <span class="repo">${esc2(repo.name)}</span></div>
49168
- <div class="rh-stamp">snapshot ${esc2(data.generatedAt)}<br>static html \xB7 generated by the daemon \xB7 ${consent}</div>
49275
+ <div class="rh-title">errata report \xB7 <span class="repo">${esc3(repo.name)}</span></div>
49276
+ <div class="rh-stamp">snapshot ${esc3(data.generatedAt)}<br>static html \xB7 generated by the daemon \xB7 ${consent}</div>
49169
49277
  </div>
49170
49278
  ${statRow(repo.stats)}
49171
49279
  </div>
@@ -49193,21 +49301,21 @@ ${healthStrip(repo.health)}
49193
49301
  }
49194
49302
  function renderRollupIndex(data, opts = {}) {
49195
49303
  const r = data.rollup;
49196
- const consent = `consent in/out: <span style="color:var(--grn)">${esc2(data.consent.inbound)}</span> / <span style="color:var(--grn)">${esc2(
49304
+ const consent = `consent in/out: <span style="color:var(--grn)">${esc3(data.consent.inbound)}</span> / <span style="color:var(--grn)">${esc3(
49197
49305
  data.consent.outbound
49198
49306
  )}</span>`;
49199
49307
  const rows = data.repos.map((repo) => {
49200
49308
  const href = `report-${slug(repo.name)}.html`;
49201
49309
  return `<a class="rrow" href="${href}">
49202
49310
  <span class="live ${repo.live ? "on" : "off"}">${repo.live ? "\u25CF live" : "\u25CB idle"}</span>
49203
- <span><span class="nm">${esc2(repo.name)}</span><br><span class="pth">${esc2(repo.path)}</span></span>
49311
+ <span><span class="nm">${esc3(repo.name)}</span><br><span class="pth">${esc3(repo.path)}</span></span>
49204
49312
  <span class="mini">${repo.stats.nodes.toLocaleString("en-US")} nodes \xB7 ${repo.health.openProblems} open \xB7 ${repo.health.humanValidated}<span style="color:var(--gold)">\u25B2h</span></span>
49205
49313
  </a>`;
49206
49314
  }).join("\n ");
49207
49315
  const body2 = `<div class="rhead">
49208
49316
  <div class="rh-top">
49209
49317
  <div class="rh-title">errata report \xB7 <span class="repo">${data.repos.length} repo${data.repos.length === 1 ? "" : "s"}</span></div>
49210
- <div class="rh-stamp">snapshot ${esc2(data.generatedAt)}<br>static html \xB7 generated by the daemon \xB7 ${consent}</div>
49318
+ <div class="rh-stamp">snapshot ${esc3(data.generatedAt)}<br>static html \xB7 generated by the daemon \xB7 ${consent}</div>
49211
49319
  </div>
49212
49320
  <div class="statrow">
49213
49321
  <div class="stat"><div class="v">${r.nodes.toLocaleString("en-US")}</div><div class="k">nodes</div></div>
@@ -54857,7 +54965,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
54857
54965
  }
54858
54966
 
54859
54967
  // src/engine.ts
54860
- var DAEMON_VERSION = true ? "2.0.2-dev.631" : "2.0.0-alpha.0";
54968
+ var DAEMON_VERSION = true ? "2.0.2-dev.635" : "2.0.0-alpha.0";
54861
54969
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
54862
54970
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
54863
54971
  var GIT_OP_MUTE_MS = 4e3;
@@ -57214,10 +57322,17 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
57214
57322
  };
57215
57323
  const symbolIndex = opts.workspaceRoot ? publicSymbolIndex(store, opts.workspaceRoot) : null;
57216
57324
  const ownLexicon = buildSymbolLexicon(store);
57325
+ const projectIdentity = {
57326
+ ...profile.name ? { name: profile.name } : {},
57327
+ ...profile.repoLocator ? { repoLocator: profile.repoLocator } : {},
57328
+ ...profile.repoLocatorAliases ? { aliases: profile.repoLocatorAliases } : {},
57329
+ ...profile.aka ? { aka: profile.aka } : {}
57330
+ };
57217
57331
  const fileLexicon = buildFileLexicon(store);
57218
57332
  const shareable = (n) => {
57219
57333
  const preserved = symbolIndex ? preservedSymbolsFor(n.description, symbolIndex) : [];
57220
- const shippedText = generalize(n.description, { level }).text;
57334
+ const fileScrubbed = generalizeFileRefs(n.description, fileLexicon, level);
57335
+ const shippedText = generalize(fileScrubbed, { level, project: projectIdentity }).text;
57221
57336
  const internalSyms = internalSymbolsFor(shippedText, (t) => ownLexicon.has(t), symbolIndex);
57222
57337
  const internalFiles = internalFilesFor(shippedText, fileLexicon);
57223
57338
  const internal = [.../* @__PURE__ */ new Set([...internalFiles, ...internalSyms])].slice(
@@ -57413,7 +57528,7 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
57413
57528
  if (sidecar[tok]) continue;
57414
57529
  const entry = lexicon.get(tok);
57415
57530
  if (!entry?.summary) continue;
57416
- const scrubbed = generalize(entry.summary, { level }).text.trim();
57531
+ const scrubbed = generalize(entry.summary, { level, project: projectIdentity }).text.trim();
57417
57532
  if (!scrubbed || summaryRejectionReason(scrubbed, isKnown) !== null) continue;
57418
57533
  if (count >= MAX_SIDECAR_SYMBOLS) break outer;
57419
57534
  sidecar[tok] = { kind: entry.kind, summary: scrubbed };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.631",
3
+ "version": "2.0.2-dev.635",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {