litedbmodel 2.0.2 → 2.1.0

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 (80) hide show
  1. package/dist/decorators.d.ts.map +1 -1
  2. package/dist/decorators.js +44 -24
  3. package/dist/decorators.js.map +1 -1
  4. package/dist/drivers/mysql.d.ts.map +1 -1
  5. package/dist/drivers/mysql.js +6 -0
  6. package/dist/drivers/mysql.js.map +1 -1
  7. package/dist/drivers/postgres.d.ts.map +1 -1
  8. package/dist/drivers/postgres.js +7 -0
  9. package/dist/drivers/postgres.js.map +1 -1
  10. package/dist/drivers/sqlite.d.ts +2 -0
  11. package/dist/drivers/sqlite.d.ts.map +1 -1
  12. package/dist/drivers/sqlite.js +37 -2
  13. package/dist/drivers/sqlite.js.map +1 -1
  14. package/dist/scp/authoring.d.ts +66 -3
  15. package/dist/scp/authoring.d.ts.map +1 -1
  16. package/dist/scp/authoring.js +194 -5
  17. package/dist/scp/authoring.js.map +1 -1
  18. package/dist/scp/catalog.d.ts +2 -1
  19. package/dist/scp/catalog.d.ts.map +1 -1
  20. package/dist/scp/catalog.js +12 -1
  21. package/dist/scp/catalog.js.map +1 -1
  22. package/dist/scp/codegen.d.ts +43 -31
  23. package/dist/scp/codegen.d.ts.map +1 -1
  24. package/dist/scp/codegen.js +279 -95
  25. package/dist/scp/codegen.js.map +1 -1
  26. package/dist/scp/coltype.d.ts +83 -0
  27. package/dist/scp/coltype.d.ts.map +1 -1
  28. package/dist/scp/coltype.js +220 -0
  29. package/dist/scp/coltype.js.map +1 -1
  30. package/dist/scp/guard.d.ts +1 -1
  31. package/dist/scp/guard.d.ts.map +1 -1
  32. package/dist/scp/guard.js +6 -0
  33. package/dist/scp/guard.js.map +1 -1
  34. package/dist/scp/index.cjs +7149 -9379
  35. package/dist/scp/index.d.ts +7 -6
  36. package/dist/scp/index.d.ts.map +1 -1
  37. package/dist/scp/index.js +21 -6
  38. package/dist/scp/index.js.map +1 -1
  39. package/dist/scp/index.mjs +729 -178
  40. package/dist/scp/makesql/authoring-compile.d.ts.map +1 -1
  41. package/dist/scp/makesql/authoring-compile.js +11 -0
  42. package/dist/scp/makesql/authoring-compile.js.map +1 -1
  43. package/dist/scp/makesql/index.d.ts +2 -3
  44. package/dist/scp/makesql/index.d.ts.map +1 -1
  45. package/dist/scp/makesql/index.js +6 -6
  46. package/dist/scp/makesql/index.js.map +1 -1
  47. package/dist/scp/makesql/json-batch.d.ts.map +1 -1
  48. package/dist/scp/makesql/json-batch.js +6 -1
  49. package/dist/scp/makesql/json-batch.js.map +1 -1
  50. package/dist/scp/makesql/outtype.d.ts +61 -6
  51. package/dist/scp/makesql/outtype.d.ts.map +1 -1
  52. package/dist/scp/makesql/outtype.js +164 -33
  53. package/dist/scp/makesql/outtype.js.map +1 -1
  54. package/dist/scp/makesql/pool-executor.d.ts +70 -0
  55. package/dist/scp/makesql/pool-executor.d.ts.map +1 -1
  56. package/dist/scp/makesql/pool-executor.js +73 -5
  57. package/dist/scp/makesql/pool-executor.js.map +1 -1
  58. package/dist/scp/makesql/static-bundle.d.ts +39 -30
  59. package/dist/scp/makesql/static-bundle.d.ts.map +1 -1
  60. package/dist/scp/makesql/static-bundle.js +269 -138
  61. package/dist/scp/makesql/static-bundle.js.map +1 -1
  62. package/dist/scp/makesql/writeouttype.d.ts +5 -6
  63. package/dist/scp/makesql/writeouttype.d.ts.map +1 -1
  64. package/dist/scp/makesql/writeouttype.js +5 -6
  65. package/dist/scp/makesql/writeouttype.js.map +1 -1
  66. package/dist/scp/relation.d.ts +15 -1
  67. package/dist/scp/relation.d.ts.map +1 -1
  68. package/dist/scp/relation.js +61 -2
  69. package/dist/scp/relation.js.map +1 -1
  70. package/dist/scp/runtime.d.ts +6 -5
  71. package/dist/scp/runtime.d.ts.map +1 -1
  72. package/dist/scp/runtime.js +27 -5
  73. package/dist/scp/runtime.js.map +1 -1
  74. package/docs/BENCHMARK.md +58 -56
  75. package/docs/benchmark-chart.svg +166 -166
  76. package/package.json +8 -2
  77. package/dist/scp/makesql/ir.d.ts +0 -42
  78. package/dist/scp/makesql/ir.d.ts.map +0 -1
  79. package/dist/scp/makesql/ir.js +0 -66
  80. package/dist/scp/makesql/ir.js.map +0 -1
@@ -13,8 +13,8 @@
13
13
  * concrete `HandlerNR<Comp>`/`InNR<Comp>`/`PortsNR<Comp><node>`/`RawRowNR<Comp><node>` structs,
14
14
  * ZERO boxed `Value`/`RawValue`, ZERO IR baked into the module), the CODEGEN-ONLY lowering
