@prisma-next/sql-runtime 0.11.0-dev.3 → 0.11.0-dev.5

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.
@@ -138,7 +138,7 @@ declare function lints(options?: LintsOptions): SqlMiddleware;
138
138
  //#endregion
139
139
  //#region src/runtime-spi.d.ts
140
140
  /**
141
- * Reader of the SQL contract marker. SQL runtimes call `readMarker` before executing user queries (when `verify` is enabled). The adapter owns the full marker-read flow — probing for storage, issuing the read, decoding the row — and returns a tagged result so callers can distinguish "marker storage missing", "no row for this space", and "present".
141
+ * Reader of the SQL contract marker. SQL runtimes call `readMarker` before executing user queries (unless `verifyMarker` is false). The adapter owns the full marker-read flow — probing for storage, issuing the read, decoding the row — and returns a tagged result so callers can distinguish "marker storage missing", "no row for this space", and "present".
142
142
  */
143
143
  interface MarkerReader {
144
144
  readMarker(queryable: SqlQueryable): Promise<MarkerReadResult>;
@@ -156,10 +156,24 @@ interface RuntimeFamilyAdapter<TContract = unknown> {
156
156
  readonly markerReader: MarkerReader;
157
157
  validatePlan(plan: ExecutionPlan, contract: TContract): void;
158
158
  }
159
- interface RuntimeVerifyOptions {
160
- readonly mode: 'onFirstUse' | 'startup' | 'always';
161
- readonly requireMarker: boolean;
162
- }
159
+ /**
160
+ * Controls whether the runtime reads and checks the contract marker row on first execute.
161
+ *
162
+ * - `'onFirstUse'` (default when omitted): the marker is read once per runtime lifetime, on the
163
+ * first `execute()` call. Any hash mismatch or absent marker emits a structured `warn`-level log
164
+ * through the runtime's {@link RuntimeLog} and the query proceeds. Subsequent queries skip the
165
+ * marker reader entirely.
166
+ * - `false`: the marker reader is never invoked. No log line is emitted. Use this to opt out of
167
+ * the diagnostic entirely (e.g. during a known deploy-skew window).
168
+ *
169
+ * The string-or-false shape is forward-compatible: future modes such as `'startup'` (eager check
170
+ * inside the wrapper `connect()` step) can be added as additive union members without an API break.
171
+ * `true` is intentionally not permitted — modes are always named.
172
+ *
173
+ * Default-on so contract drift surfaces by default — teams who never thought to enable the diagnostic
174
+ * still see the warning when something goes wrong.
175
+ */
176
+ type VerifyMarkerOption = 'onFirstUse' | false;
163
177
  type TelemetryOutcome = 'success' | 'runtime-error';
164
178
  interface RuntimeTelemetryEvent {
165
179
  readonly lane: string;
@@ -241,7 +255,7 @@ interface CreateRuntimeOptions<TContract extends Contract<SqlStorage> = Contract
241
255
  readonly stackInstance: ExecutionStackInstance<'sql', TTargetId, SqlRuntimeAdapterInstance<TTargetId>, RuntimeDriverInstance<'sql', TTargetId>, SqlRuntimeExtensionInstance<TTargetId>>;
242
256
  readonly context: ExecutionContext<TContract>;
243
257
  readonly driver: SqlDriver<unknown>;
244
- readonly verify: RuntimeVerifyOptions;
258
+ readonly verifyMarker?: VerifyMarkerOption;
245
259
  readonly middleware?: readonly SqlMiddleware[];
246
260
  readonly mode?: 'strict' | 'permissive';
247
261
  readonly log?: Log$1;
@@ -375,5 +389,5 @@ interface WriteContractMarkerStatements {
375
389
  }
376
390
  declare function writeContractMarker(input: WriteMarkerInput): WriteContractMarkerStatements;
377
391
  //#endregion
378
- export { SqlMiddlewareContext as $, RuntimeParameterizedCodecDescriptor as A, TypeHelperRegistry as B, RuntimeTransaction as C, ExecutionContext as D, withTransaction as E, SqlRuntimeDriverInstance as F, RuntimeTelemetryEvent as G, createSqlExecutionStack as H, SqlRuntimeExtensionDescriptor as I, LintsOptions as J, RuntimeVerifyOptions as K, SqlRuntimeExtensionInstance as L, SqlExecutionStackWithDriver as M, SqlRuntimeAdapterDescriptor as N, GeneratorStability as O, SqlRuntimeAdapterInstance as P, SqlMiddleware as Q, SqlRuntimeTargetDescriptor as R, RuntimeQueryable as S, createRuntime as T, MarkerReader as U, createExecutionContext as V, RuntimeFamilyAdapter as W, BudgetsOptions as X, lints as Y, budgets as Z, PrepareCallback as _, APP_SPACE_ID as a, Runtime as b, ensureTableStatement as c, BindSiteParams as d, parseContractMarkerRow as et, Declaration as f, ParamsFromDeclaration as g, ParamSpec as h, MarkerStatement$1 as i, validateContractCodecMappings as it, SqlExecutionStack as j, RuntimeMutationDefaultGenerator as k, readContractMarker as l, DeclaredNullable as m, Log as n, extractCodecIds as nt, SqlStatement as o, DeclaredCodecId as p, TelemetryOutcome as q, MarkerReadResult$1 as r, validateCodecRegistryCompleteness as rt, ensureSchemaStatement as s, AfterExecuteResult$1 as t, lowerSqlPlan as tt, writeContractMarker as u, PreparedStatement as v, TransactionContext as w, RuntimeConnection as x, CreateRuntimeOptions as y, SqlStaticContributions as z };
379
- //# sourceMappingURL=index-B2sP_QGE.d.mts.map
392
+ export { SqlMiddlewareContext as $, RuntimeParameterizedCodecDescriptor as A, TypeHelperRegistry as B, RuntimeTransaction as C, ExecutionContext as D, withTransaction as E, SqlRuntimeDriverInstance as F, RuntimeTelemetryEvent as G, createSqlExecutionStack as H, SqlRuntimeExtensionDescriptor as I, LintsOptions as J, TelemetryOutcome as K, SqlRuntimeExtensionInstance as L, SqlExecutionStackWithDriver as M, SqlRuntimeAdapterDescriptor as N, GeneratorStability as O, SqlRuntimeAdapterInstance as P, SqlMiddleware as Q, SqlRuntimeTargetDescriptor as R, RuntimeQueryable as S, createRuntime as T, MarkerReader as U, createExecutionContext as V, RuntimeFamilyAdapter as W, BudgetsOptions as X, lints as Y, budgets as Z, PrepareCallback as _, APP_SPACE_ID as a, Runtime as b, ensureTableStatement as c, BindSiteParams as d, parseContractMarkerRow as et, Declaration as f, ParamsFromDeclaration as g, ParamSpec as h, MarkerStatement$1 as i, validateContractCodecMappings as it, SqlExecutionStack as j, RuntimeMutationDefaultGenerator as k, readContractMarker as l, DeclaredNullable as m, Log as n, extractCodecIds as nt, SqlStatement as o, DeclaredCodecId as p, VerifyMarkerOption as q, MarkerReadResult$1 as r, validateCodecRegistryCompleteness as rt, ensureSchemaStatement as s, AfterExecuteResult$1 as t, lowerSqlPlan as tt, writeContractMarker as u, PreparedStatement as v, TransactionContext as w, RuntimeConnection as x, CreateRuntimeOptions as y, SqlStaticContributions as z };
393
+ //# sourceMappingURL=index-BtHe0Ay1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BtHe0Ay1.d.mts","names":[],"sources":["../src/codecs/validation.ts","../src/lower-sql-plan.ts","../src/marker.ts","../src/middleware/sql-middleware.ts","../src/middleware/budgets.ts","../src/middleware/lints.ts","../src/runtime-spi.ts","../src/sql-context.ts","../src/sql-runtime.ts","../src/prepared/types.ts","../src/sql-marker.ts"],"mappings":";;;;;;;;;;;;;;;iBAagB,eAAA,CAAgB,QAAA,EAAU,QAAA,CAAS,UAAA,IAAc,GAAA;AAAA,iBA+BjD,6BAAA,CACd,QAAA,EAAU,uBAAA,EACV,QAAA,EAAU,QAAA,CAAS,UAAA;AAAA,iBA4BL,iCAAA,CACd,QAAA,EAAU,uBAAA,EACV,QAAA,EAAU,QAAA,CAAS,UAAA;;;;;;;;;;;;iBC7DL,YAAA,KAAA,CACd,OAAA,EAAS,OAAA,CAAQ,WAAA,EAAa,QAAA,CAAS,UAAA,GAAa,gBAAA,GACpD,QAAA,EAAU,QAAA,CAAS,UAAA,GACnB,SAAA,EAAW,YAAA,CAAa,GAAA,IACvB,gBAAA,CAAiB,GAAA;;;iBCgCJ,sBAAA,CAAuB,GAAA,YAAe,oBAAA;;;UCxCrC,oBAAA,SAA6B,wBAAA;EAAA,SACnC,QAAA,EAAU,QAAA,CAAS,UAAA;AAAA;;;;;UAOb,SAAA;EAAA,SACN,GAAA,EAAK,WAAA;EAAA,SACL,IAAA,EAAM,QAAA;AAAA;AAAA,UAGA,aAAA,mBAAgC,MAAA,oBAA0B,MAAA,2BACjE,iBAAA,CAAkB,gBAAA,EAAkB,kBAAA,CAAmB,SAAA;EAAA,SACtD,QAAA;EHb+B;;;;;;;;;;AA+B1C;;;;;;;;EGCE,aAAA,EAAe,KAAA,EAAO,SAAA,EAAW,GAAA,EAAK,oBAAA,GAAuB,OAAA,CAAQ,SAAA;EHArE;;;;;;AA6BF;;;;;;;;;;;;;;;;;;AC3DA;E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BlC,6BAAA;EAAA,SACN,MAAA,EAAQ,YAAA;EAAA,SACR,MAAA,EAAQ,YAAA;AAAA;AAAA,iBA2BH,mBAAA,CAAoB,KAAA,EAAO,gBAAA,GAAmB,6BAAA"}
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as SqlMiddlewareContext, A as RuntimeParameterizedCodecDescriptor, B as TypeHelperRegistry, C as RuntimeTransaction, D as ExecutionContext, E as withTransaction, F as SqlRuntimeDriverInstance, G as RuntimeTelemetryEvent, H as createSqlExecutionStack, I as SqlRuntimeExtensionDescriptor, J as LintsOptions, K as RuntimeVerifyOptions, L as SqlRuntimeExtensionInstance, M as SqlExecutionStackWithDriver, N as SqlRuntimeAdapterDescriptor, O as GeneratorStability, P as SqlRuntimeAdapterInstance, Q as SqlMiddleware, R as SqlRuntimeTargetDescriptor, S as RuntimeQueryable, T as createRuntime, U as MarkerReader, V as createExecutionContext, W as RuntimeFamilyAdapter, X as BudgetsOptions, Y as lints, Z as budgets, _ as PrepareCallback, a as APP_SPACE_ID, b as Runtime, c as ensureTableStatement, d as BindSiteParams, et as parseContractMarkerRow, f as Declaration, g as ParamsFromDeclaration, h as ParamSpec, i as MarkerStatement, it as validateContractCodecMappings, j as SqlExecutionStack, k as RuntimeMutationDefaultGenerator, l as readContractMarker, m as DeclaredNullable, n as Log, nt as extractCodecIds, o as SqlStatement, p as DeclaredCodecId, q as TelemetryOutcome, r as MarkerReadResult, rt as validateCodecRegistryCompleteness, s as ensureSchemaStatement, t as AfterExecuteResult, tt as lowerSqlPlan, u as writeContractMarker, v as PreparedStatement, w as TransactionContext, x as RuntimeConnection, y as CreateRuntimeOptions, z as SqlStaticContributions } from "./index-B2sP_QGE.mjs";
2
- export { APP_SPACE_ID, AfterExecuteResult, BindSiteParams, BudgetsOptions, CreateRuntimeOptions, Declaration, DeclaredCodecId, DeclaredNullable, ExecutionContext, GeneratorStability, LintsOptions, Log, MarkerReadResult, MarkerReader, MarkerStatement, ParamSpec, ParamsFromDeclaration, PrepareCallback, PreparedStatement, Runtime, RuntimeConnection, RuntimeFamilyAdapter, RuntimeMutationDefaultGenerator, RuntimeParameterizedCodecDescriptor, RuntimeQueryable, RuntimeTelemetryEvent, RuntimeTransaction, RuntimeVerifyOptions, SqlExecutionStack, SqlExecutionStackWithDriver, SqlMiddleware, SqlMiddlewareContext, SqlRuntimeAdapterDescriptor, SqlRuntimeAdapterInstance, SqlRuntimeDriverInstance, SqlRuntimeExtensionDescriptor, SqlRuntimeExtensionInstance, SqlRuntimeTargetDescriptor, SqlStatement, SqlStaticContributions, TelemetryOutcome, TransactionContext, TypeHelperRegistry, budgets, createExecutionContext, createRuntime, createSqlExecutionStack, ensureSchemaStatement, ensureTableStatement, extractCodecIds, lints, lowerSqlPlan, parseContractMarkerRow, readContractMarker, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction, writeContractMarker };
1
+ import { $ as SqlMiddlewareContext, A as RuntimeParameterizedCodecDescriptor, B as TypeHelperRegistry, C as RuntimeTransaction, D as ExecutionContext, E as withTransaction, F as SqlRuntimeDriverInstance, G as RuntimeTelemetryEvent, H as createSqlExecutionStack, I as SqlRuntimeExtensionDescriptor, J as LintsOptions, K as TelemetryOutcome, L as SqlRuntimeExtensionInstance, M as SqlExecutionStackWithDriver, N as SqlRuntimeAdapterDescriptor, O as GeneratorStability, P as SqlRuntimeAdapterInstance, Q as SqlMiddleware, R as SqlRuntimeTargetDescriptor, S as RuntimeQueryable, T as createRuntime, U as MarkerReader, V as createExecutionContext, W as RuntimeFamilyAdapter, X as BudgetsOptions, Y as lints, Z as budgets, _ as PrepareCallback, a as APP_SPACE_ID, b as Runtime, c as ensureTableStatement, d as BindSiteParams, et as parseContractMarkerRow, f as Declaration, g as ParamsFromDeclaration, h as ParamSpec, i as MarkerStatement, it as validateContractCodecMappings, j as SqlExecutionStack, k as RuntimeMutationDefaultGenerator, l as readContractMarker, m as DeclaredNullable, n as Log, nt as extractCodecIds, o as SqlStatement, p as DeclaredCodecId, q as VerifyMarkerOption, r as MarkerReadResult, rt as validateCodecRegistryCompleteness, s as ensureSchemaStatement, t as AfterExecuteResult, tt as lowerSqlPlan, u as writeContractMarker, v as PreparedStatement, w as TransactionContext, x as RuntimeConnection, y as CreateRuntimeOptions, z as SqlStaticContributions } from "./index-BtHe0Ay1.mjs";
2
+ export { APP_SPACE_ID, AfterExecuteResult, BindSiteParams, BudgetsOptions, CreateRuntimeOptions, Declaration, DeclaredCodecId, DeclaredNullable, ExecutionContext, GeneratorStability, LintsOptions, Log, MarkerReadResult, MarkerReader, MarkerStatement, ParamSpec, ParamsFromDeclaration, PrepareCallback, PreparedStatement, Runtime, RuntimeConnection, RuntimeFamilyAdapter, RuntimeMutationDefaultGenerator, RuntimeParameterizedCodecDescriptor, RuntimeQueryable, RuntimeTelemetryEvent, RuntimeTransaction, SqlExecutionStack, SqlExecutionStackWithDriver, SqlMiddleware, SqlMiddlewareContext, SqlRuntimeAdapterDescriptor, SqlRuntimeAdapterInstance, SqlRuntimeDriverInstance, SqlRuntimeExtensionDescriptor, SqlRuntimeExtensionInstance, SqlRuntimeTargetDescriptor, SqlStatement, SqlStaticContributions, TelemetryOutcome, TransactionContext, TypeHelperRegistry, VerifyMarkerOption, budgets, createExecutionContext, createRuntime, createSqlExecutionStack, ensureSchemaStatement, ensureTableStatement, extractCodecIds, lints, lowerSqlPlan, parseContractMarkerRow, readContractMarker, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction, writeContractMarker };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ensureTableStatement, c as createExecutionContext, d as budgets, f as parseContractMarkerRow, g as validateContractCodecMappings, h as validateCodecRegistryCompleteness, i as ensureSchemaStatement, l as createSqlExecutionStack, m as extractCodecIds, n as withTransaction, o as readContractMarker, p as lowerSqlPlan, r as APP_SPACE_ID, s as writeContractMarker, t as createRuntime, u as lints } from "./exports-BsRNNJxU.mjs";
1
+ import { a as ensureTableStatement, c as createExecutionContext, d as budgets, f as parseContractMarkerRow, g as validateContractCodecMappings, h as validateCodecRegistryCompleteness, i as ensureSchemaStatement, l as createSqlExecutionStack, m as extractCodecIds, n as withTransaction, o as readContractMarker, p as lowerSqlPlan, r as APP_SPACE_ID, s as writeContractMarker, t as createRuntime, u as lints } from "./exports-pTQTXnEr.mjs";
2
2
  export { APP_SPACE_ID, budgets, createExecutionContext, createRuntime, createSqlExecutionStack, ensureSchemaStatement, ensureTableStatement, extractCodecIds, lints, lowerSqlPlan, parseContractMarkerRow, readContractMarker, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction, writeContractMarker };
