@inerrata-corporation/errata 2.0.17-dev.3416 → 2.0.17-dev.3426

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.
@@ -18618,6 +18618,17 @@ function sessionOriginKey(sessionId) {
18618
18618
  return "ws_" + createHash2("sha256").update(sessionId).digest("hex").slice(0, 12);
18619
18619
  }
18620
18620
 
18621
+ // src/session-registry.ts
18622
+ var SESSION_IDLE_MS = 20 * 6e4;
18623
+ function sessionsOf(node) {
18624
+ const s = node.attrs["sources"];
18625
+ return Array.isArray(s) ? s.filter((x) => typeof x === "string" && x.length > 0) : [];
18626
+ }
18627
+ function capturedOnlyBy(node, sessions) {
18628
+ const recorded = sessionsOf(node);
18629
+ return recorded.length > 0 && recorded.every((s) => sessions.has(s));
18630
+ }
18631
+
18621
18632
  // src/public-symbols.ts
18622
18633
  import { readFileSync, readdirSync, existsSync } from "node:fs";
18623
18634
  import { join } from "node:path";
@@ -19496,6 +19507,7 @@ function shareableContext(n, wireId) {
19496
19507
  function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [], opts = {}) {
19497
19508
  const level = opts.level ?? 1;
19498
19509
  const noveltyOpts = opts.dedupCosine != null ? { dedupCosine: opts.dedupCosine } : {};
19510
+ const quarantine = opts.quarantinedSessions?.length ? new Set(opts.quarantinedSessions) : null;
19499
19511
  const ignored = (text) => ignorePatterns.length > 0 && ignorePatterns.some((p) => text.toLowerCase().includes(p));
19500
19512
  const originSessionOf = (n) => {
19501
19513
  const key = sessionOriginKey(n.attrs["sources"]?.[0]);
@@ -19564,6 +19576,7 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
19564
19576
  candidates: 0,
19565
19577
  shipped: 0,
19566
19578
  cloudSourced: 0,
19579
+ quarantined: 0,
19567
19580
  falsePositive: 0,
19568
19581
  ignored: 0,
19569
19582
  watermarked: 0,
@@ -19614,6 +19627,10 @@ function buildInstanceIngest(store, profile, daemonVersion, ignorePatterns = [],
19614
19627
  composition.cloudSourced++;
19615
19628
  continue;
19616
19629
  }
19630
+ if (quarantine && capturedOnlyBy(n, quarantine)) {
19631
+ composition.quarantined++;
19632
+ continue;
19633
+ }
19617
19634
  if (n.attrs["resolvedAs"] === PROBLEM_RESOLUTION.FALSE_POSITIVE) {
19618
19635
  composition.falsePositive++;
19619
19636
  continue;
@@ -19945,7 +19962,8 @@ function buildDrainInstances(store, sharedStore, input) {
19945
19962
  },
19946
19963
  ...lexicon ? { lexicon } : {},
19947
19964
  ...fileLexicon ? { fileLexicon } : {},
19948
- ...input.project ? { project: input.project } : {}
19965
+ ...input.project ? { project: input.project } : {},
19966
+ ...input.quarantinedSessions?.length ? { quarantinedSessions: input.quarantinedSessions } : {}
19949
19967
  });
19950
19968
  return {
19951
19969
  batch,