@amalgm/live 0.2.52 → 0.2.54
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/PURPOSE.md +24 -8
- package/dist/entities/cloud.d.ts +31 -6
- package/dist/entities/cloud.d.ts.map +1 -1
- package/dist/entities/cloud.js +210 -47
- package/dist/entities/cloud.js.map +1 -1
- package/dist/entities/graph-head.d.ts +109 -0
- package/dist/entities/graph-head.d.ts.map +1 -0
- package/dist/entities/graph-head.js +267 -0
- package/dist/entities/graph-head.js.map +1 -0
- package/dist/entities/index.d.ts +3 -1
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +3 -1
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/rules.js +2 -2
- package/dist/entities/rules.js.map +1 -1
- package/dist/entities/types.d.ts +3 -0
- package/dist/entities/types.d.ts.map +1 -1
- package/dist/entities/types.js +3 -0
- package/dist/entities/types.js.map +1 -1
- package/dist/files/commands.d.ts.map +1 -1
- package/dist/files/commands.js +2 -13
- package/dist/files/commands.js.map +1 -1
- package/dist/registration/user-ground.d.ts +5 -1
- package/dist/registration/user-ground.d.ts.map +1 -1
- package/dist/registration/user-ground.js +9 -14
- package/dist/registration/user-ground.js.map +1 -1
- package/dist/transfer/upload.d.ts +7 -0
- package/dist/transfer/upload.d.ts.map +1 -1
- package/dist/transfer/upload.js +11 -4
- package/dist/transfer/upload.js.map +1 -1
- package/dist-cjs/entities/cloud.js +212 -49
- package/dist-cjs/entities/cloud.js.map +1 -1
- package/dist-cjs/entities/graph-head.js +280 -0
- package/dist-cjs/entities/graph-head.js.map +1 -0
- package/dist-cjs/entities/index.js +3 -1
- package/dist-cjs/entities/index.js.map +1 -1
- package/dist-cjs/entities/rules.js +1 -1
- package/dist-cjs/entities/rules.js.map +1 -1
- package/dist-cjs/entities/types.js +4 -1
- package/dist-cjs/entities/types.js.map +1 -1
- package/dist-cjs/files/commands.js +1 -12
- package/dist-cjs/files/commands.js.map +1 -1
- package/dist-cjs/registration/user-ground.js +8 -13
- package/dist-cjs/registration/user-ground.js.map +1 -1
- package/dist-cjs/transfer/upload.js +13 -4
- package/dist-cjs/transfer/upload.js.map +1 -1
- package/package.json +1 -1
package/PURPOSE.md
CHANGED
|
@@ -181,14 +181,19 @@ its cutover.
|
|
|
181
181
|
stronger current-content witness exists. Repository packing remains
|
|
182
182
|
transfer preparation and may run beside structural registration, but
|
|
183
183
|
neither act may weaken the other's result.
|
|
184
|
-
30. **Proof travels forward; bytes
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
184
|
+
30. **Proof travels forward; disposable bytes need not.** Registration reads
|
|
185
|
+
every ordinary text or binary file through one bounded stream to classify
|
|
186
|
+
it, derive its content head, and retain any block-manifest evidence needed
|
|
187
|
+
by the later Upload stage. A graph-only Register capture does not copy
|
|
188
|
+
those same bytes into the machine cache merely to preserve them for
|
|
189
|
+
Upload. Upload receives one seekable source selected by the host — an
|
|
190
|
+
already-sealed cache object when one exists, otherwise the registered
|
|
191
|
+
ground itself — and verifies every byte it sends against the captured
|
|
192
|
+
content head. A typed source mismatch returns control to Register so it
|
|
193
|
+
can recapture current ground; stale bytes can never be sealed or
|
|
194
|
+
published. Download still writes received bytes once before their
|
|
195
|
+
registered adapter consumes them. No file type or size permits a
|
|
196
|
+
complete-file allocation in the bounded transfer path.
|
|
192
197
|
31. **A content block is not a round trip.** Text and binary retain independent
|
|
193
198
|
content-addressed block identities. Cold upload may move complete small
|
|
194
199
|
artifacts in bounded cargo waves, while cold upload and download move
|
|
@@ -267,6 +272,17 @@ its cutover.
|
|
|
267
272
|
while its work remains private (`declared` or `prepared`); once revealed,
|
|
268
273
|
the exact visible target must Verify before Apply advances.
|
|
269
274
|
|
|
275
|
+
42. **The registry graph is immutable pages, and its head is the snapshot.**
|
|
276
|
+
A page is one root's UUID-sorted records serialized canonically under a
|
|
277
|
+
fixed byte budget, identified by the hash of its own bytes, and stored as
|
|
278
|
+
ordinary immutable content. The head names each root's ordered pages and
|
|
279
|
+
nothing else; its checksum proves the head bytes, never a reassembled
|
|
280
|
+
record list. A publication rebuilds only roots it walked and carries every
|
|
281
|
+
other root's committed page list forward byte-identically. The authority
|
|
282
|
+
verifies every replaced root from its pages and requires unchanged roots
|
|
283
|
+
to match the committed head exactly. A first head over a records-shaped
|
|
284
|
+
base pages every root because that base carries no page identities.
|
|
285
|
+
|
|
270
286
|
## Five surfaces, one behavior
|
|
271
287
|
|
|
272
288
|
```
|
package/dist/entities/cloud.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The entity-cloud boundary's pure half (engine
|
|
3
3
|
* registration/entity-cloud.js): the snapshot codec, record assertions,
|
|
4
|
-
* equality, the private resource id, and the repo
|
|
5
|
-
* logical graph facts, never a path, inode, watcher, or
|
|
4
|
+
* equality, the private resource id, containment selection, and the repo
|
|
5
|
+
* travel law — only logical graph facts, never a path, inode, watcher, or
|
|
6
|
+
* database row.
|
|
6
7
|
*
|
|
7
8
|
* Wire parity is the contract here: `stableJson`, record key order, and
|
|
8
9
|
* snapshot sorting reproduce the engine's bytes exactly, so a snapshot
|
|
9
10
|
* packed on either side hashes and compares identically.
|
|
11
|
+
*
|
|
12
|
+
* Every ancestor question in this module is answered once per graph, not
|
|
13
|
+
* once per record. A workspace of ~19,000 entities 32 levels deep re-walks
|
|
14
|
+
* the same spine for every record it holds, and that is the difference
|
|
15
|
+
* between a linear pass and a quadratic one. `indexRepositoryTerritory`
|
|
16
|
+
* (src/detection/territory.ts) memoizes the same shape for the same reason.
|
|
10
17
|
*/
|
|
11
18
|
import { type EntityStatus, type EntityType, type Sha256Hex } from './types.js';
|
|
12
19
|
/** `@1` could project arbitrary pre-cloud registrations. `@2` omitted the
|
|
@@ -51,10 +58,16 @@ export declare function privateEntityResourceId(userId: string, sha256Hex: Sha25
|
|
|
51
58
|
/** The one JSON spelling every snapshot comparison and checksum uses. */
|
|
52
59
|
export declare const stableJson: (value: unknown) => string;
|
|
53
60
|
export declare const sameRecord: (left: unknown, right: unknown) => boolean;
|
|
54
|
-
/** Two record lists describe the same graph (normalized, sorted, compared
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
/** Two record lists describe the same graph (normalized, sorted, compared
|
|
62
|
+
* field by field).
|
|
63
|
+
*
|
|
64
|
+
* Comparing the canonical bytes would answer the same question, but it would
|
|
65
|
+
* spell out both whole graphs to answer one boolean — megabytes of JSON per
|
|
66
|
+
* call at register scale. `assertRecord` guarantees the equivalence: every
|
|
67
|
+
* normalized record carries exactly these eight keys in this order, and every
|
|
68
|
+
* value is `string | null`, never `undefined`. JSON's spelling of a string is
|
|
69
|
+
* injective, so field-wise equality and byte equality decide identically. */
|
|
70
|
+
export declare function sameRecords(left: readonly unknown[], right: readonly unknown[]): boolean;
|
|
58
71
|
/**
|
|
59
72
|
* Validate one snapshot record and normalize it (UUIDs lowercased,
|
|
60
73
|
* transportVersion defaulted to null). Refusals: an invalid shape; a
|
|
@@ -102,6 +115,18 @@ export declare function travelingRecords(records: readonly unknown[], sha256Hex:
|
|
|
102
115
|
/** Normalize records into the one canonical snapshot: asserted, sorted by
|
|
103
116
|
* uuid, duplicates refused. */
|
|
104
117
|
export declare function snapshotFromRecords(records: readonly unknown[]): CloudSnapshot;
|
|
118
|
+
/** One complete subtree of an already-normalized record list: `rootUuid` and
|
|
119
|
+
* everything that descends from it, in the order it arrived.
|
|
120
|
+
*
|
|
121
|
+
* Containment is reachability down child edges, so it is answered by one
|
|
122
|
+
* walk over one child index — not by sweeping the whole graph until a fixed
|
|
123
|
+
* point stops moving. Records sorted by UUID arrive in no useful tree order,
|
|
124
|
+
* so a sweep adds roughly one level per pass and pays the graph's full depth
|
|
125
|
+
* in whole-list scans. Reachability is the whole law, exactly as a sweep
|
|
126
|
+
* decided it: a record in a cycle the root cannot reach stays out, and a
|
|
127
|
+
* record whose named parent is the root itself stays in even when no record
|
|
128
|
+
* for that root is present. */
|
|
129
|
+
export declare function containedRecords(records: readonly CloudEntityRecord[], rootUuid: string): readonly CloudEntityRecord[];
|
|
105
130
|
/** Build the complete, self-contained root replacement carried by cold
|
|
106
131
|
* Register. Every declared root must be present, every record must descend
|
|
107
132
|
* from one of those roots inside this same operation, and active slots must
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/entities/cloud.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/entities/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EACnD,MAAM,YAAY,CAAC;AAIpB;;;;;+DAK+D;AAC/D,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAEhE,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAK7C;;mCAEmC;AACnC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,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,EAAE,EAC3B,SAAS,EAAE,SAAS,GACnB,SAAS,iBAAiB,EAAE,CAoD9B;AAED;+BAC+B;AAC/B,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,GAAG,aAAa,CAc9E;AAED;;;;;;;;;;+BAU+B;AAC/B,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACrC,QAAQ,EAAE,MAAM,GACf,SAAS,iBAAiB,EAAE,CAkB9B;AAuCD;;;;6DAI6D;AAC7D,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,OAAO,EAAE,SAAS,OAAO,EAAE,GAC1B,oBAAoB,CAgDtB;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,aAAa,CAavE"}
|
package/dist/entities/cloud.js
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The entity-cloud boundary's pure half (engine
|
|
3
3
|
* registration/entity-cloud.js): the snapshot codec, record assertions,
|
|
4
|
-
* equality, the private resource id, and the repo
|
|
5
|
-
* logical graph facts, never a path, inode, watcher, or
|
|
4
|
+
* equality, the private resource id, containment selection, and the repo
|
|
5
|
+
* travel law — only logical graph facts, never a path, inode, watcher, or
|
|
6
|
+
* database row.
|
|
6
7
|
*
|
|
7
8
|
* Wire parity is the contract here: `stableJson`, record key order, and
|
|
8
9
|
* snapshot sorting reproduce the engine's bytes exactly, so a snapshot
|
|
9
10
|
* packed on either side hashes and compares identically.
|
|
11
|
+
*
|
|
12
|
+
* Every ancestor question in this module is answered once per graph, not
|
|
13
|
+
* once per record. A workspace of ~19,000 entities 32 levels deep re-walks
|
|
14
|
+
* the same spine for every record it holds, and that is the difference
|
|
15
|
+
* between a linear pass and a quadratic one. `indexRepositoryTerritory`
|
|
16
|
+
* (src/detection/territory.ts) memoizes the same shape for the same reason.
|
|
10
17
|
*/
|
|
11
|
-
import { CONTAINERS, DERIVED_PAYLOAD, ROOT_TYPES, TYPES, UUID_PATTERN, } from './types.js';
|
|
18
|
+
import { CONTAINERS, DERIVED_PAYLOAD, ROOT_TYPES, STATUSES, TYPES, UUID_PATTERN, } from './types.js';
|
|
12
19
|
import { bytesToBase64Url, hexToBytes, utf8Decode } from './bytes.js';
|
|
13
20
|
import { canonicalVersion, membershipHash } from './rules.js';
|
|
14
21
|
/** `@1` could project arbitrary pre-cloud registrations. `@2` omitted the
|
|
@@ -31,13 +38,32 @@ export function privateEntityResourceId(userId, sha256Hex) {
|
|
|
31
38
|
/** The one JSON spelling every snapshot comparison and checksum uses. */
|
|
32
39
|
export const stableJson = (value) => JSON.stringify(value);
|
|
33
40
|
export const sameRecord = (left, right) => stableJson(left) === stableJson(right);
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
/** The eight canonical record fields, in the order `assertRecord` emits them. */
|
|
42
|
+
const RECORD_FIELDS = [
|
|
43
|
+
'uuid', 'type', 'parentUUID', 'name', 'status', 'version', 'payloadVersion', 'transportVersion',
|
|
44
|
+
];
|
|
45
|
+
/** Two record lists describe the same graph (normalized, sorted, compared
|
|
46
|
+
* field by field).
|
|
47
|
+
*
|
|
48
|
+
* Comparing the canonical bytes would answer the same question, but it would
|
|
49
|
+
* spell out both whole graphs to answer one boolean — megabytes of JSON per
|
|
50
|
+
* call at register scale. `assertRecord` guarantees the equivalence: every
|
|
51
|
+
* normalized record carries exactly these eight keys in this order, and every
|
|
52
|
+
* value is `string | null`, never `undefined`. JSON's spelling of a string is
|
|
53
|
+
* injective, so field-wise equality and byte equality decide identically. */
|
|
54
|
+
export function sameRecords(left, right) {
|
|
55
|
+
const ours = snapshotFromRecords(left).records;
|
|
56
|
+
const theirs = snapshotFromRecords(right).records;
|
|
57
|
+
if (ours.length !== theirs.length)
|
|
58
|
+
return false;
|
|
59
|
+
for (let index = 0; index < ours.length; index += 1) {
|
|
60
|
+
const mine = ours[index];
|
|
61
|
+
const yours = theirs[index];
|
|
62
|
+
for (const field of RECORD_FIELDS)
|
|
63
|
+
if (mine[field] !== yours[field])
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
41
67
|
}
|
|
42
68
|
/**
|
|
43
69
|
* Validate one snapshot record and normalize it (UUIDs lowercased,
|
|
@@ -52,7 +78,7 @@ export function assertRecord(value) {
|
|
|
52
78
|
|| typeof record.type !== 'string' || !TYPES.has(record.type)
|
|
53
79
|
|| (record.parentUUID !== null && (typeof record.parentUUID !== 'string' || !UUID_PATTERN.test(record.parentUUID)))
|
|
54
80
|
|| typeof record.name !== 'string' || !record.name || record.name.includes('/') || record.name.includes('\0')
|
|
55
|
-
|| !
|
|
81
|
+
|| !STATUSES.has(record.status)
|
|
56
82
|
|| typeof record.version !== 'string' || !/^[0-9a-f]{64}$/.test(record.version)
|
|
57
83
|
|| (record.payloadVersion !== null && typeof record.payloadVersion !== 'string')
|
|
58
84
|
|| (record.transportVersion !== undefined && record.transportVersion !== null
|
|
@@ -80,6 +106,66 @@ export function assertRecord(value) {
|
|
|
80
106
|
transportVersion,
|
|
81
107
|
};
|
|
82
108
|
}
|
|
109
|
+
/** A chain that never terminates, so no node on it can name a repository. */
|
|
110
|
+
const CYCLIC_CHAIN = Symbol('cyclic parent chain');
|
|
111
|
+
/**
|
|
112
|
+
* The repo travel law resolved once per graph. Asking it record by record
|
|
113
|
+
* re-walks the same spine for every entity the spine holds, which is
|
|
114
|
+
* quadratic in a deep workspace; the answer only ever depends on where the
|
|
115
|
+
* walk starts, so one memo serves every asker.
|
|
116
|
+
*
|
|
117
|
+
* The memo holds the nearest repository's UUID rather than a boolean because
|
|
118
|
+
* the naive walk's refusal is asker-dependent: it seeds its `seen` set with
|
|
119
|
+
* the asking record's own UUID, so a repository that is its own nearest
|
|
120
|
+
* repository is convicted of a cycle before its type can answer `true`. That
|
|
121
|
+
* is the single case where a chain-only answer would differ, and comparing
|
|
122
|
+
* the resolved UUID against the asker restores it exactly.
|
|
123
|
+
*/
|
|
124
|
+
function createRepositoryEnclosure(lookup) {
|
|
125
|
+
const nearest = new Map();
|
|
126
|
+
const resolve = (start) => {
|
|
127
|
+
const walked = [];
|
|
128
|
+
const walking = new Set();
|
|
129
|
+
let cursor = start;
|
|
130
|
+
let answer = null;
|
|
131
|
+
for (;;) {
|
|
132
|
+
if (cursor === null || cursor === undefined)
|
|
133
|
+
break;
|
|
134
|
+
const memoized = nearest.get(cursor);
|
|
135
|
+
if (memoized !== undefined) {
|
|
136
|
+
answer = memoized;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
if (walking.has(cursor)) {
|
|
140
|
+
answer = CYCLIC_CHAIN;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
walking.add(cursor);
|
|
144
|
+
walked.push(cursor);
|
|
145
|
+
const node = lookup(cursor);
|
|
146
|
+
if (!node)
|
|
147
|
+
break;
|
|
148
|
+
if (node.type === 'repo.git') {
|
|
149
|
+
answer = cursor;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
cursor = node.parentUUID;
|
|
153
|
+
}
|
|
154
|
+
for (const uuid of walked)
|
|
155
|
+
nearest.set(uuid, answer);
|
|
156
|
+
return answer;
|
|
157
|
+
};
|
|
158
|
+
return (record) => {
|
|
159
|
+
const { parentUUID } = record;
|
|
160
|
+
if (parentUUID === null || parentUUID === undefined)
|
|
161
|
+
return false;
|
|
162
|
+
const repository = resolve(parentUUID);
|
|
163
|
+
if (repository === CYCLIC_CHAIN || repository === record.uuid) {
|
|
164
|
+
throw new Error(`cloud entity ${record.uuid} has a cyclic parent chain`);
|
|
165
|
+
}
|
|
166
|
+
return repository !== null;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
83
169
|
/**
|
|
84
170
|
* The repo travel law: a record with a `repo.git` PROPER ancestor never
|
|
85
171
|
* travels to the cloud on its own. The repository is the sync boundary —
|
|
@@ -92,20 +178,7 @@ export function assertRecord(value) {
|
|
|
92
178
|
* silently unsynced entity.
|
|
93
179
|
*/
|
|
94
180
|
export function enclosedByRepositoryAncestor(record, lookup) {
|
|
95
|
-
|
|
96
|
-
let parentUUID = record.parentUUID;
|
|
97
|
-
while (parentUUID !== null && parentUUID !== undefined) {
|
|
98
|
-
if (seen.has(parentUUID))
|
|
99
|
-
throw new Error(`cloud entity ${record.uuid} has a cyclic parent chain`);
|
|
100
|
-
seen.add(parentUUID);
|
|
101
|
-
const parent = lookup(parentUUID);
|
|
102
|
-
if (!parent)
|
|
103
|
-
return false;
|
|
104
|
-
if (parent.type === 'repo.git')
|
|
105
|
-
return true;
|
|
106
|
-
parentUUID = parent.parentUUID;
|
|
107
|
-
}
|
|
108
|
-
return false;
|
|
181
|
+
return createRepositoryEnclosure(lookup)(record);
|
|
109
182
|
}
|
|
110
183
|
/** Project a complete local entity graph onto the cloud registry. Ordinary
|
|
111
184
|
* repository children keep their local SQLite identities inside the nearest
|
|
@@ -125,10 +198,16 @@ export function enclosedByRepositoryAncestor(record, lookup) {
|
|
|
125
198
|
export function travelingRecords(records, sha256Hex) {
|
|
126
199
|
const snapshot = snapshotFromRecords(records);
|
|
127
200
|
const byUuid = new Map(snapshot.records.map((record) => [record.uuid, record]));
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
for (const
|
|
201
|
+
const encloses = createRepositoryEnclosure((uuid) => byUuid.get(uuid));
|
|
202
|
+
const repositories = [];
|
|
203
|
+
const traveling = new Set();
|
|
204
|
+
for (const record of snapshot.records) {
|
|
205
|
+
if (record.type === 'repo.git')
|
|
206
|
+
repositories.push(record);
|
|
207
|
+
if (!encloses(record))
|
|
208
|
+
traveling.add(record.uuid);
|
|
209
|
+
}
|
|
210
|
+
for (const repository of repositories) {
|
|
132
211
|
let cursor = repository;
|
|
133
212
|
while (cursor) {
|
|
134
213
|
traveling.add(cursor.uuid);
|
|
@@ -137,13 +216,20 @@ export function travelingRecords(records, sha256Hex) {
|
|
|
137
216
|
cursor = byUuid.get(cursor.parentUUID);
|
|
138
217
|
}
|
|
139
218
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const projected =
|
|
219
|
+
// The containers that lost active children, the records that survive, and
|
|
220
|
+
// each survivor's active membership all read the same list — so they read
|
|
221
|
+
// it once.
|
|
222
|
+
const narrowed = new Set();
|
|
223
|
+
const projected = [];
|
|
145
224
|
const activeChildren = new Map();
|
|
146
|
-
for (const record of
|
|
225
|
+
for (const record of snapshot.records) {
|
|
226
|
+
if (!traveling.has(record.uuid)) {
|
|
227
|
+
if (record.status === 'active' && record.parentUUID !== null && traveling.has(record.parentUUID)) {
|
|
228
|
+
narrowed.add(record.parentUUID);
|
|
229
|
+
}
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
projected.push(record);
|
|
147
233
|
if (record.status !== 'active' || record.parentUUID === null)
|
|
148
234
|
continue;
|
|
149
235
|
const siblings = activeChildren.get(record.parentUUID);
|
|
@@ -170,8 +256,11 @@ export function travelingRecords(records, sha256Hex) {
|
|
|
170
256
|
export function snapshotFromRecords(records) {
|
|
171
257
|
const normalized = records.map(assertRecord)
|
|
172
258
|
.sort((left, right) => (left.uuid < right.uuid ? -1 : left.uuid > right.uuid ? 1 : 0));
|
|
173
|
-
|
|
174
|
-
|
|
259
|
+
// Sorted, so duplicates are adjacent: no second array and no set to build.
|
|
260
|
+
for (let index = 1; index < normalized.length; index += 1) {
|
|
261
|
+
if (normalized[index].uuid === normalized[index - 1].uuid) {
|
|
262
|
+
throw new Error('cloud entity snapshot has duplicate UUIDs');
|
|
263
|
+
}
|
|
175
264
|
}
|
|
176
265
|
return {
|
|
177
266
|
schemaVersion: ENTITY_CLOUD_SCHEMA_VERSION,
|
|
@@ -179,6 +268,83 @@ export function snapshotFromRecords(records) {
|
|
|
179
268
|
records: normalized,
|
|
180
269
|
};
|
|
181
270
|
}
|
|
271
|
+
/** One complete subtree of an already-normalized record list: `rootUuid` and
|
|
272
|
+
* everything that descends from it, in the order it arrived.
|
|
273
|
+
*
|
|
274
|
+
* Containment is reachability down child edges, so it is answered by one
|
|
275
|
+
* walk over one child index — not by sweeping the whole graph until a fixed
|
|
276
|
+
* point stops moving. Records sorted by UUID arrive in no useful tree order,
|
|
277
|
+
* so a sweep adds roughly one level per pass and pays the graph's full depth
|
|
278
|
+
* in whole-list scans. Reachability is the whole law, exactly as a sweep
|
|
279
|
+
* decided it: a record in a cycle the root cannot reach stays out, and a
|
|
280
|
+
* record whose named parent is the root itself stays in even when no record
|
|
281
|
+
* for that root is present. */
|
|
282
|
+
export function containedRecords(records, rootUuid) {
|
|
283
|
+
const children = new Map();
|
|
284
|
+
for (const record of records) {
|
|
285
|
+
if (record.parentUUID === null)
|
|
286
|
+
continue;
|
|
287
|
+
const siblings = children.get(record.parentUUID);
|
|
288
|
+
if (siblings)
|
|
289
|
+
siblings.push(record);
|
|
290
|
+
else
|
|
291
|
+
children.set(record.parentUUID, [record]);
|
|
292
|
+
}
|
|
293
|
+
const included = new Set([rootUuid]);
|
|
294
|
+
const frontier = [rootUuid];
|
|
295
|
+
while (frontier.length > 0) {
|
|
296
|
+
for (const child of children.get(frontier.pop()) ?? []) {
|
|
297
|
+
if (included.has(child.uuid))
|
|
298
|
+
continue;
|
|
299
|
+
included.add(child.uuid);
|
|
300
|
+
frontier.push(child.uuid);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return records.filter((record) => included.has(record.uuid));
|
|
304
|
+
}
|
|
305
|
+
/** The two ways a record's climb to a root can fail. */
|
|
306
|
+
const PARENT_CYCLE = Symbol('parent cycle');
|
|
307
|
+
const INCOMPLETE_ANCESTRY = Symbol('incomplete ancestry');
|
|
308
|
+
/** Answer "which root is above this record" once per node instead of once
|
|
309
|
+
* per record. Unlike the enclosure walk this one starts its cycle set empty,
|
|
310
|
+
* so the answer is already a pure function of where the climb begins: every
|
|
311
|
+
* node the climb crosses shares the answer it lands on, faults included —
|
|
312
|
+
* a node leading into a cycle can only ever lead into that cycle. */
|
|
313
|
+
function createRootResolver(byUuid) {
|
|
314
|
+
const ancestry = new Map();
|
|
315
|
+
return (record) => {
|
|
316
|
+
const walked = [];
|
|
317
|
+
const walking = new Set();
|
|
318
|
+
let cursor = record;
|
|
319
|
+
let answer;
|
|
320
|
+
for (;;) {
|
|
321
|
+
const memoized = ancestry.get(cursor.uuid);
|
|
322
|
+
if (memoized !== undefined) {
|
|
323
|
+
answer = memoized;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
if (cursor.parentUUID === null) {
|
|
327
|
+
answer = cursor.uuid;
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
if (walking.has(cursor.uuid)) {
|
|
331
|
+
answer = PARENT_CYCLE;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
walking.add(cursor.uuid);
|
|
335
|
+
walked.push(cursor.uuid);
|
|
336
|
+
const parent = byUuid.get(cursor.parentUUID);
|
|
337
|
+
if (!parent) {
|
|
338
|
+
answer = INCOMPLETE_ANCESTRY;
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
cursor = parent;
|
|
342
|
+
}
|
|
343
|
+
for (const uuid of walked)
|
|
344
|
+
ancestry.set(uuid, answer);
|
|
345
|
+
return answer;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
182
348
|
/** Build the complete, self-contained root replacement carried by cold
|
|
183
349
|
* Register. Every declared root must be present, every record must descend
|
|
184
350
|
* from one of those roots inside this same operation, and active slots must
|
|
@@ -206,6 +372,7 @@ export function rootReplacementFromRecords(rootIds, records) {
|
|
|
206
372
|
|| actual.some((rootId, index) => rootId !== normalizedRoots[index])) {
|
|
207
373
|
throw new Error('cloud root replacement records do not exactly match its roots');
|
|
208
374
|
}
|
|
375
|
+
const ancestryOf = createRootResolver(byUuid);
|
|
209
376
|
const activeSlots = new Set();
|
|
210
377
|
for (const record of snapshot.records) {
|
|
211
378
|
if (record.parentUUID !== null) {
|
|
@@ -220,17 +387,13 @@ export function rootReplacementFromRecords(rootIds, records) {
|
|
|
220
387
|
activeSlots.add(slot);
|
|
221
388
|
}
|
|
222
389
|
}
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
seen.add(cursor.uuid);
|
|
229
|
-
cursor = byUuid.get(cursor.parentUUID);
|
|
230
|
-
if (!cursor)
|
|
231
|
-
throw new Error(`cloud root replacement entity ${record.uuid} has incomplete ancestry`);
|
|
390
|
+
const ancestry = ancestryOf(record);
|
|
391
|
+
if (ancestry === PARENT_CYCLE)
|
|
392
|
+
throw new Error('cloud root replacement has a parent cycle');
|
|
393
|
+
if (ancestry === INCOMPLETE_ANCESTRY) {
|
|
394
|
+
throw new Error(`cloud root replacement entity ${record.uuid} has incomplete ancestry`);
|
|
232
395
|
}
|
|
233
|
-
if (!declared.has(
|
|
396
|
+
if (!declared.has(ancestry)) {
|
|
234
397
|
throw new Error(`cloud root replacement entity ${record.uuid} is outside its declared roots`);
|
|
235
398
|
}
|
|
236
399
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../src/entities/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,GAE7D,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;;+DAK+D;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEhE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAE7C,gEAAgE;AAChE,MAAM,YAAY,GAAG,gBAAgB,CAA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AC,CAAoB,CAAC;IAClG,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IACD,IAAI,QAAQ,EAAE,aAAa,KAAK,2BAA2B;WACtD,QAAQ,EAAE,IAAI,KAAK,wBAAwB;WAC3C,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Immutable graph pages and the committed graph head.
|
|
3
|
+
*
|
|
4
|
+
* The registry resource is only ever written by Register, and Register
|
|
5
|
+
* always replaces whole roots. So the immutable unit of graph publication
|
|
6
|
+
* is the root subtree: each root's canonical records split into
|
|
7
|
+
* content-addressed pages, and the whole graph named by one small head —
|
|
8
|
+
* sorted roots, each listing its ordered pages. Publishing a workspace
|
|
9
|
+
* uploads that workspace's pages and commits a head that names every other
|
|
10
|
+
* root's pages unchanged; nothing about an untouched root is rebuilt,
|
|
11
|
+
* serialized, journaled, or transmitted.
|
|
12
|
+
*
|
|
13
|
+
* Laws:
|
|
14
|
+
* - Page bytes are the canonical JSON array of a contiguous uuid-sorted
|
|
15
|
+
* slice of one root's records; the page's identity is the SHA-256 of
|
|
16
|
+
* those exact bytes.
|
|
17
|
+
* - Pagination is canonical: the same records always split into the same
|
|
18
|
+
* pages (`pagesForRoot`), so two machines paging one root agree
|
|
19
|
+
* byte-for-byte and an unchanged root is provable by page-list identity.
|
|
20
|
+
* - The head is total: it names every root of the graph. Its checksum,
|
|
21
|
+
* `sha256(stableJson(head))`, is the graph's snapshot checksum.
|
|
22
|
+
* - Assembly re-proves everything it accepts: page hashes, root-subtree
|
|
23
|
+
* laws (via `rootReplacementFromRecords`), and canonical pagination.
|
|
24
|
+
*/
|
|
25
|
+
import { type Sha256Hex } from './types.js';
|
|
26
|
+
import { type CloudEntityRecord } from './cloud.js';
|
|
27
|
+
/** Byte budget one page targets. A single record larger than the budget
|
|
28
|
+
* still travels as its own page: the budget bounds waste, never validity. */
|
|
29
|
+
export declare const GRAPH_PAGE_BYTES: number;
|
|
30
|
+
export declare const GRAPH_HEAD_KIND = "amalgm-entity-registry-head";
|
|
31
|
+
export declare const GRAPH_HEAD_OPERATION_KIND = "entity.graph.head";
|
|
32
|
+
/** One immutable page: identity, size, and how many records it carries. */
|
|
33
|
+
export interface GraphPageRef {
|
|
34
|
+
readonly sha256: string;
|
|
35
|
+
readonly bytes: number;
|
|
36
|
+
readonly records: number;
|
|
37
|
+
}
|
|
38
|
+
/** One root of the committed graph and its ordered pages. */
|
|
39
|
+
export interface GraphHeadRoot {
|
|
40
|
+
readonly rootId: string;
|
|
41
|
+
readonly pages: readonly GraphPageRef[];
|
|
42
|
+
}
|
|
43
|
+
/** The committed graph head: the total graph as sorted roots over
|
|
44
|
+
* immutable pages. This exact value, canonically serialized, is the
|
|
45
|
+
* authority's stored snapshot and the input to the graph checksum. */
|
|
46
|
+
export interface CloudGraphHead {
|
|
47
|
+
readonly schemaVersion: number;
|
|
48
|
+
readonly kind: typeof GRAPH_HEAD_KIND;
|
|
49
|
+
readonly roots: readonly GraphHeadRoot[];
|
|
50
|
+
}
|
|
51
|
+
/** One atomic head commit: the complete new head plus the roots whose
|
|
52
|
+
* pages the publisher rebuilt. Every root outside `replacedRootIds` must
|
|
53
|
+
* carry page lists identical to the authority's current head — the
|
|
54
|
+
* structural proof the publisher folded on the base it claims. A replaced
|
|
55
|
+
* root absent from the head is a root deletion. */
|
|
56
|
+
export interface CloudGraphHeadReplacement {
|
|
57
|
+
readonly kind: typeof GRAPH_HEAD_OPERATION_KIND;
|
|
58
|
+
readonly head: CloudGraphHead;
|
|
59
|
+
readonly replacedRootIds: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
/** A page with its proof and its parsed records. */
|
|
62
|
+
export interface GraphPage {
|
|
63
|
+
readonly ref: GraphPageRef;
|
|
64
|
+
readonly bytes: Uint8Array;
|
|
65
|
+
readonly records: readonly CloudEntityRecord[];
|
|
66
|
+
}
|
|
67
|
+
/** Split one complete root subtree into its canonical pages. The records
|
|
68
|
+
* must be exactly the subtree — the same law `entity.roots.replace`
|
|
69
|
+
* enforced — so every page set that exists is lawful by construction. */
|
|
70
|
+
export declare function pagesForRoot(rootId: string, records: readonly unknown[], sha256Hex: Sha256Hex): readonly GraphPage[];
|
|
71
|
+
/** Group a record list by the root each record descends from, every group
|
|
72
|
+
* uuid-sorted. A record no root reaches down child edges — an orphan or a
|
|
73
|
+
* cycle — refuses the graph rather than silently dropping out of it. */
|
|
74
|
+
export declare function recordsByRoot(records: readonly unknown[]): ReadonlyMap<string, readonly CloudEntityRecord[]>;
|
|
75
|
+
/** Build the canonical head from per-root page lists: roots validated,
|
|
76
|
+
* sorted, duplicates refused; every root carries at least one page
|
|
77
|
+
* because every root holds at least its own record. */
|
|
78
|
+
export declare function graphHeadFromRootPages(roots: readonly {
|
|
79
|
+
readonly rootId: string;
|
|
80
|
+
readonly pages: readonly GraphPageRef[];
|
|
81
|
+
}[]): CloudGraphHead;
|
|
82
|
+
/** The graph's snapshot checksum: the SHA-256 of the head's canonical
|
|
83
|
+
* serialization. Unchanged roots contribute only their page identities,
|
|
84
|
+
* so the checksum never requires materializing their records. */
|
|
85
|
+
export declare function graphHeadChecksum(head: CloudGraphHead, sha256Hex: Sha256Hex): string;
|
|
86
|
+
/** Parse head bytes (or their UTF-8 text) back into the canonical form. */
|
|
87
|
+
export declare function parseGraphHead(bytes: Uint8Array | string): CloudGraphHead;
|
|
88
|
+
/** Two page lists name the same immutable pages in the same order. */
|
|
89
|
+
export declare function sameRootPages(left: readonly GraphPageRef[], right: readonly GraphPageRef[]): boolean;
|
|
90
|
+
/** Re-prove one root from its page bytes: every page's hash, size, and
|
|
91
|
+
* count; the complete subtree laws; and canonical pagination, so a lawful
|
|
92
|
+
* but differently-split page set is refused rather than cached as a
|
|
93
|
+
* second spelling of the same root. Returns the root's uuid-sorted
|
|
94
|
+
* records. */
|
|
95
|
+
export declare function assembleRootRecords(rootId: string, refs: readonly GraphPageRef[], pages: readonly Uint8Array[], sha256Hex: Sha256Hex): readonly CloudEntityRecord[];
|
|
96
|
+
/** Build the atomic head-commit operation. */
|
|
97
|
+
export declare function graphHeadReplacement(head: CloudGraphHead, replacedRootIds: readonly string[]): CloudGraphHeadReplacement;
|
|
98
|
+
/** Page every root of a complete record list — the transition from a
|
|
99
|
+
* records-shape snapshot to its head, and the shape of a first
|
|
100
|
+
* publication that must name the whole account. */
|
|
101
|
+
export declare function graphHeadFromSnapshotRecords(records: readonly unknown[], sha256Hex: Sha256Hex): {
|
|
102
|
+
readonly head: CloudGraphHead;
|
|
103
|
+
readonly pages: readonly GraphPage[];
|
|
104
|
+
};
|
|
105
|
+
/** Materialize the complete graph a head names, reading each page's bytes
|
|
106
|
+
* through `readPage`. Every root is re-proved on the way in; the result is
|
|
107
|
+
* the canonical whole-graph record list. */
|
|
108
|
+
export declare function recordsFromHead(head: CloudGraphHead, readPage: (ref: GraphPageRef) => Uint8Array, sha256Hex: Sha256Hex): readonly CloudEntityRecord[];
|
|
109
|
+
//# sourceMappingURL=graph-head.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-head.d.ts","sourceRoot":"","sources":["../../src/entities/graph-head.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1D,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AAEpB;6EAC6E;AAC7E,eAAO,MAAM,gBAAgB,QAAkB,CAAC;AAEhD,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D,eAAO,MAAM,yBAAyB,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