@@ -1,4 +1,4 @@
1
- import { D as ExecutionContext, F as SqlRuntimeDriverInstance, I as SqlRuntimeExtensionDescriptor, L as SqlRuntimeExtensionInstance, N as SqlRuntimeAdapterDescriptor, P as SqlRuntimeAdapterInstance, R as SqlRuntimeTargetDescriptor, T as createRuntime, o as SqlStatement } from "../index-B2sP_QGE.mjs";
1
+ import { D as ExecutionContext, F as SqlRuntimeDriverInstance, I as SqlRuntimeExtensionDescriptor, L as SqlRuntimeExtensionInstance, N as SqlRuntimeAdapterDescriptor, P as SqlRuntimeAdapterInstance, R as SqlRuntimeTargetDescriptor, T as createRuntime, o as SqlStatement } from "../index-BtHe0Ay1.mjs";
2
2
  import { ResultType } from "@prisma-next/framework-components/runtime";
3
3
  import { Adapter, AnyQueryAst, Codec, ContractCodecRegistry, LoweredStatement, SelectAst } from "@prisma-next/sql-relational-core/ast";
4
4
  import * as _$_prisma_next_framework_components_execution0 from "@prisma-next/framework-components/execution";
@@ -1,4 +1,4 @@
1
- import { a as ensureTableStatement, c as createExecutionContext, i as ensureSchemaStatement, l as createSqlExecutionStack, r as APP_SPACE_ID, s as writeContractMarker } from "../exports-BsRNNJxU.mjs";
1
+ import { a as ensureTableStatement, c as createExecutionContext, i as ensureSchemaStatement, l as createSqlExecutionStack, r as APP_SPACE_ID, s as writeContractMarker } from "../exports-pTQTXnEr.mjs";
2
2
  import { runtimeError } from "@prisma-next/framework-components/runtime";
