@smart-data-engines/sde 0.1.0-dev.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 (131) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +13 -0
  3. package/README.md +153 -0
  4. package/bin/weather.mjs +32 -0
  5. package/dist/_usage.d.ts +30 -0
  6. package/dist/_usage.js +194 -0
  7. package/dist/_usage.js.map +1 -0
  8. package/dist/bulk.d.ts +9 -0
  9. package/dist/bulk.js +83 -0
  10. package/dist/bulk.js.map +1 -0
  11. package/dist/canonical.d.ts +46 -0
  12. package/dist/canonical.js +150 -0
  13. package/dist/canonical.js.map +1 -0
  14. package/dist/capabilities.d.ts +48 -0
  15. package/dist/capabilities.js +62 -0
  16. package/dist/capabilities.js.map +1 -0
  17. package/dist/cutover.d.ts +36 -0
  18. package/dist/cutover.js +219 -0
  19. package/dist/cutover.js.map +1 -0
  20. package/dist/demo/model.d.ts +28 -0
  21. package/dist/demo/model.js +40 -0
  22. package/dist/demo/model.js.map +1 -0
  23. package/dist/demo/project.d.ts +19 -0
  24. package/dist/demo/project.js +128 -0
  25. package/dist/demo/project.js.map +1 -0
  26. package/dist/demo/weather.d.ts +73 -0
  27. package/dist/demo/weather.js +334 -0
  28. package/dist/demo/weather.js.map +1 -0
  29. package/dist/engines/_clickhouse-connection.d.ts +17 -0
  30. package/dist/engines/_clickhouse-connection.js +182 -0
  31. package/dist/engines/_clickhouse-connection.js.map +1 -0
  32. package/dist/engines/_tls-peer-identity.d.ts +2 -0
  33. package/dist/engines/_tls-peer-identity.js +23 -0
  34. package/dist/engines/_tls-peer-identity.js.map +1 -0
  35. package/dist/engines/_write-fences.d.ts +51 -0
  36. package/dist/engines/_write-fences.js +189 -0
  37. package/dist/engines/_write-fences.js.map +1 -0
  38. package/dist/engines/clickhouse.d.ts +193 -0
  39. package/dist/engines/clickhouse.js +899 -0
  40. package/dist/engines/clickhouse.js.map +1 -0
  41. package/dist/engines/postgres.d.ts +293 -0
  42. package/dist/engines/postgres.js +981 -0
  43. package/dist/engines/postgres.js.map +1 -0
  44. package/dist/errors.d.ts +89 -0
  45. package/dist/errors.js +90 -0
  46. package/dist/errors.js.map +1 -0
  47. package/dist/frozen-verification.d.ts +26 -0
  48. package/dist/frozen-verification.js +67 -0
  49. package/dist/frozen-verification.js.map +1 -0
  50. package/dist/generation.d.ts +34 -0
  51. package/dist/generation.js +81 -0
  52. package/dist/generation.js.map +1 -0
  53. package/dist/groups.d.ts +17 -0
  54. package/dist/groups.js +66 -0
  55. package/dist/groups.js.map +1 -0
  56. package/dist/hashing.d.ts +68 -0
  57. package/dist/hashing.js +146 -0
  58. package/dist/hashing.js.map +1 -0
  59. package/dist/in-place-index.d.ts +43 -0
  60. package/dist/in-place-index.js +272 -0
  61. package/dist/in-place-index.js.map +1 -0
  62. package/dist/index.d.ts +79 -0
  63. package/dist/index.js +64 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/inspection.d.ts +19 -0
  66. package/dist/inspection.js +31 -0
  67. package/dist/inspection.js.map +1 -0
  68. package/dist/internal.d.ts +42 -0
  69. package/dist/internal.js +56 -0
  70. package/dist/internal.js.map +1 -0
  71. package/dist/layout.d.ts +36 -0
  72. package/dist/layout.js +62 -0
  73. package/dist/layout.js.map +1 -0
  74. package/dist/migration.d.ts +197 -0
  75. package/dist/migration.js +592 -0
  76. package/dist/migration.js.map +1 -0
  77. package/dist/model.d.ts +93 -0
  78. package/dist/model.js +313 -0
  79. package/dist/model.js.map +1 -0
  80. package/dist/physical.d.ts +128 -0
  81. package/dist/physical.js +421 -0
  82. package/dist/physical.js.map +1 -0
  83. package/dist/placement.d.ts +157 -0
  84. package/dist/placement.js +651 -0
  85. package/dist/placement.js.map +1 -0
  86. package/dist/provisioning.d.ts +6 -0
  87. package/dist/provisioning.js +45 -0
  88. package/dist/provisioning.js.map +1 -0
  89. package/dist/query.d.ts +68 -0
  90. package/dist/query.js +340 -0
  91. package/dist/query.js.map +1 -0
  92. package/dist/routing.d.ts +25 -0
  93. package/dist/routing.js +35 -0
  94. package/dist/routing.js.map +1 -0
  95. package/dist/schema.d.ts +110 -0
  96. package/dist/schema.js +337 -0
  97. package/dist/schema.js.map +1 -0
  98. package/dist/session.d.ts +195 -0
  99. package/dist/session.js +870 -0
  100. package/dist/session.js.map +1 -0
  101. package/dist/shapes.d.ts +30 -0
  102. package/dist/shapes.js +112 -0
  103. package/dist/shapes.js.map +1 -0
  104. package/dist/staging.d.ts +29 -0
  105. package/dist/staging.js +214 -0
  106. package/dist/staging.js.map +1 -0
  107. package/dist/telemetry.d.ts +468 -0
  108. package/dist/telemetry.js +872 -0
  109. package/dist/telemetry.js.map +1 -0
  110. package/dist/testing/loader.d.ts +38 -0
  111. package/dist/testing/loader.js +86 -0
  112. package/dist/testing/loader.js.map +1 -0
  113. package/dist/testing/memory.d.ts +131 -0
  114. package/dist/testing/memory.js +311 -0
  115. package/dist/testing/memory.js.map +1 -0
  116. package/dist/timestamp.d.ts +20 -0
  117. package/dist/timestamp.js +89 -0
  118. package/dist/timestamp.js.map +1 -0
  119. package/dist/types.d.ts +79 -0
  120. package/dist/types.js +100 -0
  121. package/dist/types.js.map +1 -0
  122. package/dist/verification.d.ts +41 -0
  123. package/dist/verification.js +169 -0
  124. package/dist/verification.js.map +1 -0
  125. package/dist/watermark.d.ts +103 -0
  126. package/dist/watermark.js +170 -0
  127. package/dist/watermark.js.map +1 -0
  128. package/dist/write-fence.d.ts +58 -0
  129. package/dist/write-fence.js +225 -0
  130. package/dist/write-fence.js.map +1 -0
  131. package/package.json +86 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/engines/postgres.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,E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,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,QAAQ,GAAG,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACtD,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,kBAAkB,CAAA;IAChD,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IACnC,8FAA8F;IAC9F,gFAAgF;IAChF,OAAO,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,IAAI,CAAA;AAC3C,CAAC;AAGD,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,WAAW,CACnB,yFAAyF;YACvF,yFAAyF;YACzF,kBAAkB,CACrB,CAAA;IACH,CAAC;AACH,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC/D,CAAC"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Error hierarchy, organised by *when* the problem is detectable.