15
15
  * below ({@link lowerReadGraphForTypedNative}) makes the read's shape structurally ELIGIBLE
16
- * (splits the surrogate `__scope` boxed-obj port into individual scalar ref ports + types the
17
- * component's `inputPorts` from the schema) before handing it to bc. For a WRITE bundle, or a
16
+ * (derives each real Select-node's referenced heads from its statements → individual scalar ref
17
+ * ports + types the component's `inputPorts` from the schema) before handing it to bc. For a WRITE bundle, or a
18
18
  * READ shape typed-native does not (yet) cover, codegen uses bc's existing de-interpreted
19
19
  * STRAIGHT-LINE endpoint (`<lang>-straightline`, bc#75) — see {@link typedEmitterFor}.
20
20
  * 2. **SQL catalog companion** — the pure-JSON STATIC makeSQL catalog (per-node statement
@@ -25,9 +25,9 @@
25
25
  *
26
26
  * This lowering exists SOLELY for the codegen emitter call — it builds a NEW, separate
27
27
  * `ComponentGraphIR` from the bundle's `readGraph`; it never mutates `SqlBundle`/`ReadGraph` and
28
- * never touches the shared `readGraph`/`executeReadGraph` the ir/interpret exec surface (and the
29
- * frozen conformance corpus) depend on. Those keep consuming the ORIGINAL boxed-`__scope`-port
30
- * surrogate IR ({@link bundleToPortableIR}), completely unaffected by anything in this file.
28
+ * never touches the shared `readGraph`/`executeReadGraph` the native exec surface (and the
29
+ * frozen conformance corpus) depend on. Those keep consuming the REAL Select-node
30
+ * `readGraph.ir`, completely unaffected by anything in this file.
31
31
  *
32
32
  * ## Behavior-identical to the thin-runtime (mode-2), by construction
33
33
  *
@@ -41,9 +41,16 @@
41
41
  * ## No literal-bake / no boxed fallback
42
42
  *
43
43
  * typed-native fails CLOSED on an uncovered shape (a `map`/`cond` relation kind it does not cover,
44
- * or an input head that cannot lower to a native scalar — e.g. an IN-list's array-typed head).
45
- * Such a shape is NOT silently regenerated on the boxed `-typed`/`-typed-raw` emitter — it THROWS,
46
- * naming the exact gap, so it can be tracked as a bc coverage gap (bc#86) rather than masked.
44
+ * or an input head that cannot lower to a native port). Such a shape is NOT silently regenerated on
45
+ * the boxed `-typed`/`-typed-raw` emitter — it THROWS, naming the exact gap, so it can be tracked as
46
+ * a bc coverage gap rather than masked.
47
+ *
48
+ * IN-list / array-bound WHERE heads (the `whereIn` `{__jsonArray:{ref:[head]},dialect}` param) are
49
+ * now COVERED via bc#110 (native array/list port for a componentRef input port): the lowering
50
+ * resolves the IN-list column's element scalar and emits a native ARRAY input port
51
+ * (`{type:'array', elemType}` → `Vec<ElemT>`/`[]ElemT`), so `complexWhere`/`inList` reach the
52
+ * zero-boxing native hot path (no serde_json/encoding-json, no boxed `Value`). They no longer
53
+ * fail closed as a bc#86/coverage gap.
47
54
  */
48
55
  Object.defineProperty(exports, "__esModule", { value: true });
49
56
  exports.TypedNativeCoverageError = exports.CODEGEN_EMITTER = exports.CODEGEN_LANGUAGES = void 0;
@@ -55,7 +62,6 @@ exports.generateCodegenArtifact = generateCodegenArtifact;
55
62
  exports.codegenExecuteBundleForTest = codegenExecuteBundleForTest;
56
63
  const behavior_contracts_1 = require("behavior-contracts");
57
64
  const runtime_1 = require("./runtime");
58
- const ir_1 = require("./makesql/ir");
59
65
  const coltype_1 = require("./coltype");
60
66
  /**
61
67
  * The languages litedbmodel mode-3 codegen supports — exactly the set bc's shared generator
@@ -95,29 +101,23 @@ exports.CODEGEN_EMITTER = {
95
101
  rust: 'rust-typed-native',
96
102
  };
97
103
  /**
98
- * The portable {@link ComponentGraphIR} view of a §8 bundle: a read bundle's surrogate IR (each
99
- * SQL node → a `makeSQL` node), or the single `makeSQL` component IR for a write. This is the
100
- * ORIGINAL boxed-`__scope`-port form the ir/interpret exec surface's `executeReadGraph` also
101
- * consumes (via `bundle.readGraph.ir` directly) — {@link generateCodegenArtifact} does NOT use
102
- * this for a READ bundle (it uses the codegen-only lowered form, {@link lowerReadGraphForTypedNative});
103
- * this function is kept for callers that want the untouched portable IR (e.g. diagnostics, the
104
- * write path, or a future straight-line fallback caller).
104
+ * The portable {@link ComponentGraphIR} view of a §8 READ bundle: `compileBehaviors`' real-node
105
+ * read-graph IR (the de-surrogated `Select`/`Count`/map nodes; #12) — the SAME IR the native exec
106
+ * surface (`executeReadGraph`) walks (via `bundle.readGraph.ir` directly). litedbmodel constructs NO
107
+ * `ComponentGraphIR` literal here; it returns the compiler's own output. {@link generateCodegenArtifact}
108
+ * does NOT use this for a typed-native READ target (that uses the codegen-only lowered form,
109
+ * {@link lowerReadGraphForTypedNative}); this is the portable IR for a boxed READ endpoint / fingerprint.
110
+ *
111
+ * WRITE bundles have NO portable component-graph IR (they carry a single compiled `statement`, not a
112
+ * component graph — and are NOT codegen-module cases: {@link generateCodegenArtifact} rejects them).
113
+ * There is therefore no hand-built `makeSQL` write surrogate anymore (#12) — a write bundle throws.
105
114
  */
106
115
  function bundleToPortableIR(bundle) {
107
116
  if (bundle.readGraph !== undefined)
108
117
  return bundle.readGraph.ir;
109
- const ir = (0, ir_1.makeSqlComponentIR)(bundle.name);
110
- // A WRITE bundle's typed de-box (spec §4.1/§9): attach the derived `outputType` (the
111
- // TransactionResult typed shape) to the single `makeSQL` node's `outType` + the component's
112
- // `outputType` — exactly how the read graph annotates its surrogate IR. Without it, bc's typed
113
- // emitters would hard-fail ("nothing to de-box"), which is the correct fail-closed signal; a
114
- // resolver-less write bundle (no `outputType`) stays un-annotated (interpret/boxed only, as before).
115
- if (bundle.outputType === undefined)
116
- return ir;
117
- const c = ir.components[0];
118
- const body = c.body.map((n, i) => (i === 0 ? { ...n, outType: bundle.outputType } : n));
119
- const component = { ...c, body, outputType: bundle.outputType };
120
- return { ...ir, components: [component] };
118
+ throw new Error(`litedbmodel codegen: bundle '${bundle.name}' has no readGraph — a WRITE bundle carries a single ` +
119
+ `compiled makeSQL statement, not a portable component-graph IR, and is not a codegen-module case ` +
120
+ `(#12: the hand-built makeSQL write surrogate IR is eliminated; writes ride the write/tx exec path).`);
121
121
  }
122
122
  /** The STATIC makeSQL execution catalog carried alongside the generated module. */
123
123
  function companionOf(bundle) {
@@ -132,26 +132,22 @@ function companionOf(bundle) {
132
132
  return bundle.transaction === undefined ? base : { ...base, transaction: bundle.transaction };
133
133
  }
134
134
  // ═══════════════════════════════════════════════════════════════════════════════════════════
135
- // #60 milestone 1 — CODEGEN-ONLY typed-native lowering.
135
+ // #60 milestone 1 — CODEGEN-ONLY typed-native lowering (#12: from the real-node read graph).
136
136
  //
137
137
  // bc's typed-native coverage predicate (`coverageRejectReason`, bc#86/#89) requires EVERY
138
- // componentRef port to be STATICALLY resolvable to a native scalar/string-array/number-literal —
139
- // the surrogate read graph's single `__scope: {obj:{...}}` port is a BOXED obj literal, which is
140
- // never statically resolvable (it fails `portIsStatic`), so bc hard-fails ("does not lower to a
141
- // native Rust type") on EVERY read, covered or not, before this lowering. Splitting `__scope` into
142
- // individual scalar ref ports (one per referenced head) makes the shape ELIGIBLE; typing the
143
- // component's `inputPorts` (bc's authoring default is `unknown` for every scanned `$.head`) then
144
- // lets each port lower to a CONCRETE Rust/Go field instead of falling through to `Value`.
138
+ // componentRef port to be STATICALLY resolvable to a native scalar/string-array/number-literal.
139
+ // The de-surrogated read graph's real `Select`/`Count`/map nodes carry boxed authoring ports
140
+ // (`where:{arr:[…]}`, `table`, `select`) that are not that shape, so bc would hard-fail on them.
141
+ // This lowering rebuilds a NEW, CODEGEN-ONLY component whose body nodes carry ONLY individual
142
+ // native-scalar `{ref:[head]}` ports (one per input head the node's compiled statements bind,
143
+ // derived from `statementsById`) + typed `inputPorts` — the shape bc's typed-native emitter needs.
145
144
  //
146
145
  // This is a NEW, throwaway `ComponentGraphIR` built FROM the bundle's `readGraph` fields
147
- // (`ir`/`statementsById`, both already computed by the EXISTING `compileReadGraph` — untouched
148
- // here) — it is never written back onto `SqlBundle`/`ReadGraph`, never serialized, and the
149
- // ir/interpret exec surface (`executeReadGraph`) never sees it (it keeps reading `readGraph.ir`,
150
- // the boxed-`__scope` form, directly). Purely a generation-time input to `generateModule`.
146
+ // (`ir` topology + `statementsById`, both already computed by the EXISTING `compileReadGraph` —
147
+ // untouched here) — it is never written back onto `SqlBundle`/`ReadGraph`, never serialized, and
148
+ // the native exec surface (`executeReadGraph`) never sees it (it walks the real-node `readGraph.ir`
149
+ // directly). Purely a generation-time input to `generateModule`.
151
150
  // ═══════════════════════════════════════════════════════════════════════════════════════════
152
- /** The makeSQL surrogate node's synthetic port name (mirrors `static-bundle.ts`'s private `SCOPE_PORT`
153
- * — duplicated as a literal here rather than exported, keeping this a codegen-only concern). */
154
- const SCOPE_PORT = '__scope';
155
151
  /** A head could not be typed for typed-native codegen — the read is NOT typed-native-coverable. */
156
152
  class TypedNativeCoverageError extends Error {
157
153
  component;
@@ -179,6 +175,12 @@ const WHERE_FRAGMENT_COLUMN = /^([A-Za-z_][A-Za-z0-9_]*)\s+(?:=|<>|<=|>=|<|>|LIK
179
175
  * ` FROM <table>[ …]`; a JOIN/CTE-shaped head is out of scope for this narrow codegen deriver and
180
176
  * reported as unresolvable rather than mis-parsed). */
181
177
  const SELECT_FROM_TABLE = /\bFROM\s+([A-Za-z_][A-Za-z0-9_]*)\b/i;
178
+ /** Extract the LHS column of an IN-list / array-bound WHERE fragment — the closed set of texts
179
+ * {@link inListFragment} emits across dialects, all of the form `<col> IN (…)` (sqlite `json_each`,
180
+ * mysql `JSON_TABLE`) or `<col> = ANY(?)` (postgres). The single array param binds a `?` inside; the
181
+ * column names the type to resolve the ELEMENT scalar from (spec §4.1 schema SoT). Any other shape
182
+ * returns undefined (fail-closed). */
183
+ const IN_LIST_COLUMN = /^([A-Za-z_][A-Za-z0-9_]*)\s+(?:IN\s*\(|=\s*ANY\s*\()/i;
182
184
  /**
183
185
  * Derive each input head's bc scalar type from a read node's compiled {@link StaticStatement}s
184
186
  * (spec §4.1 schema SoT), for bc's typed-native codegen (#60 m1). Works from the ALREADY-COMPILED
@@ -186,13 +188,25 @@ const SELECT_FROM_TABLE = /\bFROM\s+([A-Za-z_][A-Za-z0-9_]*)\b/i;
186
188
  * instead of re-walking the authored component — so this lowering needs NO extra input beyond
187
189
  * what `SqlBundle`/`ReadGraph` already expose (no change to `compileReadGraph`/`ReadGraph`).
188
190
  *
189
- * Returns the typed heads found, PLUS `unresolved` — heads referenced by a param that is NOT a
190
- * bare single-segment `{ref:[head]}` (e.g. `whereIn`'s `{__jsonArray:{ref:[…]},dialect}` array
191
- * param) or whose owning fragment's SQL text isn't the closed `<col> <op> ?` shape. A non-empty
192
- * `unresolved` means the read is NOT typed-native-coverable (fail-closed at the caller).
191
+ * Returns three sets:
192
+ * - `byHead` — heads bound by a bare single-segment `{ref:[head]}` scalar param, typed to their
193
+ * column's bc scalar (`int`/`float`/`string`/`bool`).
194
+ * - `arrayHeads` — heads bound by an IN-list / array param (`whereIn`'s
195
+ * `{__jsonArray:{ref:[head]},dialect}`), typed to their column's ELEMENT scalar. bc#110 gives
196
+ * typed-native a native array port (`Vec<ElemT>`/`[]ElemT`) for such a head, so it is now
197
+ * COVERED (no longer fail-closed) — the caller emits it as a native array input port.
198
+ * - `unresolved` — heads whose owning fragment's SQL text isn't a shape this deriver covers (the
199
+ * closed `<col> <op> ?` scalar shape or the `<col> IN (…)`/`<col> = ANY(?)` array shape). A
200
+ * non-empty `unresolved` means the read is NOT typed-native-coverable (fail-closed at the caller).
201
+ *
202
+ * `elementVar` (map nodes only): the map's `as` binding (`$e0`). A param whose ref's FIRST segment
203
+ * is the element var (`{ref:['$e0','author_id']}`) is a map-ELEMENT field access, NOT a component
204
+ * input head — bc types it from the map's `over` element struct (the prior node's row), so this
205
+ * deriver neither types nor rejects it (it is fully covered by bc's `coveredMapNode` element typing).
193
206
  */
194
- function deriveHeadTypesFromStatements(statements, resolveColumnType) {
207
+ function deriveHeadTypesFromStatements(statements, resolveColumnType, elementVar) {
195
208
  const byHead = new Map();
209
+ const arrayHeads = new Map();
196
210
  const unresolved = new Map();
197
211
  // The head statement (`SELECT … FROM <table>`) — always statements[0] (compileSelectNode always
198
212
  // pushes it first); its table name resolves every WHERE fragment's column type.
@@ -200,14 +214,64 @@ function deriveHeadTypesFromStatements(statements, resolveColumnType) {
200
214
  const tableMatch = head === undefined ? null : SELECT_FROM_TABLE.exec(head.sql);
201
215
  const table = tableMatch?.[1];
202
216
  for (const stmt of statements) {
203
- if (stmt.whereFragment !== true)
217
+ // The LIMIT clause (` LIMIT ?`) is NOT a whereFragment — its param is `coalesce(refOpt(limit), N)`
218
+ // (optional head + a static default). bc's typed-native emitter binds `limit` as a native scalar
219
+ // port (its `portIsStatic` accepts the bare ref + number-literal default), so type the head from
220
+ // the schema-less LIMIT contract: `limit`-family heads are always an integer row count. The
221
+ // element-var guard applies here too (a map child never has a LIMIT-bound element ref today, but
222
+ // stay uniform). Anything OTHER than the closed `coalesce([refOpt([head]), <int>])` shape is left
223
+ // untyped here (the surrogate-scope reconciliation below fail-closes on an un-typed referenced head).
224
+ if (stmt.whereFragment !== true) {
225
+ for (const param of stmt.params) {
226
+ const lh = limitHeadNameOf(param);
227
+ if (lh === undefined)
228
+ continue;
229
+ if (elementVar !== undefined && lh === elementVar)
230
+ continue;
231
+ const prior = byHead.get(lh);
232
+ if (prior !== undefined && prior !== 'int') {
233
+ unresolved.set(lh, `input head '${lh}' resolves to conflicting scalar types ('${prior}' vs 'int' from a LIMIT clause) across statements`);
234
+ continue;
235
+ }
236
+ byHead.set(lh, 'int');
237
+ }
204
238
  continue;
239
+ }
205
240
  for (const param of stmt.params) {
206
241
  const path = refPathOf(param);
242
+ // A map-ELEMENT field access (`{ref:['$e0','author_id']}`, first segment = the map `as` var) is
243
+ // NOT a component input head — bc types it from the map's `over` element struct. Neither type
244
+ // nor reject it here (fully covered by bc's `coveredMapNode` element-field lowering).
245
+ if (path !== undefined && elementVar !== undefined && path[0] === elementVar)
246
+ continue;
207
247
  if (path === undefined || path.length !== 1) {
208
- // Not a bare single-segment ref (e.g. the `whereIn` `__jsonArray` array param, or a nested
209
- // literal): if it names a head at all, surface it; otherwise it simply isn't head-typable
210
- // here (a literal has no head to report).
248
+ // An IN-list / array-bound WHERE head — `whereIn`'s `{__jsonArray:{ref:[head]},dialect}`
249
+ // param (single-array param, one `?` inside the `IN (…)`/`= ANY(?)` subquery). bc#110 gives
250
+ // typed-native a native ARRAY port for this shape (`Vec<ElemT>`/`[]ElemT`), so resolve the
251
+ // column's ELEMENT scalar (spec §4.1 SoT) and record it as an array head — no longer
252
+ // fail-closed. Any other non-scalar/nested-literal param stays unresolved (fail-closed).
253
+ const arrHead = arrayHeadNameOf(param);
254
+ if (arrHead !== undefined) {
255
+ if (table === undefined) {
256
+ unresolved.set(arrHead, `input head '${arrHead}': could not resolve the owning table from the SELECT head SQL ('${head?.sql ?? '<none>'}')`);
257
+ continue;
258
+ }
259
+ const cm = IN_LIST_COLUMN.exec(stmt.sql.trim());
260
+ if (cm === null) {
261
+ unresolved.set(arrHead, `input head '${arrHead}': IN-list WHERE fragment SQL '${stmt.sql}' is not the closed '<col> IN (…)'/'<col> = ANY(?)' shape this codegen-only deriver covers`);
262
+ continue;
263
+ }
264
+ const elemType = (0, coltype_1.sqlTypeToBcScalar)(resolveColumnType(table, cm[1]));
265
+ const priorElem = arrayHeads.get(arrHead);
266
+ if (priorElem !== undefined && priorElem !== elemType) {
267
+ unresolved.set(arrHead, `input head '${arrHead}' resolves to conflicting array element scalar types ('${priorElem}' vs '${elemType}') across statements`);
268
+ continue;
269
+ }
270
+ arrayHeads.set(arrHead, elemType);
271
+ continue;
272
+ }
273
+ // Not a bare single-segment ref and not a recognized array head (e.g. a nested literal): if
274
+ // it names a head at all, surface it; otherwise it simply isn't head-typable here.
211
275
  const named = headNameOf(param);
212
276
  if (named !== undefined) {
213
277
  unresolved.set(named, `input head '${named}' is bound by a non-scalar param shape (${JSON.stringify(param)}) — bc's ` +
@@ -236,7 +300,14 @@ function deriveHeadTypesFromStatements(statements, resolveColumnType) {
236
300
  byHead.set(headName, scalar);
237
301
  }
238
302
  }
239
- return { byHead, unresolved };
303
+ // A head bound BOTH as a scalar and as an array across fragments is not a coherent native port —
304
+ // fail-closed rather than silently pick one (never occurs for the covered shapes, defensive).
305
+ for (const head of arrayHeads.keys()) {
306
+ if (byHead.has(head)) {
307
+ unresolved.set(head, `input head '${head}' is bound both as a scalar and as an array param — no single native port type`);
308
+ }
309
+ }
310
+ return { byHead, arrayHeads, unresolved };
240
311
  }
241
312
  /** A statement param's bare ref path (`{ref:[…]}`/`{refOpt:[…]}`), or undefined if it isn't one. */
242
313
  function refPathOf(param) {
@@ -262,14 +333,76 @@ function headNameOf(param) {
262
333
  }
263
334
  return undefined;
264
335
  }
336
+ /** The distinct map-ELEMENT field names a node's statements bind via `{ref:[elementVar, field]}`
337
+ * (first-seen order). These are the map child's element-field ports (`$e0.author_id`): bc's
338
+ * typed-native map lowering types each from the `over` element struct's field. Only single-field
339
+ * accesses (`[elementVar, field]`, length 2) are collected — a deeper element path is not a covered
340
+ * native port here (fail-closed downstream if one appears). */
341
+ function elementFieldRefs(statements, elementVar) {
342
+ const out = [];
343
+ const seen = new Set();
344
+ for (const stmt of statements) {
345
+ for (const param of stmt.params) {
346
+ const path = refPathOf(param);
347
+ if (path === undefined || path.length !== 2 || path[0] !== elementVar)
348
+ continue;
349
+ const field = path[1];
350
+ if (!seen.has(field)) {
351
+ seen.add(field);
352
+ out.push(field);
353
+ }
354
+ }
355
+ }
356
+ return out;
357
+ }
358
+ /** The head a LIMIT param (`coalesce([{refOpt:[head]}, <int-literal>])`) binds — the closed shape
359
+ * `compileSelectNode` emits for an optional `limit` with a static default (`coalesce(opt($.limit), N)`).
360
+ * Returns the head name for that exact shape, else undefined (any other shape is not a LIMIT head this
361
+ * deriver types). bc's typed-native emitter binds it as a native scalar port (bare ref + number literal
362
+ * default are both `portIsStatic`). */
363
+ function limitHeadNameOf(param) {
364
+ if (param === null || typeof param !== 'object' || Array.isArray(param))
365
+ return undefined;
366
+ const obj = param;
367
+ const args = obj.coalesce;
368
+ if (!Array.isArray(args) || args.length !== 2)
369
+ return undefined;
370
+ const [refPart, dflt] = args;
371
+ // The default must be a static integer literal (`coalesce(opt($.limit), 20)`).
372
+ if (typeof dflt !== 'number' || !Number.isInteger(dflt))
373
+ return undefined;
374
+ if (refPart === null || typeof refPart !== 'object' || Array.isArray(refPart))
375
+ return undefined;
376
+ const rp = refPart;
377
+ const keys = Object.keys(rp);
378
+ if (keys.length !== 1 || (keys[0] !== 'ref' && keys[0] !== 'refOpt'))
379
+ return undefined;
380
+ const path = rp[keys[0]];
381
+ if (!Array.isArray(path) || path.length !== 1 || typeof path[0] !== 'string')
382
+ return undefined;
383
+ return path[0];
384
+ }
385
+ /** The head an IN-list / array param (`{__jsonArray:{ref:[head]},dialect}`) binds — ONLY the covered
386
+ * single-segment `{ref:[head]}` inner shape (bc#110's native array port requires a single-segment,
387
+ * non-opt ref). A multi-segment / opt / non-ref inner is NOT this covered array shape → undefined
388
+ * (the caller then treats it as an unresolved non-scalar param, fail-closed). */
389
+ function arrayHeadNameOf(param) {
390
+ if (param === null || typeof param !== 'object' || Array.isArray(param))
391
+ return undefined;
392
+ const obj = param;
393
+ if (!('__jsonArray' in obj))
394
+ return undefined;
395
+ const inner = refPathOf(obj.__jsonArray);
396
+ return inner !== undefined && inner.length === 1 ? inner[0] : undefined;
397
+ }
265
398
  /**
266
- * Lower a read bundle's surrogate `ComponentGraphIR` into a NEW, CODEGEN-ONLY IR eligible for bc's
267
- * typed-native endpoint (#60 milestone 1): split the single `__scope: {obj:{...}}` boxed port into
268
- * individual scalar `{ref:[head]}` ports, and type the component's `inputPorts` from the schema
269
- * (via {@link deriveHeadTypesFromStatements}). Throws {@link TypedNativeCoverageError} if any
270
- * referenced head cannot be natively typed (e.g. an IN-list's array head) — NO silent `unknown`
271
- * port, NO fallback. Does NOT mutate `bundle`/`bundle.readGraph` (a fresh IR object is returned);
272
- * the ir/interpret exec surface's `executeReadGraph` keeps consuming the ORIGINAL `readGraph.ir`.
399
+ * Lower a read bundle's REAL Select-node `ComponentGraphIR` into a NEW, CODEGEN-ONLY IR eligible
400
+ * for bc's typed-native endpoint (#60 milestone 1): derive each node's referenced heads from its
401
+ * `statementsById` fragments and emit individual native-scalar `{ref:[head]}` ports, typing the
402
+ * component's `inputPorts` from the schema (via {@link deriveHeadTypesFromStatements}). Throws
403
+ * {@link TypedNativeCoverageError} if any referenced head cannot be natively typed (e.g. an IN-list's
404
+ * array head) — NO silent `unknown` port, NO fallback. Does NOT mutate `bundle`/`bundle.readGraph`
405
+ * (a fresh IR object is returned); the native `executeReadGraph` keeps consuming the real `readGraph.ir`.
273
406
  *
274
407
  * Scope: bc's typed-native predicate itself still governs `map`/`cond`/relationKind/policy
275
408
  * coverage (this lowering does not special-case those — `generateModule` fails closed on them with
@@ -280,21 +413,22 @@ function lowerReadGraphForTypedNative(readGraph, resolveColumnType) {
280
413
  const reasons = [];
281
414
  const components = ir.components.map((c) => {
282
415
  const inputPortTypes = new Map();
416
+ // IN-list / array-bound heads (bc#110): the head's native ELEMENT scalar (the port lowers to
417
+ // `Vec<ElemT>`/`[]ElemT`, fed natively — NO json.Marshal/serde_json on the hot path).
418
+ const inputPortElemTypes = new Map();
283
419
  const body = c.body.map((n) => {
284
420
  if ('cond' in n)
285
421
  return n;
286
422
  const isMapNode = 'map' in n;
287
- const ref = isMapNode ? n.map : n;
288
- const scopeVal = ref.ports[SCOPE_PORT];
289
- if (scopeVal === undefined || typeof scopeVal !== 'object' || scopeVal === null || !('obj' in scopeVal)) {
290
- // Not the makeSQL surrogate shape this lowering targets (defensive — every read-graph body
291
- // node IS this shape by construction) — leave the node untouched; bc's own coverage check
292
- // will report it if it is genuinely uncovered.
293
- return n;
294
- }
295
- const obj = scopeVal.obj;
296
423
  const stmts = readGraph.statementsById[n.id] ?? [];
297
- const { byHead, unresolved } = deriveHeadTypesFromStatements(stmts, resolveColumnType);
424
+ // A map node binds an ELEMENT var (`as: '$e0'`) — its child statements reference the mapped
425
+ // parent row via `{ref:['$e0', <field>]}`. That is a map-element field access (bc types it from
426
+ // the map's `over` element struct), NOT a component input head, so hand the element var to the
427
+ // deriver to exclude it from head typing/rejection.
428
+ const elementVar = isMapNode
429
+ ? (n.map.as ?? undefined)
430
+ : undefined;
431
+ const { byHead, arrayHeads, unresolved } = deriveHeadTypesFromStatements(stmts, resolveColumnType, elementVar);
298
432
  for (const [, reason] of unresolved)
299
433
  reasons.push(`node '${n.id}': ${reason}`);
300
434
  for (const [head, scalar] of byHead) {
@@ -305,16 +439,32 @@ function lowerReadGraphForTypedNative(readGraph, resolveColumnType) {
305
439
  }
306
440
  inputPortTypes.set(head, scalar);
307
441
  }
308
- // Every head the surrogate scope references must have been typed above (byHead) — a head
309
- // present in `obj` but absent from `byHead`/`unresolved` indicates a param shape this
310
- // deriver's statement walk did not visit (e.g. a non-WHERE port); report it too rather than
311
- // silently emitting an untyped scalar ref port.
312
- const newPorts = {};
313
- for (const head of Object.keys(obj)) {
314
- if (!byHead.has(head) && !unresolved.has(head)) {
315
- reasons.push(`node '${n.id}': input head '${head}' referenced by the surrogate scope but not resolved by any WHERE fragment — cannot type it for native codegen`);
442
+ for (const [head, elem] of arrayHeads) {
443
+ const prior = inputPortElemTypes.get(head);
444
+ if (prior !== undefined && prior !== elem) {
445
+ reasons.push(`input head '${head}' resolves to conflicting array element scalar types ('${prior}' vs '${elem}') across nodes`);
316
446
  continue;
317
447
  }
448
+ inputPortElemTypes.set(head, elem);
449
+ }
450
+ // #12 (de-surrogated): the codegen IR is rebuilt from the real node's `statementsById`-derived
451
+ // head set (`byHead` ∪ `arrayHeads`) — the SAME native-scalar `{ref:[head]}` port shape bc's
452
+ // typed-native emitter consumes. There is no `__scope` obj to walk anymore; the referenced-head
453
+ // set IS what `deriveHeadTypesFromStatements` found (an `unresolved` head already pushed a
454
+ // reason above, fail-closed). A covered array head is emitted as the SAME single-segment
455
+ // `{ref:[head]}` port (bc#110's array-port lowering keys off the inputPorts array schema).
456
+ const newPorts = {};
457
+ // A map node's child statements reference the mapped parent row via `{ref:['$e0', <field>]}`.
458
+ // bc's typed-native map lowering types a port `{ref:['$e0', <field>]}` from the OVER element
459
+ // struct's FIELD (a native scalar) — so emit one native-scalar element-FIELD port per field the
460
+ // child statements bind (`{ref:['$e0', author_id]}` → port `author_id`). Non-element component
461
+ // heads (if any) are typed/emitted normally below.
462
+ if (isMapNode && elementVar !== undefined) {
463
+ const fields = elementFieldRefs(stmts, elementVar);
464
+ for (const field of fields)
465
+ newPorts[field] = { ref: [elementVar, field] };
466
+ }
467
+ for (const head of [...byHead.keys(), ...arrayHeads.keys()]) {
318
468
  newPorts[head] = { ref: [head] };
319
469
  }
320
470
  return isMapNode
@@ -339,6 +489,15 @@ function lowerReadGraphForTypedNative(readGraph, resolveColumnType) {
339
489
  const schema = (c.inputPorts ?? {})[name];
340
490
  inputPorts[name] = schema === undefined ? { required: true, type: scalar } : { ...schema, type: scalar };
341
491
  }
492
+ // IN-list / array-bound heads (bc#110): a native ARRAY input port carrying the ELEMENT scalar as
493
+ // `elemType`. bc's typed-native emitter lowers this to `Vec<ElemT>`/`[]ElemT` fed natively from
494
+ // the input struct field — NO boxed `Value`, NO serde_json/encoding-json on the read hot path.
495
+ // bc does NOT infer element types (consumer-interface C3), so litedbmodel supplies `elemType`
496
+ // from the schema SoT (the IN-list column's resolved scalar).
497
+ for (const [name, elem] of inputPortElemTypes) {
498
+ const schema = (c.inputPorts ?? {})[name];
499
+ inputPorts[name] = { ...(schema ?? { required: true }), type: 'array', elemType: elem };
500
+ }
342
501
  return { ...c, body, inputPorts };
343
502
  });
344
503
  return { ...ir, components };
@@ -374,23 +533,39 @@ function typedEmitterFor(language, registered) {
374
533
  function codegenEmitterFor(language, registered) {
375
534
  return typedEmitterFor(language, registered);
376
535
  }
377
- /** Does a resolved emitter id end in bc's typed-native suffix (`-typed-native`)? Only THOSE
378
- * emitters need (and are eligible for) the `__scope`-obj-splitting lowering — a boxed endpoint
379
- * (`typescript-typed`) accepts the ORIGINAL surrogate IR just fine (it consumes a boxed `Value`
380
- * port either way), so lowering it would needlessly narrow TS's coverage (e.g. `whereIn`'s
381
- * array-typed head, which typed-native cannot cover but the boxed TS endpoint handles today). */
382
- function isTypedNativeEmitter(emitter) {
383
- return emitter.endsWith('-typed-native');
536
+ /**
537
+ * Every litedbmodel READ codegen endpoint consumes the SAME native-scalar-port lowering — NOT
538
+ * just the `-typed-native` (go/rust) ones. Rationale (#12 regression fix):
539
+ *
540
+ * Post-#12 the read graph is the REAL de-surrogated `Select`-node IR, whose `where` port array
541
+ * carries a fragment for EVERY authored `whereX($.col, …)` — including one whose LHS `$.col` is a
542
+ * WHERE COLUMN-NAME MARKER, never a bound input value (`whereGe($.created_at, $.since)` accesses
543
+ * `$.created_at` only to NAME the column; only `$.since` is bound). Handing that raw IR to bc's
544
+ * emitter emits a `ref(["created_at"], scope)` read + a `created_at` input-struct field, so the
545
+ * bound module throws `unknown binding: created_at` at execution (the scope has no `created_at`).
546
+ * The go/rust `-typed-native` path never hit this because it is fed
547
+ * {@link lowerReadGraphForTypedNative}, which rebuilds each node's ports from the GENUINE bound
548
+ * heads (`statementsById`), dropping the column-name markers. TS was on the raw IR
549
+ * ({@link bundleToPortableIR}) → it kept the marker → it broke.
550
+ *
551
+ * The lowering is therefore the correct input for the boxed `typescript-typed` endpoint too: it
552
+ * feeds bc EXACTLY the genuine bound heads (equivalent-in-spirit to what go/rust consume), and
553
+ * bc#110's native array port means the array-typed heads (`complexWhere`/`inList`) lower cleanly —
554
+ * the old "lowering would narrow TS's array coverage" concern is stale. Only WRITE bundles (no
555
+ * `readGraph`) never reach this path. */
556
+ function needsHeadLowering(_emitter) {
557
+ return true;
384
558
  }
385
559
  /**
386
- * Generate the mode-3 READ codegen artifact for ONE §8 READ bundle in ONE target language. For a
387
- * typed-NATIVE target (go/rust, bc#77/#90), lowers the bundle's surrogate read graph into the
388
- * typed-native-eligible IR ({@link lowerReadGraphForTypedNative}) first — REAL static native
389
- * source, RUNTIME-FREE, no baked-IR interpret path. For any OTHER registered endpoint (currently
390
- * only TS's boxed `typescript-typed`, which has no typed-native counterpart yet), the ORIGINAL
391
- * portable IR ({@link bundleToPortableIR}) is used unchanged — the lowering is typed-native-only
392
- * and would needlessly narrow a boxed endpoint's existing coverage. litedbmodel supplies the
393
- * input (portable IR + catalog); bc owns the emitter.
560
+ * Generate the mode-3 READ codegen artifact for ONE §8 READ bundle in ONE target language. Lowers
561
+ * the bundle's real Select-node read graph into the native-scalar-port IR
562
+ * ({@link lowerReadGraphForTypedNative}) FIRST — for go/rust's typed-NATIVE endpoint (bc#77/#90,
563
+ * RUNTIME-FREE) AND for TS's boxed `typescript-typed` endpoint alike. Both consume the SAME
564
+ * genuine-bound-head shape: the lowering derives each node's ports from its compiled
565
+ * `statementsById` fragments, so a WHERE COLUMN-NAME MARKER head (`whereGe($.created_at, $.since)`
566
+ * — `$.created_at` names the column, is never bound) is EXCLUDED from the emitted ports/input
567
+ * struct, exactly as go/rust already handled it (#12 regression: TS previously fed the raw IR and
568
+ * emitted a stray `created_at` binding → `unknown binding: created_at` at execution).
394
569
  *
395
570
  * WRITE bundles are OUT OF SCOPE (#60 milestone 1: writes stay on the existing write/tx execution
396
571
  * path, never a codegen module) — throws if `bundle.readGraph` is absent.
@@ -404,10 +579,19 @@ function generateCodegenArtifact(bundle, language, registeredLanguages, resolveC
404
579
  const emitter = typedEmitterFor(language, registeredLanguages);
405
580
  // The portable IR exists ONLY transiently here as the generator's input — it is NOT part of the
406
581
  // codegen OUTPUT (no artifact field, no file, no binary; the codegen path never reads IR data).
407
- const ir = isTypedNativeEmitter(emitter)
582
+ // ALL read endpoints (go/rust typed-native AND TS boxed typescript-typed) are fed the SAME
583
+ // genuine-bound-head lowering (#12 regression fix — see needsHeadLowering).
584
+ const ir = needsHeadLowering(emitter)
408
585
  ? lowerReadGraphForTypedNative(bundle.readGraph, resolveColumnType)
409
586
  : bundleToPortableIR(bundle);
410
- const module = (0, behavior_contracts_1.generateModule)(ir, runtimeImport === undefined ? { language: emitter } : { language: emitter, runtimeImport });
587
+ // bc 0.8.0 (scp-only-authoring, SA3/SA7): `generateModule` fail-closes on un-tokened IR
588
+ // (`NON_COMPILED_IR`). This `ir` is DERIVED from `compileBehaviors`' real read graph (additively
589
+ // lowered/annotated), so it carries no in-process provenance token. Re-adopt it at this generation
590
+ // boundary via `loadCompiledIR` — the sanctioned seam that recomputes the canonical fingerprint once
591
+ // and mints the token (the derived graph IS the compiler's output transformed, never hand-forged raw
592
+ // IR). This is exactly bc's "codegen fixture / derived IR" boundary case.
593
+ const compiled = (0, behavior_contracts_1.loadCompiledIR)(ir);
594
+ const module = (0, behavior_contracts_1.generateModule)(compiled, runtimeImport === undefined ? { language: emitter } : { language: emitter, runtimeImport });
411
595
  return { language: language, module, companion: companionOf(bundle), bundle };
412
596
  }
413
597
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.js","sourceRoot":"","sources":["../../src/scp/codegen.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;;;AAkGH,gDAaC;AA6KD,oEAgEC;AAOD,0CAuBC;AAOD,8CAEC;AAwBD,0DAsBC;AAOD,kEAEC;AAxbD,2DAA0J;AAE1J,uCAA0C;AAC1C,qCAAkD;AAKlD,uCAAsF;AAEtF;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAGxF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,eAAe,GAA6C;IACvE,UAAU,EAAE,kBAAkB;IAC9B,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,mBAA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