3
3
  import { SelectAst, TableSource } from "@prisma-next/sql-relational-core/ast";
4
4
  import { instantiateExecutionStack } from "@prisma-next/framework-components/execution";
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "name": "@prisma-next/sql-runtime",
3
- "version": "0.11.0-dev.3",
3
+ "version": "0.11.0-dev.5",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "description": "SQL runtime implementation for Prisma Next",
8
8
  "dependencies": {
9
- "@prisma-next/contract": "0.11.0-dev.3",
10
- "@prisma-next/utils": "0.11.0-dev.3",
11
- "@prisma-next/framework-components": "0.11.0-dev.3",
12
- "@prisma-next/ids": "0.11.0-dev.3",
13
- "@prisma-next/operations": "0.11.0-dev.3",
14
- "@prisma-next/sql-contract": "0.11.0-dev.3",
15
- "@prisma-next/sql-operations": "0.11.0-dev.3",
16
- "@prisma-next/sql-relational-core": "0.11.0-dev.3",
9
+ "@prisma-next/contract": "0.11.0-dev.5",
10
+ "@prisma-next/utils": "0.11.0-dev.5",
11
+ "@prisma-next/framework-components": "0.11.0-dev.5",
12
+ "@prisma-next/ids": "0.11.0-dev.5",
13
+ "@prisma-next/operations": "0.11.0-dev.5",
14
+ "@prisma-next/sql-contract": "0.11.0-dev.5",
15
+ "@prisma-next/sql-operations": "0.11.0-dev.5",
16
+ "@prisma-next/sql-relational-core": "0.11.0-dev.5",
17
17
  "arktype": "^2.2.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@prisma-next/test-utils": "0.11.0-dev.3",
21
- "@prisma-next/tsconfig": "0.11.0-dev.3",
20
+ "@prisma-next/test-utils": "0.11.0-dev.5",
21
+ "@prisma-next/tsconfig": "0.11.0-dev.5",
22
22
  "@types/pg": "8.20.0",
23
23
  "pg": "8.20.0",
24
- "@prisma-next/tsdown": "0.11.0-dev.3",
24
+ "@prisma-next/tsdown": "0.11.0-dev.5",
25
25
  "tsdown": "0.22.0",
26
26
  "typescript": "5.9.3",
27
27
  "vitest": "4.1.6"
@@ -29,8 +29,8 @@ export type {
29
29
  MarkerReader,
30
30
  RuntimeFamilyAdapter,
31
31
  RuntimeTelemetryEvent,
32
- RuntimeVerifyOptions,
33
32
  TelemetryOutcome,
33
+ VerifyMarkerOption,
34
34
  } from '../runtime-spi';
35
35
  export type {
36
36
  ExecutionContext,
@@ -2,7 +2,7 @@ import type { ExecutionPlan } from '@prisma-next/framework-components/runtime';
2
2
  import type { MarkerReadResult, SqlQueryable } from '@prisma-next/sql-relational-core/ast';
3
3
 
4
4
  /**
5
- * Reader of the SQL contract marker. SQL runtimes call `readMarker` before executing user queries (when `verify` is enabled). The adapter owns the full marker-read flow — probing for storage, issuing the read, decoding the row — and returns a tagged result so callers can distinguish "marker storage missing", "no row for this space", and "present".
5
+ * Reader of the SQL contract marker. SQL runtimes call `readMarker` before executing user queries (unless `verifyMarker` is false). The adapter owns the full marker-read flow — probing for storage, issuing the read, decoding the row — and returns a tagged result so callers can distinguish "marker storage missing", "no row for this space", and "present".
6
6
  */
7
7
  export interface MarkerReader {
8
8
  readMarker(queryable: SqlQueryable): Promise<MarkerReadResult>;
@@ -22,10 +22,24 @@ export interface RuntimeFamilyAdapter<TContract = unknown> {
22
22
  validatePlan(plan: ExecutionPlan, contract: TContract): void;
23
23
  }
24
24
 
25
- export interface RuntimeVerifyOptions {
26
- readonly mode: 'onFirstUse' | 'startup' | 'always';
27
- readonly requireMarker: boolean;
28
- }
25
+ /**
26
+ * Controls whether the runtime reads and checks the contract marker row on first execute.
27
+ *
28
+ * - `'onFirstUse'` (default when omitted): the marker is read once per runtime lifetime, on the
29
+ * first `execute()` call. Any hash mismatch or absent marker emits a structured `warn`-level log
30
+ * through the runtime's {@link RuntimeLog} and the query proceeds. Subsequent queries skip the
31
+ * marker reader entirely.
32
+ * - `false`: the marker reader is never invoked. No log line is emitted. Use this to opt out of
33
+ * the diagnostic entirely (e.g. during a known deploy-skew window).
34
+ *
35
+ * The string-or-false shape is forward-compatible: future modes such as `'startup'` (eager check
36
+ * inside the wrapper `connect()` step) can be added as additive union members without an API break.
37
+ * `true` is intentionally not permitted — modes are always named.
38
+ *
39
+ * Default-on so contract drift surfaces by default — teams who never thought to enable the diagnostic
40
+ * still see the warning when something goes wrong.
41
+ */
42
+ export type VerifyMarkerOption = 'onFirstUse' | false;
29
43
 
30
44
  export type TelemetryOutcome = 'success' | 'runtime-error';
31
45
 
@@ -61,8 +61,8 @@ import type {
61
61
  import type {
62
62
  RuntimeFamilyAdapter,
63
63
  RuntimeTelemetryEvent,
64
- RuntimeVerifyOptions,
65
64
  TelemetryOutcome,
65
+ VerifyMarkerOption,
66
66
  } from './runtime-spi';
67
67
  import type {
68
68
  ExecutionContext,
@@ -77,7 +77,7 @@ export interface RuntimeOptions<TContract extends Contract<SqlStorage> = Contrac
77
77
  readonly context: ExecutionContext<TContract>;
78
78
  readonly adapter: Adapter<AnyQueryAst, Contract<SqlStorage>, LoweredStatement>;
79
79
  readonly driver: SqlDriver<unknown>;
80
- readonly verify: RuntimeVerifyOptions;
80
+ readonly verifyMarker?: VerifyMarkerOption;
81
81
  readonly middleware?: readonly SqlMiddleware[];
82
82
  readonly mode?: 'strict' | 'permissive';
83
83
  readonly log?: Log;
@@ -96,7 +96,7 @@ export interface CreateRuntimeOptions<
96
96
  >;
97
97
  readonly context: ExecutionContext<TContract>;
98
98
  readonly driver: SqlDriver<unknown>;
99
- readonly verify: RuntimeVerifyOptions;
99
+ readonly verifyMarker?: VerifyMarkerOption;
100
100
  readonly middleware?: readonly SqlMiddleware[];
101
101
  readonly mode?: 'strict' | 'permissive';
102
102
  readonly log?: Log;
@@ -157,7 +157,7 @@ export interface TransactionContext extends RuntimeQueryable {
157
157
  readonly invalidated: boolean;
158
158
  }
159
159
 
160
- export type { RuntimeTelemetryEvent, RuntimeVerifyOptions, TelemetryOutcome };
160
+ export type { RuntimeTelemetryEvent, TelemetryOutcome, VerifyMarkerOption };
161
161
 
162
162
  function isExecutionPlan(plan: SqlExecutionPlan | SqlQueryPlan): plan is SqlExecutionPlan {
163
163
  return 'sql' in plan;
@@ -178,15 +178,15 @@ class SqlRuntimeImpl<TContract extends Contract<SqlStorage> = Contract<SqlStorag
178
178
  private readonly contractCodecs: ContractCodecRegistry;
179
179
  private readonly codecDescriptors: CodecDescriptorRegistry;
180
180
  private readonly sqlCtx: SqlMiddlewareContext;
181
- private readonly verify: RuntimeVerifyOptions;
181
+ private readonly verifyMarkerOption: VerifyMarkerOption;
182
+ // Single-flight gate. Memoises the first verifyMarker() call so concurrent first-queries share one read + one log line. `null` until the first gate hit; pre-resolved when `verifyMarkerOption === false` so the gate becomes a no-op await.
183
+ private verifyMarkerPromise: Promise<void> | null;
182
184
  readonly #preparedStatementHandles = new WeakMap<object, unknown>();
183
185
  private codecRegistryValidated: boolean;
184
- private verified: boolean;
185
- private startupVerified: boolean;
186
186
  private _telemetry: RuntimeTelemetryEvent | null;
187
187
 
188
188
  constructor(options: RuntimeOptions<TContract>) {
189
- const { context, adapter, driver, verify, middleware, mode, log } = options;
189
+ const { context, adapter, driver, verifyMarker, middleware, mode, log } = options;
190
190
 
191
191
  if (middleware) {
192
192
  for (const mw of middleware) {
@@ -213,16 +213,10 @@ class SqlRuntimeImpl<TContract extends Contract<SqlStorage> = Contract<SqlStorag
213
213
  this.contractCodecs = context.contractCodecs;
214
214
  this.codecDescriptors = context.codecDescriptors;
215
215
  this.sqlCtx = sqlCtx;
216
- this.verify = verify;
216
+ this.verifyMarkerOption = verifyMarker ?? 'onFirstUse';
217
217
  this.codecRegistryValidated = false;
218
- this.verified = verify.mode === 'startup' ? false : verify.mode === 'always';
219
- this.startupVerified = false;
218
+ this.verifyMarkerPromise = this.verifyMarkerOption === false ? Promise.resolve() : null;
220
219
  this._telemetry = null;
221
-
222
- if (verify.mode === 'startup') {
223
- validateCodecRegistryCompleteness(this.codecDescriptors, context.contract);
224
- this.codecRegistryValidated = true;
225
- }
226
220
  }
227
221
 
228
222
  /**
@@ -336,22 +330,15 @@ class SqlRuntimeImpl<TContract extends Contract<SqlStorage> = Contract<SqlStorag
336
330
  this.familyAdapter.validatePlan(exec, this.contract);
337
331
  this._telemetry = null;
338
332
 
339
- if (!this.startupVerified && this.verify.mode === 'startup') {
340
- await this.verifyMarker();
341
- }
342
-
343
- if (!this.verified && this.verify.mode === 'onFirstUse') {
344
- await this.verifyMarker();
333
+ if (this.verifyMarkerPromise === null) {
334
+ this.verifyMarkerPromise = this.verifyMarker();
345
335
  }
336
+ await this.verifyMarkerPromise;
346
337
 
347
338
  const startedAt = Date.now();
348
339
  let outcome: TelemetryOutcome | null = null;
349
340
 
350
341
  try {
351
- if (this.verify.mode === 'always') {
352
- await this.verifyMarker();
353
- }
354
-
355
342
  const stream = runWithMiddleware<SqlExecutionPlan, Record<string, unknown>>(
356
343
  exec,
357
344
  this.middleware,
@@ -697,48 +684,35 @@ class SqlRuntimeImpl<TContract extends Contract<SqlStorage> = Contract<SqlStorag
697
684
  private async verifyMarker(): Promise<void> {
698
685
  const readResult = await this.familyAdapter.markerReader.readMarker(this.driver);
699
686
 
700
- if (readResult.kind !== 'present') {
701
- if (this.verify.requireMarker) {
702
- throw runtimeError('CONTRACT.MARKER_MISSING', 'Contract marker not found in database');
703
- }
687
+ const expectedStorageHash = this.contract.storage.storageHash;
688
+ const expectedProfileHash = this.contract.profileHash ?? null;
689
+ const expected = { storageHash: expectedStorageHash, profileHash: expectedProfileHash };
704
690
 
705
- this.verified = true;
691
+ if (readResult.kind !== 'present') {
692
+ this.sqlCtx.log.warn({
693
+ code: 'CONTRACT.MARKER_MISSING',
694
+ scope: 'marker-verification',
695
+ expected,
696
+ actual: null,
697
+ message: 'Contract marker not found in database',
698
+ });
706
699
  return;
707
700
  }
708
701
 
709
702
  const marker = readResult.record;
710
-
711
- const contract = this.contract as {
712
- storage: { storageHash: string };
713
- execution?: { executionHash?: string | null };
714
- profileHash?: string | null;
715
- };
716
-
717
- if (marker.storageHash !== contract.storage.storageHash) {
718
- throw runtimeError(
719
- 'CONTRACT.MARKER_MISMATCH',
720
- 'Database storage hash does not match contract',
721
- {
722
- expected: contract.storage.storageHash,
723
- actual: marker.storageHash,
724
- },
725
- );
703
+ const storageHashMatch = marker.storageHash === expectedStorageHash;
704
+ const profileHashMatch =
705
+ expectedProfileHash === null || marker.profileHash === expectedProfileHash;
706
+
707
+ if (!storageHashMatch || !profileHashMatch) {
708
+ this.sqlCtx.log.warn({
709
+ code: 'CONTRACT.MARKER_MISMATCH',
710
+ scope: 'marker-verification',
711
+ expected,
712
+ actual: { storageHash: marker.storageHash, profileHash: marker.profileHash ?? null },
713
+ message: 'Contract marker hash does not match runtime contract',
714
+ });
726
715
  }
727
-
728
- const expectedProfile = contract.profileHash ?? null;
729
- if (expectedProfile !== null && marker.profileHash !== expectedProfile) {
730
- throw runtimeError(
731
- 'CONTRACT.MARKER_MISMATCH',
732
- 'Database profile hash does not match contract',
733
- {
734
- expectedProfile,
735
- actualProfile: marker.profileHash,
736
- },
737
- );
738
- }
739
-
740
- this.verified = true;
741
- this.startupVerified = true;
742
716
  }
743
717
 
744
718
  private recordTelemetry(
@@ -876,13 +850,13 @@ export async function withTransaction<R>(
876
850
  export function createRuntime<TContract extends Contract<SqlStorage>, TTargetId extends string>(
877
851
  options: CreateRuntimeOptions<TContract, TTargetId>,
878
852
  ): Runtime {
879
- const { stackInstance, context, driver, verify, middleware, mode, log } = options;
853
+ const { stackInstance, context, driver, verifyMarker, middleware, mode, log } = options;
880
854
 
881
855
  return new SqlRuntimeImpl({
882
856
  context,
883
857
  adapter: stackInstance.adapter,
884
858
  driver,
885
- verify,
859
+ ...ifDefined('verifyMarker', verifyMarker),
886
860
  ...ifDefined('middleware', middleware),
887
861
  ...ifDefined('mode', mode),
888
862
  ...ifDefined('log', log),
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-B2sP_QGE.d.mts","names":[],"sources":["../src/codecs/validation.ts","../src/lower-sql-plan.ts","../src/marker.ts","../src/middleware/sql-middleware.ts","../src/middleware/budgets.ts","../src/middleware/lints.ts","../src/runtime-spi.ts","../src/sql-context.ts","../src/sql-runtime.ts","../src/prepared/types.ts","../src/sql-marker.ts"],"mappings":";;;;;;;;;;;;;;;iBAagB,eAAA,CAAgB,QAAA,EAAU,QAAA,CAAS,UAAA,IAAc,GAAA;AAAA,iBA+BjD,6BAAA,CACd,QAAA,EAAU,uBAAA,EACV,QAAA,EAAU,QAAA,CAAS,UAAA;AAAA,iBA4BL,iCAAA,CACd,QAAA,EAAU,uBAAA,EACV,QAAA,EAAU,QAAA,CAAS,UAAA;;;;;;;;;;;;iBC7DL,YAAA,KAAA,CACd,OAAA,EAAS,OAAA,CAAQ,WAAA,EAAa,QAAA,CAAS,UAAA,GAAa,gBAAA,GACpD,QAAA,EAAU,QAAA,CAAS,UAAA,GACnB,SAAA,EAAW,YAAA,CAAa,GAAA,IACvB,gBAAA,CAAiB,GAAA;;;iBCgCJ,sBAAA,CAAuB,GAAA,YAAe,oBAAA;;;UCxCrC,oBAAA,SAA6B,wBAAA;EAAA,SACnC,QAAA,EAAU,QAAA,CAAS,UAAA;AAAA;;;;;UAOb,SAAA;EAAA,SACN,GAAA,EAAK,WAAA;EAAA,SACL,IAAA,EAAM,QAAA;AAAA;AAAA,UAGA,aAAA,mBAAgC,MAAA,oBAA0B,MAAA,2BACjE,iBAAA,CAAkB,gBAAA,EAAkB,kBAAA,CAAmB,SAAA;EAAA,SACtD,QAAA;EHb+B;;;;;;;;;;AA+B1C;;;;;;;;EGCE,aAAA,EAAe,KAAA,EAAO,SAAA,EAAW,GAAA,EAAK,oBAAA,GAAuB,OAAA,CAAQ,SAAA;EHArE;;;;;;AA6BF;;;;;;;;;;;;;;;;;;AC3DA;EEwDE,aAAA,EACE,IAAA,EAAM,gBAAA,EACN,GAAA,EAAK,oBAAA,EACL,MAAA,GAAS,kBAAA,CAAmB,SAAA,WACpB,OAAA;EACV,KAAA,EACE,GAAA,EAAK,MAAA,mBACL,IAAA,EAAM,gBAAA,EACN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