3
+ *
4
+ * A caller should be able to tell from the class whether the problem is in their declaration (found
5
+ * when the model is built, before anything runs), in the shape of their model against a placement
6
+ * (found when the model is planned, still before traffic), or in the world.
7
+ *
8
+ * `CanonicalError` deliberately lives in `canonical.ts`, which imports nothing from the rest of the
9
+ * package: it is the module a new language port reproduces first, and a self-contained file is easier
10
+ * to port and to audit.
11
+ */
12
+ export declare class SdeError extends Error {
13
+ readonly name: string;
14
+ }
15
+ /**
16
+ * The declared model is not a model.
17
+ *
18
+ * An unmapped type, a reference to an unknown entity, an atomicity declaration naming something that
19
+ * is not an entity. The message names the declaration, never a line inside this library, because the
20
+ * reader has to fix their code and our stack frames do not help them.
21
+ */
22
+ export declare class DeclarationError extends SdeError {
23
+ readonly name = "DeclarationError";
24
+ }
25
+ /**
26
+ * The model is valid but what is being asked of it is not possible under a placement.
27
+ *
28
+ * Raised when the model is planned rather than when the query runs. That distinction is the point:
29
+ * this class of mistake is a design error and belongs in a test run, not in production at the moment
30
+ * a customer triggers that code path.
31
+ */
32
+ export declare class ModelPlanningError extends SdeError {
33
+ readonly name: string;
34
+ }
35
+ /** A local batch refusal, before any batch I/O. */
36
+ export declare class BulkWriteRefused extends ModelPlanningError {
37
+ readonly name = "BulkWriteRefused";
38
+ }
39
+ /**
40
+ * The placement map cannot be trusted or cannot be used.
41
+ *
42
+ * A bad signature, a map produced for a different model version, an unknown contract version. All of
43
+ * these refuse rather than degrade: the map decides where data is written, so guessing at a
44
+ * difference is the one thing that must never happen.
45
+ */
46
+ export declare class MapError extends SdeError {
47
+ readonly name = "MapError";
48
+ }
49
+ /**
50
+ * A backend refused or failed, and the caller has to know.
51
+ *
52
+ * Deliberately not swallowed. Internal problems in this library are swallowed and logged, because a
53
+ * bug of ours must not take down someone's application - but a write that did not happen is not an
54
+ * internal problem, and reporting success for it would be the worst thing this library could do.
55
+ */
56
+ export declare class EngineError extends SdeError {
57
+ readonly name: string;
58
+ }
59
+ /**
60
+ * A signed map older than one already applied against these engines.
61
+ *
62
+ * Its own class rather than a `MapError`, because the document is not wrong - it verifies perfectly,
63
+ * which is exactly the problem. Cryptographic verification is not replay protection and never was:
64
+ * a map for version 3 verifies forever, so replacing the client's file with an older signed one
65
+ * loads cleanly, routes writes to the previous placement, and nothing else here would notice. The
66
+ * fix is a deliberate act with a stated consequence, which the message spells out.
67
+ */
68
+ export declare class MapRolledBack extends SdeError {
69
+ readonly name = "MapRolledBack";
70
+ }
71
+ /**
72
+ * A migration cannot start, or cannot continue, and the reason is structural.
73
+ *
74
+ * Separate from `EngineError` because nothing failed: the map says this group is not being migrated,
75
+ * or an engine cannot take part, or the copy would silently change values. All of them are refusals
76
+ * before a single row moves - which is the whole design of this module, because the cost of finding
77
+ * a problem at chunk four thousand is four thousand chunks of the client's I/O.
78
+ */
79
+ export declare class MigrationRefused extends SdeError {
80
+ readonly name = "MigrationRefused";
81
+ }
82
+ /** An operation conflicts with an active session/connection or transaction owner. */
83
+ export declare class ResourceBusy extends EngineError {
84
+ readonly name: string;
85
+ }
86
+ /** A session or inherited transaction context has ended. */
87
+ export declare class ResourceClosed extends EngineError {
88
+ readonly name: string;
89
+ }
package/dist/errors.js ADDED
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Error hierarchy, organised by *when* the problem is detectable.
3
+ *
4
+ * A caller should be able to tell from the class whether the problem is in their declaration (found
5
+ * when the model is built, before anything runs), in the shape of their model against a placement
6
+ * (found when the model is planned, still before traffic), or in the world.
7
+ *
8
+ * `CanonicalError` deliberately lives in `canonical.ts`, which imports nothing from the rest of the
9
+ * package: it is the module a new language port reproduces first, and a self-contained file is easier
10
+ * to port and to audit.
11
+ */
12
+ export class SdeError extends Error {
13
+ name = 'SdeError';
14
+ }
15
+ /**
16
+ * The declared model is not a model.
17
+ *
18
+ * An unmapped type, a reference to an unknown entity, an atomicity declaration naming something that
19
+ * is not an entity. The message names the declaration, never a line inside this library, because the
20
+ * reader has to fix their code and our stack frames do not help them.
21
+ */
22
+ export class DeclarationError extends SdeError {
23
+ name = 'DeclarationError';
24
+ }
25
+ /**
26
+ * The model is valid but what is being asked of it is not possible under a placement.
27
+ *
28
+ * Raised when the model is planned rather than when the query runs. That distinction is the point:
29
+ * this class of mistake is a design error and belongs in a test run, not in production at the moment
30
+ * a customer triggers that code path.
31
+ */
32
+ export class ModelPlanningError extends SdeError {
33
+ name = 'ModelPlanningError';
34
+ }
35
+ /** A local batch refusal, before any batch I/O. */
36
+ export class BulkWriteRefused extends ModelPlanningError {
37
+ name = 'BulkWriteRefused';
38
+ }
39
+ /**
40
+ * The placement map cannot be trusted or cannot be used.
41
+ *
42
+ * A bad signature, a map produced for a different model version, an unknown contract version. All of
43
+ * these refuse rather than degrade: the map decides where data is written, so guessing at a
44
+ * difference is the one thing that must never happen.
45
+ */
46
+ export class MapError extends SdeError {
47
+ name = 'MapError';
48
+ }
49
+ /**
50
+ * A backend refused or failed, and the caller has to know.
51
+ *
52
+ * Deliberately not swallowed. Internal problems in this library are swallowed and logged, because a
53
+ * bug of ours must not take down someone's application - but a write that did not happen is not an
54
+ * internal problem, and reporting success for it would be the worst thing this library could do.
55
+ */
56
+ export class EngineError extends SdeError {
57
+ name = 'EngineError';
58
+ }
59
+ /**
60
+ * A signed map older than one already applied against these engines.
61
+ *
62
+ * Its own class rather than a `MapError`, because the document is not wrong - it verifies perfectly,
63
+ * which is exactly the problem. Cryptographic verification is not replay protection and never was:
64
+ * a map for version 3 verifies forever, so replacing the client's file with an older signed one
65
+ * loads cleanly, routes writes to the previous placement, and nothing else here would notice. The
66
+ * fix is a deliberate act with a stated consequence, which the message spells out.
67
+ */
68
+ export class MapRolledBack extends SdeError {
69
+ name = 'MapRolledBack';
70
+ }
71
+ /**
72
+ * A migration cannot start, or cannot continue, and the reason is structural.
73
+ *
74
+ * Separate from `EngineError` because nothing failed: the map says this group is not being migrated,
75
+ * or an engine cannot take part, or the copy would silently change values. All of them are refusals
76
+ * before a single row moves - which is the whole design of this module, because the cost of finding
77
+ * a problem at chunk four thousand is four thousand chunks of the client's I/O.
78
+ */
79
+ export class MigrationRefused extends SdeError {
80
+ name = 'MigrationRefused';
81
+ }
82
+ /** An operation conflicts with an active session/connection or transaction owner. */
83
+ export class ResourceBusy extends EngineError {
84
+ name = 'ResourceBusy';
85
+ }
86
+ /** A session or inherited transaction context has ended. */
87
+ export class ResourceClosed extends EngineError {
88
+ name = 'ResourceClosed';
89
+ }
90
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACf,IAAI,GAAW,UAAU,CAAA;CAC5C;AAED;;;;;;GAMG;AACH,MAAM,OAAO,gBAAiB,SAAQ,QAAQ;IAC1B,IAAI,GAAG,kBAAkB,CAAA;CAC5C;AAED;;;;;;GAMG;AACH,MAAM,OAAO,kBAAmB,SAAQ,QAAQ;IAC5B,IAAI,GAAW,oBAAoB,CAAA;CACtD;AAED,mDAAmD;AACnD,MAAM,OAAO,gBAAiB,SAAQ,kBAAkB;IACpC,IAAI,GAAG,kBAAkB,CAAA;CAC5C;AAED;;;;;;GAMG;AACH,MAAM,OAAO,QAAS,SAAQ,QAAQ;IAClB,IAAI,GAAG,UAAU,CAAA;CACpC;AAED;;;;;;GAMG;AACH,MAAM,OAAO,WAAY,SAAQ,QAAQ;IACrB,IAAI,GAAW,aAAa,CAAA;CAC/C;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,QAAQ;IACvB,IAAI,GAAG,eAAe,CAAA;CACzC;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,gBAAiB,SAAQ,QAAQ;IAC1B,IAAI,GAAG,kBAAkB,CAAA;CAC5C;AAGD,qFAAqF;AACrF,MAAM,OAAO,YAAa,SAAQ,WAAW;IAAqB,IAAI,GAAW,cAAc,CAAA;CAAE;AACjG,4DAA4D;AAC5D,MAAM,OAAO,cAAe,SAAQ,WAAW;IAAqB,IAAI,GAAW,gBAAgB,CAAA;CAAE"}
@@ -0,0 +1,26 @@
1
+ import type { InspectionContext } from './inspection.js';
2
+ import { type VerifyReport } from './migration.js';
3
+ import type { VerificationRequest } from './verification.js';
4
+ export interface FrozenTable {
5
+ readonly engine: string;
6
+ readonly materialization: string;
7
+ readonly table: string;
8
+ readonly identity: string;
9
+ readonly project_id: string;
10
+ readonly epoch: number;
11
+ readonly hold_id: string;
12
+ }
13
+ export interface FrozenVerifyReport {
14
+ readonly comparison: VerifyReport;
15
+ readonly barriers: readonly FrozenTable[];
16
+ readonly elapsedMs: number;
17
+ readonly matched: boolean;
18
+ }
19
+ export declare function frozenVerifyRecord(report: FrozenVerifyReport): Record<string, unknown>;
20
+ export declare function verifyFrozen(context: InspectionContext, group: string, options: {
21
+ readonly request: VerificationRequest;
22
+ readonly holdId: string;
23
+ readonly epochs: Readonly<Record<string, number>>;
24
+ readonly chunkRows?: number;
25
+ readonly at?: string;
26
+ }): Promise<FrozenVerifyReport>;
@@ -0,0 +1,67 @@
1
+ /** Drain native barriers and compare stable copies. Leaves holds installed; does not activate a map. */
2
+ import { compareCodePoints } from './canonical.js';
3
+ import { MigrationRefused } from './errors.js';
4
+ import { checkEpoch } from './generation.js';
5
+ import { CHUNK_ROWS, verify, verifyRecord } from './migration.js';
6
+ export function frozenVerifyRecord(report) {
7
+ return { protocol: 1, comparison: verifyRecord(report.comparison), barriers: report.barriers,
8
+ elapsed_ms: report.elapsedMs, matched: report.matched };
9
+ }
10
+ function matches(state, wanted) {
11
+ if (state.identity !== wanted.identity || state.projectId !== wanted.project_id) {
12
+ throw new MigrationRefused('a frozen comparison table changed identity or project');
13
+ }
14
+ if (!state.complete || state.epoch !== wanted.epoch || !state.holds.includes(wanted.hold_id)) {
15
+ throw new MigrationRefused('a frozen comparison lost its named barrier or write generation');
16
+ }
17
+ }
18
+ export async function verifyFrozen(context, group, options) {
19
+ // Capture caller-owned options before the first asynchronous metadata operation.
20
+ const { request, holdId, at } = options;
21
+ if (typeof holdId !== 'string' || !/^[0-9a-f]{32}$/.test(holdId)) {
22
+ throw new MigrationRefused('a frozen comparison hold id must be 32 lowercase hexadecimal digits');
23
+ }
24
+ const chunkRows = options.chunkRows ?? CHUNK_ROWS;
25
+ if (chunkRows < 1)
26
+ throw new MigrationRefused('a frozen comparison needs a positive chunk size');
27
+ request.checkSession(context.placement, context.projectId, group);
28
+ if (at !== undefined)
29
+ request.checkTime(at);
30
+ const spot = context.placement.groups[group];
31
+ const materials = [spot.source, ...spot.alsoWrite];
32
+ const ids = materials.map((material) => material.id).sort(compareCodePoints);
33
+ if (spot.alsoWrite.length === 0 || JSON.stringify(Object.keys(options.epochs).sort(compareCodePoints)) !== JSON.stringify(ids)) {
34
+ throw new MigrationRefused('frozen comparison epochs must name exactly the source and copy ids');
35
+ }
36
+ const epochs = Object.fromEntries(Object.entries(options.epochs).map(([name, epoch]) => [name, checkEpoch(epoch)]));
37
+ const planned = [];
38
+ for (const material of [...materials].sort((a, b) => compareCodePoints(a.engine, b.engine) || compareCodePoints(a.id, b.id))) {
39
+ const engine = context.engineNamed(material.engine);
40
+ if (typeof engine.writeFence !== 'function' || typeof engine.validateSchema !== 'function') {
41
+ throw new MigrationRefused('frozen comparison requires native write fences and schema checks');
42
+ }
43
+ await engine.validateSchema(material.layout);
44
+ for (const table of Object.values(material.layout.tables).sort(compareCodePoints)) {
45
+ const fence = engine.writeFence(table, { projectId: context.projectId });
46
+ const state = await fence.state(), epoch = epochs[material.id];
47
+ if (state.retired.includes(holdId))
48
+ throw new MigrationRefused('a frozen comparison cannot reuse a retired barrier id');
49
+ if (!state.complete || state.epoch !== epoch) {
50
+ throw new MigrationRefused('a frozen comparison table is not at the expected write generation');
51
+ }
52
+ planned.push({ fence, wanted: Object.freeze({ engine: material.engine, materialization: material.id,
53
+ table, identity: state.identity, project_id: context.projectId, epoch, hold_id: holdId }) });
54
+ }
55
+ }
56
+ const start = performance.now();
57
+ for (const { fence, wanted } of planned)
58
+ matches(await fence.freeze(holdId), wanted);
59
+ const comparison = await verify(context, group, { request: request, chunkRows,
60
+ ...(at === undefined ? {} : { at: at }) });
61
+ for (const { fence, wanted } of planned)
62
+ matches(await fence.state(), wanted);
63
+ return Object.freeze({ comparison, barriers: Object.freeze(planned.map((entry) => entry.wanted)),
64
+ elapsedMs: Math.floor(performance.now() - start),
65
+ matched: comparison.matched && comparison.rowsSource === comparison.rowsTarget });
66
+ }
67
+ //# sourceMappingURL=frozen-verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frozen-verification.js","sourceRoot":"","sources":["../src/frozen-verification.ts"],"names":[],"mappings":"AAAA,wGAAwG;AAC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UAAU,KAAK,UAAU,CAAC,UAAU,EAAE,CAAC,CAAA;AACrF,CAAC"}
@@ -0,0 +1,34 @@
1
+ export declare const DRAIN_TABLE = "__sde_fence_drains";
2
+ export declare const EPOCH_COLUMN = "__sde_write_epoch";
3
+ export declare const MAX_EPOCH = 9007199254740991;
4
+ /** The placement map contract that introduced `project_id` and per-group `write_epoch`. */
5
+ export declare const GENERATIONS_SINCE = 4;
6
+ export declare function checkEpoch(epoch: number): number;
7
+ import type { LogicalModel } from './model.js';
8
+ import type { PhysicalFinding } from './physical.js';
9
+ import { type PhysicalLayout, type PlacementMap } from './placement.js';
10
+ import type { Engine, Row } from './session.js';
11
+ import type { WriteFence } from './write-fence.js';
12
+ export interface Fencable {
13
+ writeFence(table: string, options: {
14
+ projectId: string;
15
+ }): WriteFence;
16
+ /**
17
+ * Refuses missing columns and types; returns how tables differ from the declared physical
18
+ * design when `keys` are given. `void` is accepted from an adapter written before findings.
19
+ */
20
+ validateSchema(layout: PhysicalLayout, options?: {
21
+ readonly keys?: Readonly<Record<string, readonly string[]>>;
22
+ }): Promise<readonly PhysicalFinding[] | void>;
23
+ }
24
+ export declare function checkMapProject(placement: PlacementMap, projectId: string | undefined): string | undefined;
25
+ /**
26
+ * Check generations and columns; return how tables differ from the declared physical design.
27
+ *
28
+ * The physical design is reported rather than refused: a running application must not stop because
29
+ * a table's sort key or index differs from the map (requirement 3.6). Columns, types and
30
+ * generations still refuse.
31
+ */
32
+ export declare function validateGenerations(model: LogicalModel, placement: PlacementMap, engines: Readonly<Record<string, Engine>>, projectId: string | undefined): Promise<readonly PhysicalFinding[]>;
33
+ export declare function stampValues(placement: PlacementMap, group: string, values: Readonly<Row>): Readonly<Row>;
34
+ export declare function logicalRow(placement: PlacementMap, row: Row | null): Row | null;
@@ -0,0 +1,81 @@
1
+ /** Wire vocabulary shared by placement maps and native write barriers. */
2
+ import { MigrationRefused } from './errors.js';
3
+ export const DRAIN_TABLE = '__sde_fence_drains';
4
+ export const EPOCH_COLUMN = '__sde_write_epoch';
5
+ export const MAX_EPOCH = 9_007_199_254_740_991;
6
+ /** The placement map contract that introduced `project_id` and per-group `write_epoch`. */
7
+ export const GENERATIONS_SINCE = 4;
8
+ export function checkEpoch(epoch) {
9
+ if (!Number.isSafeInteger(epoch) || epoch < 1) {
10
+ throw new MigrationRefused('write epoch must be a positive safe integer');
11
+ }
12
+ return epoch;
13
+ }
14
+ import { fingerprintOf } from './placement.js';
15
+ export function checkMapProject(placement, projectId) {
16
+ if (placement.contract < 4)
17
+ return undefined;
18
+ if (projectId === undefined || projectId !== placement.projectId) {
19
+ throw new MigrationRefused('this generation-bearing map needs its locally configured project_id; ' +
20
+ 'do not learn that identity from the supplied map');
21
+ }
22
+ if (fingerprintOf(placement) === undefined) {
23
+ throw new MigrationRefused('generation-bearing sessions need an immutable loaded placement map');
24
+ }
25
+ return projectId;
26
+ }
27
+ /**
28
+ * Check generations and columns; return how tables differ from the declared physical design.
29
+ *
30
+ * The physical design is reported rather than refused: a running application must not stop because
31
+ * a table's sort key or index differs from the map (requirement 3.6). Columns, types and
32
+ * generations still refuse.
33
+ */
34
+ export async function validateGenerations(model, placement, engines, projectId) {
35
+ if (placement.contract < GENERATIONS_SINCE)
36
+ return [];
37
+ const findings = [];
38
+ const project = checkMapProject(placement, projectId);
39
+ if (model.version !== placement.modelVersion) {
40
+ throw new MigrationRefused('the generation-bearing map names another session model');
41
+ }
42
+ for (const name of Object.keys(placement.groups).sort()) {
43
+ const spot = placement.groups[name];
44
+ for (const material of [spot.source, ...spot.derived]) {
45
+ const engine = engines[material.engine];
46
+ if (typeof engine?.writeFence !== 'function' || typeof engine.validateSchema !== 'function') {
47
+ throw new MigrationRefused(`engine ${material.engine} does not implement write generations`);
48
+ }
49
+ const keys = {};
50
+ for (const entity of Object.keys(material.layout.tables)) {
51
+ const spec = model.entities.find((candidate) => candidate.name === entity);
52
+ if (spec !== undefined)
53
+ keys[entity] = spec.key;
54
+ }
55
+ findings.push(...((await engine.validateSchema(material.layout, { keys })) ?? []));
56
+ for (const table of Object.values(material.layout.tables).sort()) {
57
+ const state = await engine.writeFence(table, { projectId: project }).state();
58
+ if (!state.complete || state.epoch !== spot.writeEpoch) {
59
+ throw new MigrationRefused(`the write generation for ${name} is not active in ${material.engine}; ` +
60
+ 'provision the signed map or load the current map before opening a session');
61
+ }
62
+ }
63
+ }
64
+ }
65
+ return findings;
66
+ }
67
+ export function stampValues(placement, group, values) {
68
+ const epoch = placement.groups[group]?.writeEpoch;
69
+ if (epoch === undefined)
70
+ return values;
71
+ if (EPOCH_COLUMN in values)
72
+ throw new MigrationRefused('the write-epoch column is reserved for the SDK');
73
+ return { ...values, [EPOCH_COLUMN]: epoch };
74
+ }
75
+ export function logicalRow(placement, row) {
76
+ if (placement.contract >= 4 && row !== null) {
77
+ return Object.fromEntries(Object.entries(row).filter(([key]) => key !== EPOCH_COLUMN));
78
+ }
79
+ return row;
80
+ }
81
+ //# sourceMappingURL=generation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation.js","sourceRoot":"","sources":["../src/generation.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAA;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAA;AAC/C,MAAM,CAAC,MAAM,SAAS,GAAG,qBAAqB,CAAA;AAC9C,2FAA2F;AAC3F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAA;AAClC,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,gBAAgB,CAAC,6CAA6C,CAAC,CAAA;IAC3E,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAID,OAAO,EAAE,aAAa,EAA0C,MAA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,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAuB,EAAE,KAAa,EAAE,MAAqB;IACvF,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,UAAU,CAAA;IACjD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,MAAM,CAAA;IACtC,IAAI,YAAY,IAAI,MAAM;QAAE,MAAM,IAAI,gBAAgB,CAAC,gDAAgD,CAAC,CAAA;IACxG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,CAAA;AAC7C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,SAAuB,EAAE,GAAe;IACjE,IAAI,SAAS,CAAC,QAAQ,IAAI,CAAC,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,YAAY,CAAC,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Colocation groups: the unit of placement.
3
+ *
4
+ * Entities queried together, or declared to change together, live in the same engine. A group is a
5
+ * connected component of the graph whose edges are relations and declared atomicity.
6
+ *
7
+ * The argument for why relation-as-edge does not collapse a normalised model into a single group is
8
+ * in the Python implementation and in the format contract. It is not repeated here: a second copy of
9
+ * an argument is a second thing that has to stay true.
10
+ */
11
+ import type { LogicalModel } from './model.js';
12
+ export interface Group {
13
+ readonly name: string;
14
+ readonly members: readonly string[];
15
+ }
16
+ export declare function colocationGroups(model: LogicalModel): readonly Group[];
17
+ export declare function groupOf(groups: readonly Group[], entity: string): Group;
package/dist/groups.js ADDED
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Colocation groups: the unit of placement.
3
+ *
4
+ * Entities queried together, or declared to change together, live in the same engine. A group is a
5
+ * connected component of the graph whose edges are relations and declared atomicity.
6
+ *
7
+ * The argument for why relation-as-edge does not collapse a normalised model into a single group is
8
+ * in the Python implementation and in the format contract. It is not repeated here: a second copy of
9
+ * an argument is a second thing that has to stay true.
10
+ */
11
+ import { compareCodePoints } from './canonical.js';
12
+ import { ModelPlanningError } from './errors.js';
13
+ export function colocationGroups(model) {
14
+ const names = model.entities.map((e) => e.name).sort(compareCodePoints);
15
+ const parent = new Map();
16
+ for (const name of names)
17
+ parent.set(name, name);
18
+ const find = (x) => {
19
+ let cur = x;
20
+ while (parent.get(cur) !== cur) {
21
+ const next = parent.get(cur);
22
+ parent.set(cur, parent.get(next));
23
+ cur = parent.get(cur);
24
+ }
25
+ return cur;
26
+ };
27
+ const union = (a, b) => {
28
+ const ra = find(a);
29
+ const rb = find(b);
30
+ if (ra === rb)
31
+ return;
32
+ // Attach to the smaller root so a component's representative never depends on visit order.
33
+ const [small, large] = compareCodePoints(ra, rb) <= 0 ? [ra, rb] : [rb, ra];
34
+ parent.set(large, small);
35
+ };
36
+ for (const relation of model.relations)
37
+ union(relation.source, relation.target);
38
+ for (const group of model.atomic) {
39
+ const first = group[0];
40
+ for (const other of group.slice(1))
41
+ union(first, other);
42
+ }
43
+ const buckets = new Map();
44
+ for (const name of names) {
45
+ const root = find(name);
46
+ const bucket = buckets.get(root);
47
+ if (bucket)
48
+ bucket.push(name);
49
+ else
50
+ buckets.set(root, [name]);
51
+ }
52
+ return [...buckets.values()]
53
+ .map((members) => {
54
+ const sorted = [...members].sort(compareCodePoints);
55
+ return { name: sorted[0], members: sorted };
56
+ })
57
+ .sort((a, b) => compareCodePoints(a.name, b.name));
58
+ }
59
+ export function groupOf(groups, entity) {
60
+ const found = groups.find((g) => g.members.includes(entity));
61
+ if (!found) {
62
+ throw new ModelPlanningError(`${entity} is not in any group, which means it is not in the model`);
63
+ }
64
+ return found;
65
+ }
66
+ //# sourceMappingURL=groups.js.map
@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