@sigloch/graph-api-core 5.11.0 → 5.11.2

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.
@@ -27,6 +27,13 @@ import { generateSchema } from './schema-generator.js';
27
27
  * initialisieren, warten damit auf denselben Ladevorgang statt zwei zu starten.
28
28
  */
29
29
  let kuzuModule = null;
30
+ /**
31
+ * Kuzu startet ohne Vorgabe einen Thread je Kern (ITEM-2026-1174). Der Node-Build ruft synchron,
32
+ * der JS-Thread steht also bis zur Antwort. Ein einzelner Graph braucht keine Parallelitaet:
33
+ * 600 Testlaeufe dauerten mit einem Thread 441 s, mit 18 Threads 726 s. Ob das auch den Haenger
34
+ * aus ITEM-2026-871 beseitigt, ist nicht belegt.
35
+ */
36
+ const MAX_NUM_THREADS = 1;
30
37
  function loadKuzu() {
31
38
  if (!kuzuModule)
32
39
  kuzuModule = initKuzu();
@@ -72,7 +79,7 @@ export class GraphCypherEngine {
72
79
  }
73
80
  await this.destroy();
74
81
  this.kuzu = await loadKuzu();
75
- this.db = new this.kuzu.Database(this.options.path ?? ':memory:');
82
+ this.db = new this.kuzu.Database(this.options.path ?? ':memory:', 0, MAX_NUM_THREADS);
76
83
  this.connection = new this.kuzu.Connection(this.db);
77
84
  this.schema = generateSchema(ontology, this.options);
78
85
  this.ontology = ontology;
@@ -127,8 +127,7 @@ function liftAttributes(rest) {
127
127
  * versioned and shipped, and then evaluated by nobody: consumers register exactly
128
128
  * `SE_DESCRIPTOR.rules`, so ten families were dead weight in the package. Measured on
129
129
  * graphcode's SSOT the day this was found: 2 violations reported, 276 findable — among
130
- * them `CR-R02` ("done but no commitRef", 91×), precisely the graph-vs-reality check
131
- * the repo believed it had. A use case with no operational chain went unflagged for
130
+ * them a graph-vs-reality check on done CRs (91×) that the repo believed it had. A use case with no operational chain went unflagged for
132
131
  * weeks because `UC-03`/`FC-02` existed and never ran.
133
132
  *
134
133
  * Two families stay out on purpose:
@@ -203,7 +202,7 @@ function seRules(policy) {
203
202
  }
204
203
  // `label` is the node-table identifier (kuzu table name) — must be a valid
205
204
  // identifier, so it's the ElementType key (SYS, UC, …), not the human
206
- // ELEMENT_DESCRIPTIONS text which would break DDL.
205
+ // ELEMENT_DEFINITIONS name which would break DDL.
207
206
  const nodeTypes = Object.fromEntries(ElementType.options.map((t) => [t, { label: t, requiredAttrs: [] }]));
208
207
  const edgeTypes = Object.fromEntries(TraceType.options.map((tt) => {
209
208
  const pairs = TRACE_PATTERNS.filter((p) => p.type === tt).map((p) => [p.source, p.target]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigloch/graph-api-core",
3
- "version": "5.11.0",
3
+ "version": "5.11.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",