@sekiban/dcb-runtime 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -1
- package/dist/allocator/AllocatorDurableObject.js +25 -2
- package/dist/bootstrap/BootstrapCoordinatorDurableObject.d.ts +2 -0
- package/dist/bootstrap/BootstrapCoordinatorDurableObject.js +64 -1
- package/dist/bootstrap/OperatorBootstrap.d.ts +5 -1
- package/dist/bootstrap/OperatorBootstrap.js +17 -10
- package/dist/bootstrap/types.d.ts +6 -0
- package/dist/cli/OperatorRepairCli.d.ts +6 -1
- package/dist/cli/OperatorRepairCli.js +26 -6
- package/dist/cloudflare.d.ts +5 -0
- package/dist/cloudflare.js +1567 -465
- package/dist/commit/CommitWorker.d.ts +19 -0
- package/dist/commit/CommitWorker.js +176 -27
- package/dist/completeness/IncidentLifecycle.d.ts +75 -0
- package/dist/completeness/IncidentLifecycle.js +503 -0
- package/dist/completeness/types.d.ts +67 -0
- package/dist/cosmos.d.ts +34 -4
- package/dist/cosmos.js +214 -49
- package/dist/downstream/OutboxDrain.d.ts +4 -1
- package/dist/downstream/OutboxDrain.js +24 -2
- package/dist/generated/cosmos-layout.d.ts +87 -0
- package/dist/generated/cosmos-layout.js +99 -0
- package/dist/http/ConfiguredBearer.d.ts +12 -0
- package/dist/http/ConfiguredBearer.js +33 -0
- package/dist/http/IncidentMaintenance.d.ts +8 -0
- package/dist/http/IncidentMaintenance.js +124 -0
- package/dist/http/SerializedQueryWorker.js +37 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1627 -465
- package/dist/read/SerializedReadWorker.d.ts +3 -0
- package/dist/read/SerializedReadWorker.js +3 -3
- package/dist/shard/ShardRotation.d.ts +48 -0
- package/dist/shard/ShardRotation.js +120 -0
- package/dist/store/CosmosEventStore.js +56 -46
- package/dist/store/PostgresEventStore.d.ts +20 -0
- package/dist/store/PostgresEventStore.js +53 -0
- package/dist/store/provider.d.ts +4 -0
- package/dist/tag/TagDurableObject.js +66 -14
- package/dist/tag/TagSqlSchema.d.ts +6 -1
- package/dist/tag/TagSqlSchema.js +15 -0
- package/dist/tag/types.d.ts +9 -0
- package/dist/trace/CommitTrace.d.ts +3 -3
- package/dist/trace/CommitTraceVerifier.js +1 -1
- package/package.json +6 -15
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* still in development and the operator ruling for G43 is to reset those test
|
|
9
9
|
* records rather than introduce a mixed-format or rollback protocol.
|
|
10
10
|
*/
|
|
11
|
-
export declare const TAG_SQL_SCHEMA_DDL = "\n PRAGMA foreign_keys = ON;\n\n CREATE TABLE IF NOT EXISTS tag_identity (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n tag TEXT NOT NULL UNIQUE,\n created_at TEXT NOT NULL\n );\n\n CREATE TABLE IF NOT EXISTS tag_control (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n schema_version INTEGER NOT NULL CHECK (schema_version = 3),\n head_suid TEXT NOT NULL,\n clock_offset_ms INTEGER NOT NULL,\n clock_now_ms INTEGER,\n version INTEGER NOT NULL,\n repair_owner TEXT,\n repair_lease_until INTEGER,\n highest_repair_epoch INTEGER NOT NULL,\n repair_scope_version INTEGER NOT NULL,\n created_at TEXT NOT NULL,\n updated_at TEXT NOT NULL,\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n\n CREATE TABLE IF NOT EXISTS tag_reservation (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n reservation_token TEXT NOT NULL UNIQUE,\n expected_head TEXT NOT NULL,\n expires_at INTEGER NOT NULL,\n alarm_due_at INTEGER NOT NULL,\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n CREATE INDEX IF NOT EXISTS tag_reservation_due_idx ON tag_reservation(alarm_due_at);\n\n CREATE TABLE IF NOT EXISTS tag_epoch (\n attempt_id TEXT PRIMARY KEY,\n highest_epoch INTEGER NOT NULL,\n sealed_epoch INTEGER,\n confirmation_epoch INTEGER\n );\n\n CREATE TABLE IF NOT EXISTS tag_tombstone (\n attempt_id TEXT PRIMARY KEY,\n epoch INTEGER NOT NULL\n );\n\n CREATE TABLE IF NOT EXISTS tag_event (\n service_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n suid TEXT NOT NULL,\n payload TEXT NOT NULL,\n event_tags_json TEXT NOT NULL,\n allocator_lineage_id TEXT NOT NULL,\n event_type TEXT NOT NULL,\n provenance TEXT NOT NULL CHECK (provenance = 'g32'),\n timestamp TEXT NOT NULL,\n event_json TEXT NOT NULL,\n PRIMARY KEY (service_id, event_id),\n UNIQUE (suid)\n );\n CREATE INDEX IF NOT EXISTS tag_event_suid_idx ON tag_event(suid);\n CREATE INDEX IF NOT EXISTS tag_event_attempt_idx ON tag_event(attempt_id, event_id);\n\n CREATE TABLE IF NOT EXISTS tag_head (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n service_id TEXT NOT NULL,\n head_suid TEXT NOT NULL,\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n\n CREATE TABLE IF NOT EXISTS tag_committed_membership (\n service_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n tag TEXT NOT NULL,\n committed_at TEXT NOT NULL,\n PRIMARY KEY (service_id, event_id, tag),\n FOREIGN KEY (service_id, event_id)\n REFERENCES tag_event(service_id, event_id) ON DELETE RESTRICT,\n FOREIGN KEY (tag) REFERENCES tag_identity(tag) ON DELETE RESTRICT\n );\n CREATE INDEX IF NOT EXISTS tag_committed_membership_tag_idx\n ON tag_committed_membership(tag, service_id, event_id);\n\n CREATE TABLE IF NOT EXISTS tag_outbox_obligation (\n obligation_sequence INTEGER PRIMARY KEY AUTOINCREMENT,\n service_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n suid TEXT NOT NULL,\n payload TEXT NOT NULL,\n allocator_lineage_id TEXT NOT NULL,\n event_type TEXT NOT NULL,\n provenance TEXT NOT NULL CHECK (provenance = 'g32'),\n timestamp TEXT NOT NULL,\n canonical_bytes BLOB NOT NULL,\n event_digest TEXT NOT NULL,\n declared_tag_set_json TEXT NOT NULL,\n local_committed_membership_json TEXT NOT NULL,\n status TEXT NOT NULL CHECK (status IN ('pending', 'acknowledged', 'poison')),\n next_attempt_at INTEGER NOT NULL,\n attempt_count INTEGER NOT NULL DEFAULT 0,\n enqueued_at INTEGER,\n acknowledged_at INTEGER,\n last_error TEXT,\n UNIQUE (service_id, event_id, attempt_id),\n FOREIGN KEY (service_id, event_id)\n REFERENCES tag_event(service_id, event_id) ON DELETE RESTRICT\n );\n CREATE INDEX IF NOT EXISTS tag_outbox_obligation_due_idx\n ON tag_outbox_obligation(status, next_attempt_at, obligation_sequence);\n\n CREATE TABLE IF NOT EXISTS tag_source_partition_registration (\n service_id TEXT NOT NULL,\n partition_tag TEXT NOT NULL,\n last_obligation_sequence INTEGER NOT NULL,\n status TEXT NOT NULL CHECK (status IN ('pending', 'registered')),\n next_attempt_at INTEGER,\n attempt_count INTEGER NOT NULL DEFAULT 0,\n last_error TEXT,\n PRIMARY KEY (service_id, partition_tag)\n );\n CREATE INDEX IF NOT EXISTS tag_source_partition_registration_due_idx\n ON tag_source_partition_registration(status, next_attempt_at, service_id, partition_tag);\n\n CREATE TABLE IF NOT EXISTS tag_commit_receipt (\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n committed_at TEXT NOT NULL,\n committed_event_count INTEGER NOT NULL,\n head_suid TEXT NOT NULL,\n reservation_confirmed INTEGER NOT NULL CHECK (reservation_confirmed IN (0, 1)),\n PRIMARY KEY (attempt_id, epoch)\n );\n\n CREATE TABLE IF NOT EXISTS tag_fence (\n reason TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n PRIMARY KEY (reason, attempt_id)\n );\n\n CREATE TABLE IF NOT EXISTS tag_cleared_fence (\n reason TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n PRIMARY KEY (reason, attempt_id)\n );\n\n CREATE TABLE IF NOT EXISTS tag_bootstrap_admission (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n import_id TEXT NOT NULL,\n lease_epoch INTEGER NOT NULL,\n manifest_digest TEXT NOT NULL,\n target_service_id TEXT NOT NULL,\n closed INTEGER NOT NULL CHECK (closed IN (0, 1)),\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n\n CREATE TABLE IF NOT EXISTS tag_repair_scope (\n attempt_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n item_json TEXT NOT NULL,\n PRIMARY KEY (attempt_id, event_id)\n );\n";
|
|
11
|
+
export declare const TAG_SQL_SCHEMA_DDL = "\n PRAGMA foreign_keys = ON;\n\n CREATE TABLE IF NOT EXISTS tag_identity (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n tag TEXT NOT NULL UNIQUE,\n created_at TEXT NOT NULL\n );\n\n CREATE TABLE IF NOT EXISTS tag_control (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n schema_version INTEGER NOT NULL CHECK (schema_version = 3),\n head_suid TEXT NOT NULL,\n clock_offset_ms INTEGER NOT NULL,\n clock_now_ms INTEGER,\n version INTEGER NOT NULL,\n repair_owner TEXT,\n repair_lease_until INTEGER,\n highest_repair_epoch INTEGER NOT NULL,\n repair_scope_version INTEGER NOT NULL,\n created_at TEXT NOT NULL,\n updated_at TEXT NOT NULL,\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n\n CREATE TABLE IF NOT EXISTS tag_reservation (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n reservation_token TEXT NOT NULL UNIQUE,\n expected_head TEXT NOT NULL,\n expires_at INTEGER NOT NULL,\n alarm_due_at INTEGER NOT NULL,\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n CREATE INDEX IF NOT EXISTS tag_reservation_due_idx ON tag_reservation(alarm_due_at);\n\n CREATE TABLE IF NOT EXISTS tag_epoch (\n attempt_id TEXT PRIMARY KEY,\n highest_epoch INTEGER NOT NULL,\n sealed_epoch INTEGER,\n confirmation_epoch INTEGER\n );\n\n CREATE TABLE IF NOT EXISTS tag_tombstone (\n attempt_id TEXT PRIMARY KEY,\n epoch INTEGER NOT NULL\n );\n\n CREATE TABLE IF NOT EXISTS tag_event (\n service_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n suid TEXT NOT NULL,\n payload TEXT NOT NULL,\n event_tags_json TEXT NOT NULL,\n allocator_lineage_id TEXT NOT NULL,\n event_type TEXT NOT NULL,\n provenance TEXT NOT NULL CHECK (provenance = 'g32'),\n timestamp TEXT NOT NULL,\n event_json TEXT NOT NULL,\n PRIMARY KEY (service_id, event_id),\n UNIQUE (suid)\n );\n CREATE INDEX IF NOT EXISTS tag_event_suid_idx ON tag_event(suid);\n CREATE INDEX IF NOT EXISTS tag_event_attempt_idx ON tag_event(attempt_id, event_id);\n\n CREATE TABLE IF NOT EXISTS tag_head (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n service_id TEXT NOT NULL,\n head_suid TEXT NOT NULL,\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n\n CREATE TABLE IF NOT EXISTS tag_committed_membership (\n service_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n tag TEXT NOT NULL,\n committed_at TEXT NOT NULL,\n PRIMARY KEY (service_id, event_id, tag),\n FOREIGN KEY (service_id, event_id)\n REFERENCES tag_event(service_id, event_id) ON DELETE RESTRICT,\n FOREIGN KEY (tag) REFERENCES tag_identity(tag) ON DELETE RESTRICT\n );\n CREATE INDEX IF NOT EXISTS tag_committed_membership_tag_idx\n ON tag_committed_membership(tag, service_id, event_id);\n\n CREATE TABLE IF NOT EXISTS tag_outbox_obligation (\n obligation_sequence INTEGER PRIMARY KEY AUTOINCREMENT,\n service_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n suid TEXT NOT NULL,\n payload TEXT NOT NULL,\n allocator_lineage_id TEXT NOT NULL,\n event_type TEXT NOT NULL,\n provenance TEXT NOT NULL CHECK (provenance = 'g32'),\n timestamp TEXT NOT NULL,\n canonical_bytes BLOB NOT NULL,\n event_digest TEXT NOT NULL,\n declared_tag_set_json TEXT NOT NULL,\n local_committed_membership_json TEXT NOT NULL,\n status TEXT NOT NULL CHECK (status IN ('pending', 'acknowledged', 'poison')),\n next_attempt_at INTEGER NOT NULL,\n attempt_count INTEGER NOT NULL DEFAULT 0,\n enqueued_at INTEGER,\n acknowledged_at INTEGER,\n last_error TEXT,\n UNIQUE (service_id, event_id, attempt_id),\n FOREIGN KEY (service_id, event_id)\n REFERENCES tag_event(service_id, event_id) ON DELETE RESTRICT\n );\n CREATE INDEX IF NOT EXISTS tag_outbox_obligation_due_idx\n ON tag_outbox_obligation(status, next_attempt_at, obligation_sequence);\n\n CREATE TABLE IF NOT EXISTS tag_source_partition_registration (\n service_id TEXT NOT NULL,\n partition_tag TEXT NOT NULL,\n last_obligation_sequence INTEGER NOT NULL,\n status TEXT NOT NULL CHECK (status IN ('pending', 'registered')),\n next_attempt_at INTEGER,\n attempt_count INTEGER NOT NULL DEFAULT 0,\n last_error TEXT,\n PRIMARY KEY (service_id, partition_tag)\n );\n CREATE INDEX IF NOT EXISTS tag_source_partition_registration_due_idx\n ON tag_source_partition_registration(status, next_attempt_at, service_id, partition_tag);\n\n CREATE TABLE IF NOT EXISTS tag_commit_receipt (\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n committed_at TEXT NOT NULL,\n committed_event_count INTEGER NOT NULL,\n head_suid TEXT NOT NULL,\n reservation_confirmed INTEGER NOT NULL CHECK (reservation_confirmed IN (0, 1)),\n written_version INTEGER NOT NULL,\n PRIMARY KEY (attempt_id, epoch)\n );\n\n CREATE TABLE IF NOT EXISTS tag_fence (\n reason TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n PRIMARY KEY (reason, attempt_id)\n );\n\n CREATE TABLE IF NOT EXISTS tag_cleared_fence (\n reason TEXT NOT NULL,\n attempt_id TEXT NOT NULL,\n epoch INTEGER NOT NULL,\n PRIMARY KEY (reason, attempt_id)\n );\n\n CREATE TABLE IF NOT EXISTS tag_bootstrap_admission (\n singleton INTEGER PRIMARY KEY CHECK (singleton = 1),\n import_id TEXT NOT NULL,\n lease_epoch INTEGER NOT NULL,\n manifest_digest TEXT NOT NULL,\n target_service_id TEXT NOT NULL,\n closed INTEGER NOT NULL CHECK (closed IN (0, 1)),\n FOREIGN KEY (singleton) REFERENCES tag_identity(singleton) ON DELETE RESTRICT\n );\n\n CREATE TABLE IF NOT EXISTS tag_repair_scope (\n attempt_id TEXT NOT NULL,\n event_id TEXT NOT NULL,\n item_json TEXT NOT NULL,\n PRIMARY KEY (attempt_id, event_id)\n );\n";
|
|
12
12
|
/**
|
|
13
13
|
* Packet-owned AC8 range seam. The query text and index identity are exported
|
|
14
14
|
* so the measurement checker can prove exactly what was explained and what
|
|
@@ -23,6 +23,11 @@ export declare const TAG_READ_AFTER_SQL = "\n SELECT event_json\n FROM tag_eve
|
|
|
23
23
|
*/
|
|
24
24
|
export declare const TAG_READ_AFTER_THROUGH_SQL = "\n SELECT event_json\n FROM tag_event INDEXED BY tag_event_suid_idx\n WHERE suid > ? AND suid <= ?\n ORDER BY suid ASC\n LIMIT ?\n";
|
|
25
25
|
export declare function initializeTagSqlSchema(sql: SqlStorage): void;
|
|
26
|
+
/**
|
|
27
|
+
* SDT-G36: `CREATE TABLE IF NOT EXISTS` never alters an existing table, so
|
|
28
|
+
* an idempotent `ADD COLUMN` backfills `written_version` on pre-G36 stores.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ensureTagCommitReceiptWrittenVersion(sql: SqlStorage): void;
|
|
26
31
|
/** A SQL-backed tag object always exposes this capability at runtime. */
|
|
27
32
|
export declare function hasTagSqlStorage(storage: DurableObjectStorage): storage is DurableObjectStorage & {
|
|
28
33
|
sql: SqlStorage;
|
package/dist/tag/TagSqlSchema.js
CHANGED
|
@@ -143,6 +143,7 @@ export const TAG_SQL_SCHEMA_DDL = `
|
|
|
143
143
|
committed_event_count INTEGER NOT NULL,
|
|
144
144
|
head_suid TEXT NOT NULL,
|
|
145
145
|
reservation_confirmed INTEGER NOT NULL CHECK (reservation_confirmed IN (0, 1)),
|
|
146
|
+
written_version INTEGER NOT NULL,
|
|
146
147
|
PRIMARY KEY (attempt_id, epoch)
|
|
147
148
|
);
|
|
148
149
|
|
|
@@ -204,6 +205,20 @@ export const TAG_READ_AFTER_THROUGH_SQL = `
|
|
|
204
205
|
`;
|
|
205
206
|
export function initializeTagSqlSchema(sql) {
|
|
206
207
|
sql.exec(TAG_SQL_SCHEMA_DDL);
|
|
208
|
+
ensureTagCommitReceiptWrittenVersion(sql);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* SDT-G36: `CREATE TABLE IF NOT EXISTS` never alters an existing table, so
|
|
212
|
+
* an idempotent `ADD COLUMN` backfills `written_version` on pre-G36 stores.
|
|
213
|
+
*/
|
|
214
|
+
export function ensureTagCommitReceiptWrittenVersion(sql) {
|
|
215
|
+
const columns = sql.exec("SELECT name FROM pragma_table_info('tag_commit_receipt')").toArray();
|
|
216
|
+
if (columns.some((column) => column.name === "written_version"))
|
|
217
|
+
return;
|
|
218
|
+
// Nullable on migrated stores so pre-G36 receipts stay NULL (unknown) and
|
|
219
|
+
// duplicate replay can fail closed instead of substituting head. Fresh
|
|
220
|
+
// tables enforce NOT NULL via the DDL above; every new write provides it.
|
|
221
|
+
sql.exec("ALTER TABLE tag_commit_receipt ADD COLUMN written_version INTEGER");
|
|
207
222
|
}
|
|
208
223
|
/** A SQL-backed tag object always exposes this capability at runtime. */
|
|
209
224
|
export function hasTagSqlStorage(storage) {
|
package/dist/tag/types.d.ts
CHANGED
|
@@ -160,6 +160,15 @@ export interface TagRecord {
|
|
|
160
160
|
version: number;
|
|
161
161
|
createdAt: string;
|
|
162
162
|
updatedAt: string;
|
|
163
|
+
/**
|
|
164
|
+
* SDT-G36 non-SQL seam only. Maps `attemptId:epoch` to the write
|
|
165
|
+
* transaction's own version and updatedAt. Absent on older records.
|
|
166
|
+
*/
|
|
167
|
+
writeReceipts?: Readonly<Record<string, {
|
|
168
|
+
readonly version: number;
|
|
169
|
+
readonly updatedAt: string;
|
|
170
|
+
readonly headSuid?: string;
|
|
171
|
+
}>>;
|
|
163
172
|
}
|
|
164
173
|
/**
|
|
165
174
|
* The immutable scalar facts needed by the commit response. This is
|
|
@@ -4,7 +4,7 @@ import type { DurableObjectHandlerObservation } from "./ObservationStream";
|
|
|
4
4
|
* Trace-only commit attribution support.
|
|
5
5
|
*
|
|
6
6
|
* This module deliberately has no dependency on the commit protocol or on
|
|
7
|
-
* Durable Object storage. It turns the
|
|
7
|
+
* Durable Object storage. It turns the repository-owned manifest into the runtime
|
|
8
8
|
* vocabulary and delegates real parentage to Cloudflare's active async
|
|
9
9
|
* tracing context. The in-memory records are an observation adapter used by
|
|
10
10
|
* unit tests and the B0 evidence tooling; they never cross a public wire.
|
|
@@ -330,7 +330,7 @@ export interface NativeCommitSpanInput {
|
|
|
330
330
|
readonly schema: CommitTraceSchema;
|
|
331
331
|
/** The manifest face governs the complete emitted attribute set. */
|
|
332
332
|
readonly face: CommitTraceFace;
|
|
333
|
-
/** Exact
|
|
333
|
+
/** Exact repository manifest row emitted by this callback boundary. */
|
|
334
334
|
readonly rowId: string;
|
|
335
335
|
readonly correlationId: string;
|
|
336
336
|
/** Repair roots may cover more than one attempt. */
|
|
@@ -376,7 +376,7 @@ export interface NativeReconcileRootIdentity {
|
|
|
376
376
|
/**
|
|
377
377
|
* A reconciliation fact becomes available only after durable recovery reads.
|
|
378
378
|
* R00 remains open for the handler's whole callback, so it is the sole span
|
|
379
|
-
* to which the
|
|
379
|
+
* to which the repository contract permits this late attribute.
|
|
380
380
|
*/
|
|
381
381
|
export interface NativeReconcileRootFacts {
|
|
382
382
|
setRecoveryKind(kind: string): void;
|
|
@@ -106,7 +106,7 @@ function verifyAttributes(span, row) {
|
|
|
106
106
|
if (expectedPhase !== undefined && span.attributes["phase.ordinal"] !== expectedPhase) {
|
|
107
107
|
failure("transition-phase", `${span.rowId} must carry phase.ordinal=${expectedPhase}`);
|
|
108
108
|
}
|
|
109
|
-
// The
|
|
109
|
+
// The repository-owned rowScope is the authority for member attributes. Do not
|
|
110
110
|
// duplicate a hand-maintained list here: S14 was omitted from such a list
|
|
111
111
|
// once even though it is a real v1 fan-out member. The bundle validator
|
|
112
112
|
// proves rowScope is exactly the complete set of member rows; the runtime
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekiban/dcb-runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Cloudflare Durable Object and HTTP runtime for Serialized DCB V1.",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -13,13 +13,7 @@
|
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/J-Tech-Japan/sekiban-dcb-ts/issues"
|
|
15
15
|
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"sekiban",
|
|
18
|
-
"dcb",
|
|
19
|
-
"runtime",
|
|
20
|
-
"cloudflare",
|
|
21
|
-
"durable-objects"
|
|
22
|
-
],
|
|
16
|
+
"keywords": ["sekiban", "dcb", "runtime", "cloudflare", "durable-objects"],
|
|
23
17
|
"engines": {
|
|
24
18
|
"node": ">=20"
|
|
25
19
|
},
|
|
@@ -52,16 +46,13 @@
|
|
|
52
46
|
}
|
|
53
47
|
},
|
|
54
48
|
"types": "./dist/index.d.ts",
|
|
55
|
-
"files": [
|
|
56
|
-
"dist",
|
|
57
|
-
"README.md",
|
|
58
|
-
"LICENSE"
|
|
59
|
-
],
|
|
49
|
+
"files": ["dist", "README.md", "LICENSE"],
|
|
60
50
|
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
51
|
+
"access": "public",
|
|
52
|
+
"provenance": true
|
|
62
53
|
},
|
|
63
54
|
"dependencies": {
|
|
64
|
-
"@sekiban/dcb-core": "0.2.
|
|
55
|
+
"@sekiban/dcb-core": "0.2.2"
|
|
65
56
|
},
|
|
66
57
|
"scripts": {
|
|
67
58
|
"build": "tsc -p tsconfig.build.json && esbuild src/index.ts --bundle --format=esm --platform=neutral --external:postgres --external:cloudflare:workers --outfile=dist/index.js && esbuild src/cosmos.ts --bundle --format=esm --platform=neutral --external:postgres --external:cloudflare:workers --outfile=dist/cosmos.js && esbuild src/d1.ts --bundle --format=esm --platform=neutral --external:postgres --external:cloudflare:workers --outfile=dist/d1.js && esbuild src/d1-mv.ts --bundle --format=esm --platform=neutral --external:postgres --external:cloudflare:workers --outfile=dist/d1-mv.js && esbuild src/cloudflare.ts --bundle --format=esm --platform=neutral --external:cloudflare:workers --outfile=dist/cloudflare.js && esbuild src/mv/index.ts --bundle --format=esm --platform=neutral --external:postgres --external:cloudflare:workers --outfile=dist/mv/index.js",
|