instar 1.3.528 → 1.3.529
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +53 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +14 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/CoherenceJournal.d.ts +1 -1
- package/dist/core/CoherenceJournal.d.ts.map +1 -1
- package/dist/core/CoherenceJournal.js +14 -2
- package/dist/core/CoherenceJournal.js.map +1 -1
- package/dist/core/EvolutionManager.d.ts +35 -0
- package/dist/core/EvolutionManager.d.ts.map +1 -1
- package/dist/core/EvolutionManager.js +49 -0
- package/dist/core/EvolutionManager.js.map +1 -1
- package/dist/core/LearningsReplicatedStore.d.ts +298 -0
- package/dist/core/LearningsReplicatedStore.d.ts.map +1 -0
- package/dist/core/LearningsReplicatedStore.js +574 -0
- package/dist/core/LearningsReplicatedStore.js.map +1 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +25 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +5 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +2 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +20 -20
- package/src/scaffold/templates.ts +2 -1
- package/upgrades/1.3.529.md +33 -0
- package/upgrades/side-effects/ws22-learnings.md +74 -0
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LearningsReplicatedStore — the THIRD concrete consumer of the HLC replicated-store
|
|
3
|
+
* foundation (WS2.2) and the SECOND memory-family kind (after WS2.3 relationships).
|
|
4
|
+
* It layers the `learning-record` replicated kind onto the generic substrate
|
|
5
|
+
* (ReplicatedRecordEnvelope / UnionReader / ConflictStore / RollbackUnmerge /
|
|
6
|
+
* ReplicationBudget / StoreSnapshot) so that a lesson the agent learned on machine
|
|
7
|
+
* A is known on machine B — ONE learning registry, not one-per-machine.
|
|
8
|
+
*
|
|
9
|
+
* It is the literal analog of `RelationshipsReplicatedStore.ts` (the WS2.3 PII
|
|
10
|
+
* reference consumer). A learning is a LESSON, not a person, so it is lower-PII than a
|
|
11
|
+
* relationship — but its `description`/`source` CAN reference people, content, or
|
|
12
|
+
* platforms, so it REUSES the WS2.3 PII machinery (type-clamp, disclosure-min
|
|
13
|
+
* projection, tombstones, flag-coherence) rather than reinventing or downgrading it.
|
|
14
|
+
* THIS IS PURE LOGIC. No fs, no Date directly, no network. It defines:
|
|
15
|
+
*
|
|
16
|
+
* A. The `learning-record` store schema — a STRICT typed validator that
|
|
17
|
+
* TYPE-CLAMPS every known field: `source.discoveredAt` ISO-8601-only, `applied`
|
|
18
|
+
* a boolean, `tags[]`/free text length-clamped. The schema is a DISCRIMINATED
|
|
19
|
+
* UNION on `op` — an `op:'put'` VALUE schema AND an `op:'delete'` TOMBSTONE
|
|
20
|
+
* schema coexist under the one kind, so a tombstone is never marked invalid by
|
|
21
|
+
* the value schema.
|
|
22
|
+
*
|
|
23
|
+
* B. The disclosure-minimized PROJECTION — `buildLearningRecordData` emits ONLY the
|
|
24
|
+
* enumerated merge-relevant fields, NEVER the raw on-disk blob and NEVER the
|
|
25
|
+
* local `LRN-NNN` id. `recordKey` is the cross-machine IDENTITY SURFACE, derived
|
|
26
|
+
* deterministically from the stable content (normalize(title) + normalize(category)
|
|
27
|
+
* + (source.contentId || source.discoveredAt)) — never the per-machine,
|
|
28
|
+
* sequentially-assigned `LRN-NNN` id (the cross-machine-UNSTABLE id, exactly the
|
|
29
|
+
* relationship-UUID trap WS2.3 solved with the channel-set key). The SAME lesson
|
|
30
|
+
* learned on two machines collapses to ONE record.
|
|
31
|
+
*
|
|
32
|
+
* C. The TOMBSTONE builder — `buildLearningTombstoneData` emits an `op:'delete'`
|
|
33
|
+
* record `{ recordKey, op, hlc, origin, deletedAt }` so a removal/prune propagates
|
|
34
|
+
* as a positive signal across an offline-then-rejoining peer instead of a record
|
|
35
|
+
* absence. CRITICAL: the EvolutionManager prune-over-maxLearnings path MUST emit
|
|
36
|
+
* a tombstone per pruned learning, else a peer re-replicates the locally-pruned
|
|
37
|
+
* learning forever (resurrection).
|
|
38
|
+
*
|
|
39
|
+
* D. The union-aware read — `mergeUnionToLearnings` collapses a
|
|
40
|
+
* `Map<recordKey, UnionResult>` into the merged learning view. Learnings are
|
|
41
|
+
* HIGH-impact at the REPLICATION layer (a concurrent divergent edit to the SAME
|
|
42
|
+
* recordKey goes through APPEND-BOTH-AND-FLAG — both versions surface, never a
|
|
43
|
+
* silent clobber). The CONSUMER READ path is ADVISORY: it injects BOTH variants
|
|
44
|
+
* of an open conflict as guidance — a learning is guidance, not authority — and
|
|
45
|
+
* NEVER blocks on an unresolved conflict. The read NEVER writes a foreign record
|
|
46
|
+
* into the local store (read-only union).
|
|
47
|
+
*
|
|
48
|
+
* E. Foreign-record render safety — `renderForeignLearningContext` wraps a replicated
|
|
49
|
+
* record in an explicit `<replicated-untrusted-data origin="…">` envelope and
|
|
50
|
+
* sanitizes EVERY rendered field. There is no "trusted because machine-set" render
|
|
51
|
+
* slot for a foreign record.
|
|
52
|
+
*
|
|
53
|
+
* DECIDED FORKS (Echo, 2026-06-13 — recorded verbatim in the PR ELI16):
|
|
54
|
+
* 1. recordKey = a content fingerprint, NEVER the local `LRN-NNN` id (cross-machine
|
|
55
|
+
* identity surface — see deriveLearningRecordKey).
|
|
56
|
+
* 2. Impact tier = HIGH at the REPLICATION layer (append-both-and-flag), ADVISORY at
|
|
57
|
+
* the READ layer (both variants injected as hints, never blocking) — see
|
|
58
|
+
* mergeUnionToLearnings + LEARNING_IMPACT_TIER.
|
|
59
|
+
* 3. `applied`/`appliedTo` are LOCAL-merge fields, replicated but last-writer-witness
|
|
60
|
+
* wins; a concurrent applied-vs-unapplied divergence rides the SAME append-both-
|
|
61
|
+
* and-flag path (NOT a special CRDT merge) — the single conflict path.
|
|
62
|
+
*
|
|
63
|
+
* SAFETY POSTURE: MECHANISM, dark by default. Nothing here blocks a user-initiated
|
|
64
|
+
* action. The local `LRN-NNN` id is NEVER part of the replicated schema and is stripped
|
|
65
|
+
* from every emitted projection (disclosure minimization).
|
|
66
|
+
*/
|
|
67
|
+
import { createHash } from 'node:crypto';
|
|
68
|
+
import { jailStoreStringField } from './ReplicatedRecordEnvelope.js';
|
|
69
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
70
|
+
// A. Identity, tier, schema, bounds, caps
|
|
71
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
72
|
+
/** The stateSync config sub-key + advert suffix for this store (e.g.
|
|
73
|
+
* `multiMachine.stateSync.learnings.enabled`). Equal to the advert flag key
|
|
74
|
+
* `stateSyncReceive['learnings']`. */
|
|
75
|
+
export const LEARNING_STORE_KEY = 'learnings';
|
|
76
|
+
/** The JournalKind string this store rides — the DUAL-REGISTRY's dynamic half.
|
|
77
|
+
* MUST also be present in CoherenceJournal.JOURNAL_KINDS (the static half), or the
|
|
78
|
+
* store advertises receive=true yet serves/applies/pulls nothing. */
|
|
79
|
+
export const LEARNING_RECORD_KIND = 'learning-record';
|
|
80
|
+
/**
|
|
81
|
+
* Learnings are HIGH-impact at the REPLICATION layer (fork #2): a concurrent
|
|
82
|
+
* divergent VALUE edit to the SAME recordKey from different origins goes through
|
|
83
|
+
* APPEND-BOTH-AND-FLAG — both versions preserved, ONE deduped conflict, never a
|
|
84
|
+
* silent overwrite. The READ path (mergeUnionToLearnings) is ADVISORY — both variants
|
|
85
|
+
* surface as guidance hints, the read never blocks on an open conflict — a learning is
|
|
86
|
+
* guidance, not authority. Operator resolution via POST /state/resolve-conflict is
|
|
87
|
+
* OPTIONAL cleanup that collapses the flag, never a gate on the hint.
|
|
88
|
+
*/
|
|
89
|
+
export const LEARNING_IMPACT_TIER = 'high';
|
|
90
|
+
// ── Local-record caps mirrored on RECEIVE (length-clamp discipline). A value over a
|
|
91
|
+
// cap REJECTS the whole record (never truncate-and-accept), EXCEPT free text which
|
|
92
|
+
// is length-clamped on receive (a flood is bounded, not record-rejected). ───────
|
|
93
|
+
/** A learning `description` can be long (a full lesson write-up). Clamp on receive. */
|
|
94
|
+
export const MAX_DESCRIPTION_LENGTH = 20_000;
|
|
95
|
+
/** Per-free-text-string clamp for title / category / evolutionRelevance / appliedTo /
|
|
96
|
+
* each tag / each source sub-field. */
|
|
97
|
+
export const MAX_FREETEXT_LENGTH = 2_000;
|
|
98
|
+
/** A category is a short slug. */
|
|
99
|
+
export const MAX_CATEGORY_LENGTH = 128;
|
|
100
|
+
/** Tags cap (mirrors a reasonable per-learning tag count). */
|
|
101
|
+
export const MAX_TAGS = 50;
|
|
102
|
+
/**
|
|
103
|
+
* Per-kind replication bounds. The learnings store is FEW + bounded (the
|
|
104
|
+
* EvolutionManager prunes to maxLearnings=500), so the per-store retention mirrors the
|
|
105
|
+
* pref-record store (a small window with a few archives). NEVER `rotateKeep: 0`
|
|
106
|
+
* (rotate-but-never-delete would be a compliance defect for any memory-family kind).
|
|
107
|
+
* The rate cap COALESCES (latest state per recordKey per interval) so a churny
|
|
108
|
+
* apply/markApplied loop does not flood the stream.
|
|
109
|
+
*/
|
|
110
|
+
export const LEARNING_RECORD_BOUNDS = {
|
|
111
|
+
retention: { maxFileBytes: 4 * 1024 * 1024, rotateKeep: 4 },
|
|
112
|
+
// Few records, coalesced: capacity is the burst, refill the sustained rate.
|
|
113
|
+
rateCap: { capacity: 30, refillPerSec: 5 },
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Per-entry size cap RAISED to 64KB for this kind. The default
|
|
117
|
+
* APPLIER_MAX_ENTRY_BYTES = 8KB is SMALLER than a fat learning (a 20K description
|
|
118
|
+
* alone exceeds it), so under it the longest learnings would never replicate AND
|
|
119
|
+
* would wedge the stream. 64KB is provably above the disclosure-minimized
|
|
120
|
+
* projection's maximum: description(20k) + 50 tags×2k(100k) is the dominant term, but
|
|
121
|
+
* tags are SHORT slugs in practice and EACH free-text is clamped to 2k — we
|
|
122
|
+
* additionally enforce a HARD post-projection ceiling: a record that STILL exceeds
|
|
123
|
+
* 64KB after projection is REJECTED with a named error (never silent-truncate, never
|
|
124
|
+
* suspect-wedge). See assertProjectionUnderCap.
|
|
125
|
+
*/
|
|
126
|
+
export const LEARNING_MAX_ENTRY_BYTES = 64 * 1024;
|
|
127
|
+
/**
|
|
128
|
+
* The store-specific field names the `learning-record` VALUE schema OWNS (the
|
|
129
|
+
* unknown-field counter's allowlist). The local `LRN-NNN` id is DELIBERATELY ABSENT
|
|
130
|
+
* — it is per-machine + sequential and never replicated (the recordKey keys on the
|
|
131
|
+
* content fingerprint, not the id). `recordKey`/`hlc`/`op`/`origin`/`observed` are
|
|
132
|
+
* reserved envelope fields, never store fields.
|
|
133
|
+
*/
|
|
134
|
+
export const LEARNING_STORE_KNOWN_FIELDS = Object.freeze([
|
|
135
|
+
'title',
|
|
136
|
+
'category',
|
|
137
|
+
'description',
|
|
138
|
+
'source',
|
|
139
|
+
'tags',
|
|
140
|
+
'applied',
|
|
141
|
+
'appliedTo',
|
|
142
|
+
'evolutionRelevance',
|
|
143
|
+
]);
|
|
144
|
+
/** The tombstone's store-owned fields beyond the reserved envelope set. `deletedAt`
|
|
145
|
+
* is the only store field a delete carries. */
|
|
146
|
+
export const LEARNING_TOMBSTONE_KNOWN_FIELDS = Object.freeze([
|
|
147
|
+
'deletedAt',
|
|
148
|
+
]);
|
|
149
|
+
/** The full set of known store fields across BOTH op-branches (the schema's
|
|
150
|
+
* knownFields the registry uses for unknown-field counting — a field legal in EITHER
|
|
151
|
+
* branch is "known", and the branch validate() enforces which is legal for THIS op). */
|
|
152
|
+
const ALL_KNOWN_FIELDS = Object.freeze([
|
|
153
|
+
...LEARNING_STORE_KNOWN_FIELDS,
|
|
154
|
+
...LEARNING_TOMBSTONE_KNOWN_FIELDS,
|
|
155
|
+
]);
|
|
156
|
+
// ── ISO-8601 type-clamp: source.discoveredAt is the load-bearing date field. On a
|
|
157
|
+
// foreign record it MUST validate as a real date or be normalized, so markup
|
|
158
|
+
// cannot survive the clamp. ──────────────────────────────────────────────────
|
|
159
|
+
/** Is `v` a valid ISO-8601 date string (and ONLY a date — no smuggled markup)? A
|
|
160
|
+
* string Date.parse rejects, or that contains an injection char (`<`, `>`, `"`), is
|
|
161
|
+
* not a clean ISO date. */
|
|
162
|
+
export function isIso8601(v) {
|
|
163
|
+
if (typeof v !== 'string' || v.length === 0 || v.length > 64)
|
|
164
|
+
return false;
|
|
165
|
+
const ms = Date.parse(v);
|
|
166
|
+
if (!Number.isFinite(ms))
|
|
167
|
+
return false;
|
|
168
|
+
if (v.includes('<') || v.includes('>') || v.includes('"'))
|
|
169
|
+
return false;
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
function clampFreeText(v, max = MAX_FREETEXT_LENGTH) {
|
|
173
|
+
if (typeof v !== 'string')
|
|
174
|
+
return null;
|
|
175
|
+
return v.length > max ? v.slice(0, max) : v;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Validate a LearningSource on RECEIVE: discoveredAt ISO-clamped, every free-text
|
|
179
|
+
* sub-field length-clamped + jailed (a path-shaped source field is dropped). Returns
|
|
180
|
+
* the clamped source (always with a discoveredAt — a non-date coerces to epoch-0, the
|
|
181
|
+
* manager's tolerant-read posture) or null to reject the whole record only when the
|
|
182
|
+
* value is not an object.
|
|
183
|
+
*/
|
|
184
|
+
function validateSource(raw, ctx) {
|
|
185
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
186
|
+
return null;
|
|
187
|
+
const s = raw;
|
|
188
|
+
const discoveredAt = isIso8601(s.discoveredAt) ? s.discoveredAt : new Date(0).toISOString();
|
|
189
|
+
const out = { discoveredAt };
|
|
190
|
+
// Optional free-text sub-fields — present only when a clean clamped string. A
|
|
191
|
+
// path-shaped contentId (a record/thread id is never path-shaped) is dropped.
|
|
192
|
+
const agent = clampFreeText(s.agent);
|
|
193
|
+
if (agent !== null && agent.length > 0 && jailStoreStringField(agent, ctx) !== null)
|
|
194
|
+
out.agent = agent;
|
|
195
|
+
const platform = clampFreeText(s.platform, MAX_CATEGORY_LENGTH);
|
|
196
|
+
if (platform !== null && platform.length > 0 && jailStoreStringField(platform, ctx) !== null)
|
|
197
|
+
out.platform = platform;
|
|
198
|
+
const contentId = clampFreeText(s.contentId);
|
|
199
|
+
if (contentId !== null && contentId.length > 0 && jailStoreStringField(contentId, ctx) !== null)
|
|
200
|
+
out.contentId = contentId;
|
|
201
|
+
const session = clampFreeText(s.session);
|
|
202
|
+
if (session !== null && session.length > 0 && jailStoreStringField(session, ctx) !== null)
|
|
203
|
+
out.session = session;
|
|
204
|
+
return out;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* The `learning-record` store schema — a DISCRIMINATED UNION on `op`. Strict typed
|
|
208
|
+
* validation on top of the envelope: reject free text beyond the known fields,
|
|
209
|
+
* TYPE-CLAMP every known field (discoveredAt ISO-8601, applied boolean, tags string[],
|
|
210
|
+
* description/free text length-clamped) so markup cannot smuggle through a render slot
|
|
211
|
+
* that bypasses sanitize(). Returns the validated store-specific object (known fields
|
|
212
|
+
* only), or null to reject the WHOLE record. PURE (no I/O, no mutation of `raw`).
|
|
213
|
+
*
|
|
214
|
+
* The envelope validator has ALREADY validated `op` ∈ {put,delete} before calling this.
|
|
215
|
+
* We branch on it so a tombstone `{recordKey, op:'delete', hlc, origin, deletedAt}`
|
|
216
|
+
* passes (only `deletedAt` is a legal store field for a delete) WITHOUT being marked
|
|
217
|
+
* invalid by the rich VALUE schema.
|
|
218
|
+
*/
|
|
219
|
+
export const learningRecordStoreSchema = {
|
|
220
|
+
knownFields: ALL_KNOWN_FIELDS,
|
|
221
|
+
validate(raw, ctx) {
|
|
222
|
+
const op = raw.op;
|
|
223
|
+
// ── DELETE (tombstone) branch. Only `deletedAt` is a legal store field; any
|
|
224
|
+
// VALUE field present is counted as a dropped field but does not reject — the
|
|
225
|
+
// tombstone's recordKey + hlc + op (envelope, already validated) carry the
|
|
226
|
+
// suppression. ────────────────────────────────────────────────────────────
|
|
227
|
+
if (op === 'delete') {
|
|
228
|
+
const deletedAt = isIso8601(raw.deletedAt) ? raw.deletedAt : undefined;
|
|
229
|
+
for (const k of Object.keys(raw)) {
|
|
230
|
+
if (k === 'op' || k === 'deletedAt')
|
|
231
|
+
continue;
|
|
232
|
+
if (LEARNING_STORE_KNOWN_FIELDS.includes(k))
|
|
233
|
+
ctx.countDroppedField();
|
|
234
|
+
}
|
|
235
|
+
return deletedAt !== undefined ? { deletedAt } : {};
|
|
236
|
+
}
|
|
237
|
+
// ── VALUE (put) branch. ──────────────────────────────────────────────────
|
|
238
|
+
// title — required non-empty free text, clamped.
|
|
239
|
+
const title = clampFreeText(raw.title);
|
|
240
|
+
if (title === null || title.length === 0)
|
|
241
|
+
return null;
|
|
242
|
+
// category — required non-empty short slug, clamped.
|
|
243
|
+
const category = clampFreeText(raw.category, MAX_CATEGORY_LENGTH);
|
|
244
|
+
if (category === null || category.length === 0)
|
|
245
|
+
return null;
|
|
246
|
+
// description — free text, length-clamped on receive (a flood is bounded).
|
|
247
|
+
const description = typeof raw.description === 'string'
|
|
248
|
+
? (raw.description.length > MAX_DESCRIPTION_LENGTH ? raw.description.slice(0, MAX_DESCRIPTION_LENGTH) : raw.description)
|
|
249
|
+
: '';
|
|
250
|
+
// source — required object, type-clamped (discoveredAt ISO, sub-fields clamped).
|
|
251
|
+
const source = validateSource(raw.source, ctx);
|
|
252
|
+
if (source === null)
|
|
253
|
+
return null;
|
|
254
|
+
// applied — strict BOOLEAN (a non-boolean is rejected; markup cannot survive a
|
|
255
|
+
// boolean slot). This is a load-bearing local-merge field (fork #3).
|
|
256
|
+
if (typeof raw.applied !== 'boolean')
|
|
257
|
+
return null;
|
|
258
|
+
const applied = raw.applied;
|
|
259
|
+
// tags — array of clamped strings, ≤ MAX_TAGS.
|
|
260
|
+
const tags = Array.isArray(raw.tags)
|
|
261
|
+
? raw.tags
|
|
262
|
+
.filter((t) => typeof t === 'string')
|
|
263
|
+
.slice(0, MAX_TAGS)
|
|
264
|
+
.map((t) => (t.length > MAX_FREETEXT_LENGTH ? t.slice(0, MAX_FREETEXT_LENGTH) : t))
|
|
265
|
+
: [];
|
|
266
|
+
const out = {
|
|
267
|
+
title,
|
|
268
|
+
category,
|
|
269
|
+
description,
|
|
270
|
+
source,
|
|
271
|
+
applied,
|
|
272
|
+
tags,
|
|
273
|
+
};
|
|
274
|
+
// Optional clamped free-text fields — present only when valid.
|
|
275
|
+
const appliedTo = raw.appliedTo !== undefined ? clampFreeText(raw.appliedTo) : null;
|
|
276
|
+
if (appliedTo !== null && appliedTo.length > 0)
|
|
277
|
+
out.appliedTo = appliedTo;
|
|
278
|
+
const evolutionRelevance = raw.evolutionRelevance !== undefined ? clampFreeText(raw.evolutionRelevance) : null;
|
|
279
|
+
if (evolutionRelevance !== null && evolutionRelevance.length > 0)
|
|
280
|
+
out.evolutionRelevance = evolutionRelevance;
|
|
281
|
+
return out;
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
285
|
+
// recordKey — the cross-machine IDENTITY SURFACE (fork #1)
|
|
286
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
287
|
+
/** Normalize a string for the content fingerprint: trim + lowercase + collapse
|
|
288
|
+
* internal whitespace, so trivial formatting differences across machines do not
|
|
289
|
+
* split the same lesson into two records. */
|
|
290
|
+
export function normalizeForKey(v) {
|
|
291
|
+
return String(v).trim().toLowerCase().replace(/\s+/g, ' ');
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Derive the cross-machine-stable recordKey for a learning (fork #1). A lesson is "the
|
|
295
|
+
* same" across machines by its CONTENT, NOT by the per-machine, sequentially-assigned
|
|
296
|
+
* `LRN-NNN` id — VM-A and VM-B mint different LRN ids for the same lesson, so an
|
|
297
|
+
* id-keyed record could never collide them (exactly the relationship-UUID trap WS2.3
|
|
298
|
+
* solved with the channel-set key).
|
|
299
|
+
*
|
|
300
|
+
* The key is a deterministic, collision-resistant hash:
|
|
301
|
+
* sha256(normalize(title) + '\x1f' + normalize(category) + '\x1f' + (source.contentId || source.discoveredAt))
|
|
302
|
+
* hex-truncated to 32 chars (the same shape UnionReader.conflictId uses). The `\x1f`
|
|
303
|
+
* (unit separator) is an un-typeable delimiter so two lessons cannot collide by
|
|
304
|
+
* straddling the field boundary (e.g. title "a" + category "b" vs title "a b").
|
|
305
|
+
*
|
|
306
|
+
* `source.contentId` (a post/thread id) is the stronger disambiguator when present —
|
|
307
|
+
* two distinct lessons from different content never collide even with the same
|
|
308
|
+
* title+category; when ABSENT we fall back to `source.discoveredAt`. Returns null when
|
|
309
|
+
* title OR category is empty (a degenerate record with no stable identity surface — the
|
|
310
|
+
* caller skips emission; it can never collide a stranger by an empty key).
|
|
311
|
+
*
|
|
312
|
+
* COLLISION SAFETY: two DIFFERENT lessons share a key ONLY if they share the EXACT same
|
|
313
|
+
* normalized title AND category AND (contentId || discoveredAt) — which IS the
|
|
314
|
+
* definition of "the same lesson". SPLIT-IDENTITY SAFETY: the same lesson derives the
|
|
315
|
+
* SAME key on both machines IFF both hold the same title/category/content anchor; the
|
|
316
|
+
* normalization absorbs trivial formatting drift.
|
|
317
|
+
*/
|
|
318
|
+
export function deriveLearningRecordKey(title, category, source) {
|
|
319
|
+
const t = normalizeForKey(title ?? '');
|
|
320
|
+
const c = normalizeForKey(category ?? '');
|
|
321
|
+
if (t.length === 0 || c.length === 0)
|
|
322
|
+
return null;
|
|
323
|
+
const anchor = (typeof source?.contentId === 'string' && source.contentId.trim().length > 0)
|
|
324
|
+
? source.contentId.trim()
|
|
325
|
+
: (typeof source?.discoveredAt === 'string' ? source.discoveredAt.trim() : '');
|
|
326
|
+
const h = createHash('sha256');
|
|
327
|
+
h.update(`${t}\x1f${c}\x1f${anchor}`);
|
|
328
|
+
return h.digest('hex').slice(0, 32);
|
|
329
|
+
}
|
|
330
|
+
/** The named error a record-over-cap surfaces: not silent-truncate, not suspect-wedge. */
|
|
331
|
+
export class LearningRecordTooLargeError extends Error {
|
|
332
|
+
recordKey;
|
|
333
|
+
bytes;
|
|
334
|
+
constructor(recordKey, bytes) {
|
|
335
|
+
super(`learning-record ${recordKey} is ${bytes} bytes after projection — over the ${LEARNING_MAX_ENTRY_BYTES}-byte per-entry cap; not replicated`);
|
|
336
|
+
this.recordKey = recordKey;
|
|
337
|
+
this.bytes = bytes;
|
|
338
|
+
this.name = 'LearningRecordTooLargeError';
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function clampFreeTextEmit(v, max = MAX_FREETEXT_LENGTH) {
|
|
342
|
+
return typeof v === 'string' && v.length > max ? v.slice(0, max) : (v ?? '');
|
|
343
|
+
}
|
|
344
|
+
/** Emit-side disclosure-minimized source projection: the enumerated source sub-fields
|
|
345
|
+
* ONLY, each clamped to the receive-side maxima (so a legal record round-trips). */
|
|
346
|
+
function projectSource(source) {
|
|
347
|
+
const out = { discoveredAt: source.discoveredAt };
|
|
348
|
+
if (source.agent)
|
|
349
|
+
out.agent = clampFreeTextEmit(source.agent);
|
|
350
|
+
if (source.platform)
|
|
351
|
+
out.platform = clampFreeTextEmit(source.platform, MAX_CATEGORY_LENGTH);
|
|
352
|
+
if (source.contentId)
|
|
353
|
+
out.contentId = clampFreeTextEmit(source.contentId);
|
|
354
|
+
if (source.session)
|
|
355
|
+
out.session = clampFreeTextEmit(source.session);
|
|
356
|
+
return out;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Build the disclosure-minimized `learning-record` envelope `data` for an `op:'put'`.
|
|
360
|
+
* Emits ONLY the enumerated projection — NEVER the raw on-disk blob, NEVER the local
|
|
361
|
+
* `LRN-NNN` id. recordKey = the derived content-fingerprint identity surface (fork #1).
|
|
362
|
+
*
|
|
363
|
+
* Returns null when the record has no stable identity surface (empty title/category ⇒
|
|
364
|
+
* deriveLearningRecordKey null — the caller skips emission). Throws
|
|
365
|
+
* LearningRecordTooLargeError when the projection STILL exceeds the 64KB per-entry cap
|
|
366
|
+
* (a NAMED, surfaced rejection — never silent-truncate).
|
|
367
|
+
*/
|
|
368
|
+
export function buildLearningRecordData(input) {
|
|
369
|
+
const { record, hlc, origin, observed } = input;
|
|
370
|
+
const recordKey = deriveLearningRecordKey(record.title, record.category, record.source);
|
|
371
|
+
if (recordKey === null)
|
|
372
|
+
return null;
|
|
373
|
+
const data = {
|
|
374
|
+
title: clampFreeTextEmit(record.title),
|
|
375
|
+
category: clampFreeTextEmit(record.category, MAX_CATEGORY_LENGTH),
|
|
376
|
+
description: typeof record.description === 'string'
|
|
377
|
+
? (record.description.length > MAX_DESCRIPTION_LENGTH ? record.description.slice(0, MAX_DESCRIPTION_LENGTH) : record.description)
|
|
378
|
+
: '',
|
|
379
|
+
source: projectSource(record.source),
|
|
380
|
+
applied: record.applied === true,
|
|
381
|
+
tags: Array.isArray(record.tags) ? record.tags.slice(0, MAX_TAGS).map((t) => clampFreeTextEmit(t)) : [],
|
|
382
|
+
// envelope fields (recordKey = identity surface).
|
|
383
|
+
recordKey,
|
|
384
|
+
hlc,
|
|
385
|
+
op: 'put',
|
|
386
|
+
origin,
|
|
387
|
+
...(observed !== undefined ? { observed } : {}),
|
|
388
|
+
};
|
|
389
|
+
// Optional fields — only when present (the local LRN id is NEVER among them).
|
|
390
|
+
if (record.appliedTo)
|
|
391
|
+
data.appliedTo = clampFreeTextEmit(record.appliedTo);
|
|
392
|
+
if (record.evolutionRelevance)
|
|
393
|
+
data.evolutionRelevance = clampFreeTextEmit(record.evolutionRelevance);
|
|
394
|
+
assertProjectionUnderCap(recordKey, data);
|
|
395
|
+
return data;
|
|
396
|
+
}
|
|
397
|
+
/** Throw LearningRecordTooLargeError if the projected data serializes over the
|
|
398
|
+
* per-entry cap. The cap is set so a legal disclosure-minimized record can never reach
|
|
399
|
+
* it; this is the belt-and-suspenders named rejection. */
|
|
400
|
+
export function assertProjectionUnderCap(recordKey, data) {
|
|
401
|
+
const bytes = Buffer.byteLength(JSON.stringify(data), 'utf-8');
|
|
402
|
+
if (bytes > LEARNING_MAX_ENTRY_BYTES) {
|
|
403
|
+
throw new LearningRecordTooLargeError(recordKey, bytes);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Build an `op:'delete'` TOMBSTONE `data` for a learning removal/prune. recordKey = the
|
|
408
|
+
* SAME content-fingerprint identity surface the value records key on, so the tombstone
|
|
409
|
+
* reaches the same lesson's record on every machine even though the local LRN ids
|
|
410
|
+
* differ. Returns null when title/category are empty (no identity surface to tombstone).
|
|
411
|
+
*
|
|
412
|
+
* CRITICAL (fork-adjacent): the EvolutionManager prune-over-maxLearnings path MUST call
|
|
413
|
+
* this for each pruned learning, else a peer re-replicates the locally-pruned learning
|
|
414
|
+
* forever (resurrection). The delete-resurrection guard lives in the merge (a later
|
|
415
|
+
* `delete` hlc wins over an earlier `put`).
|
|
416
|
+
*/
|
|
417
|
+
export function buildLearningTombstoneData(input) {
|
|
418
|
+
const recordKey = deriveLearningRecordKey(input.title, input.category, input.source);
|
|
419
|
+
if (recordKey === null)
|
|
420
|
+
return null;
|
|
421
|
+
return {
|
|
422
|
+
deletedAt: input.deletedAt,
|
|
423
|
+
recordKey,
|
|
424
|
+
hlc: input.hlc,
|
|
425
|
+
op: 'delete',
|
|
426
|
+
origin: input.origin,
|
|
427
|
+
...(input.observed !== undefined ? { observed: input.observed } : {}),
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
/** Reconstruct a MergedLearningView from an OriginRecord (the envelope stripped). */
|
|
431
|
+
function viewFromOriginRecord(rec, conflicted) {
|
|
432
|
+
return { recordKey: rec.envelope.recordKey, origin: rec.origin, data: rec.data, conflicted };
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Collapse a `Map<recordKey, UnionResult>` into the merged learning view.
|
|
436
|
+
* HIGH-impact-at-replication / ADVISORY-at-read contract (fork #2):
|
|
437
|
+
* - A resolved single value ⇒ that one view entry.
|
|
438
|
+
* - An OPEN concurrent conflict ⇒ BOTH (all) `put` variants as separate entries
|
|
439
|
+
* (append-both — both surface as ADVISORY guidance; the read NEVER suppresses a
|
|
440
|
+
* usable view AND NEVER BLOCKS waiting on operator resolution — a learning is
|
|
441
|
+
* guidance, not authority). A `delete` variant contributes nothing to display.
|
|
442
|
+
* - A delete-resolved key (every origin's latest is a tombstone) ⇒ nothing (the
|
|
443
|
+
* delete-resurrection guard: a later delete wins over an earlier put).
|
|
444
|
+
* The read is READ-ONLY: a replicated record NEVER clobbers a divergent local record —
|
|
445
|
+
* the local store files are never written here.
|
|
446
|
+
*/
|
|
447
|
+
export function mergeUnionToLearnings(union) {
|
|
448
|
+
const out = [];
|
|
449
|
+
for (const result of union.values()) {
|
|
450
|
+
if (result.conflict) {
|
|
451
|
+
for (const v of result.conflict.versions) {
|
|
452
|
+
if (v.envelope.op === 'delete')
|
|
453
|
+
continue;
|
|
454
|
+
out.push(viewFromOriginRecord(v, true));
|
|
455
|
+
}
|
|
456
|
+
continue;
|
|
457
|
+
}
|
|
458
|
+
if (result.value && result.value.envelope.op !== 'delete') {
|
|
459
|
+
out.push(viewFromOriginRecord(result.value, false));
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
return out;
|
|
463
|
+
}
|
|
464
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
465
|
+
// E. Foreign-record render safety — quoted untrusted data
|
|
466
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
467
|
+
/** Sanitize a string for inclusion in a context block (escape the envelope-break +
|
|
468
|
+
* markup vectors). */
|
|
469
|
+
function sanitize(s) {
|
|
470
|
+
return String(s).replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Render a FOREIGN (replicated) learning record into a session-context block, wrapped
|
|
474
|
+
* in an explicit `<replicated-untrusted-data origin="…">` envelope so the session model
|
|
475
|
+
* treats it as a PEER'S learning to re-ground against, never a directive. EVERY rendered
|
|
476
|
+
* field is escaped — there is no "trusted because machine-set" slot. A null `data.title`
|
|
477
|
+
* (a malformed view) yields null.
|
|
478
|
+
*/
|
|
479
|
+
export function renderForeignLearningContext(view) {
|
|
480
|
+
const d = view.data;
|
|
481
|
+
if (typeof d.title !== 'string' || d.title.length === 0)
|
|
482
|
+
return null;
|
|
483
|
+
const safeOrigin = sanitize(view.origin);
|
|
484
|
+
const lines = [
|
|
485
|
+
`<replicated-untrusted-data origin="${safeOrigin}">`,
|
|
486
|
+
`Learning: ${sanitize(d.title)}`,
|
|
487
|
+
];
|
|
488
|
+
if (typeof d.category === 'string')
|
|
489
|
+
lines.push(`Category: ${sanitize(d.category)}`);
|
|
490
|
+
if (typeof d.applied === 'boolean')
|
|
491
|
+
lines.push(`Applied: ${d.applied ? 'yes' : 'no'}`);
|
|
492
|
+
if (typeof d.appliedTo === 'string' && d.appliedTo.length > 0)
|
|
493
|
+
lines.push(`Applied to: ${sanitize(d.appliedTo)}`);
|
|
494
|
+
if (Array.isArray(d.tags) && d.tags.length > 0)
|
|
495
|
+
lines.push(`Tags: ${d.tags.map(sanitize).join(', ')}`);
|
|
496
|
+
if (d.source && typeof d.source === 'object') {
|
|
497
|
+
const src = d.source;
|
|
498
|
+
if (typeof src.discoveredAt === 'string')
|
|
499
|
+
lines.push(`Discovered: ${sanitize(src.discoveredAt)}`);
|
|
500
|
+
if (typeof src.agent === 'string')
|
|
501
|
+
lines.push(`From: ${sanitize(src.agent)}`);
|
|
502
|
+
if (typeof src.platform === 'string')
|
|
503
|
+
lines.push(`Platform: ${sanitize(src.platform)}`);
|
|
504
|
+
}
|
|
505
|
+
if (typeof d.evolutionRelevance === 'string' && d.evolutionRelevance.length > 0) {
|
|
506
|
+
lines.push(`Evolution relevance: ${sanitize(d.evolutionRelevance)}`);
|
|
507
|
+
}
|
|
508
|
+
if (typeof d.description === 'string' && d.description.length > 0)
|
|
509
|
+
lines.push(`Details: ${sanitize(d.description)}`);
|
|
510
|
+
lines.push('</replicated-untrusted-data>');
|
|
511
|
+
return lines.join('\n');
|
|
512
|
+
}
|
|
513
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
514
|
+
// Own-origin materialization for the union reader (mirrors WS2.3)
|
|
515
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
516
|
+
/**
|
|
517
|
+
* Build an OriginRecord for the OWN learning store (the single-origin materialization
|
|
518
|
+
* the union reader merges against peer replicas). recordKey = derived content-
|
|
519
|
+
* fingerprint identity surface; the envelope carries a SYNTHETIC own-origin HLC stamp
|
|
520
|
+
* derived deterministically from the source.discoveredAt (physical) so the own record
|
|
521
|
+
* has a well-formed, stable position relative to peer records. Returns null for a
|
|
522
|
+
* degenerate record (no identity surface). The local `LRN-NNN` id is NEVER carried into
|
|
523
|
+
* the replicated namespace.
|
|
524
|
+
*/
|
|
525
|
+
export function learningToOriginRecord(record, origin) {
|
|
526
|
+
const recordKey = deriveLearningRecordKey(record.title, record.category, record.source);
|
|
527
|
+
if (recordKey === null)
|
|
528
|
+
return null;
|
|
529
|
+
const physical = Date.parse(record.source?.discoveredAt ?? '');
|
|
530
|
+
const hlc = {
|
|
531
|
+
physical: Number.isFinite(physical) ? physical : 0,
|
|
532
|
+
// `applied` nudges the logical clock so a later applied-true edit positions after
|
|
533
|
+
// the original unapplied put (fork #3 last-writer-witness, single conflict path).
|
|
534
|
+
logical: record.applied ? 1 : 0,
|
|
535
|
+
node: origin,
|
|
536
|
+
};
|
|
537
|
+
const data = {
|
|
538
|
+
title: record.title,
|
|
539
|
+
category: record.category,
|
|
540
|
+
description: record.description ?? '',
|
|
541
|
+
source: projectSource(record.source),
|
|
542
|
+
applied: record.applied === true,
|
|
543
|
+
tags: Array.isArray(record.tags) ? record.tags : [],
|
|
544
|
+
};
|
|
545
|
+
if (record.appliedTo)
|
|
546
|
+
data.appliedTo = record.appliedTo;
|
|
547
|
+
if (record.evolutionRelevance)
|
|
548
|
+
data.evolutionRelevance = record.evolutionRelevance;
|
|
549
|
+
const envelope = { recordKey, hlc, op: 'put', origin };
|
|
550
|
+
return { origin, envelope, data };
|
|
551
|
+
}
|
|
552
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
553
|
+
// Registration descriptor (consumed by server.ts to register the dual registry)
|
|
554
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
555
|
+
/** The ReplicatedKindRegistry registration for the `learning-record` store. server.ts
|
|
556
|
+
* registers this onto the shared registry; the dual-registry coupling test asserts
|
|
557
|
+
* `kind` is also present in JOURNAL_KINDS. */
|
|
558
|
+
export const LEARNING_KIND_REGISTRATION = {
|
|
559
|
+
kind: LEARNING_RECORD_KIND,
|
|
560
|
+
store: LEARNING_STORE_KEY,
|
|
561
|
+
schema: learningRecordStoreSchema,
|
|
562
|
+
};
|
|
563
|
+
/** Convenience: the store's contributing journal kinds (for rollback-unmerge's
|
|
564
|
+
* kindsForStore('learnings') wiring). */
|
|
565
|
+
export function learningContributingKinds() {
|
|
566
|
+
return [LEARNING_RECORD_KIND];
|
|
567
|
+
}
|
|
568
|
+
/** The store's impact tier resolver, for ReplicatedStoreReader.tierOf. Returns HIGH for
|
|
569
|
+
* the `learnings` store (and HIGH for any unknown store — the conservative
|
|
570
|
+
* append-both-and-flag direction, never a silent clobber). */
|
|
571
|
+
export function learningTierOf(_store) {
|
|
572
|
+
return LEARNING_IMPACT_TIER;
|
|
573
|
+
}
|
|
574
|
+
//# sourceMappingURL=LearningsReplicatedStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LearningsReplicatedStore.js","sourceRoot":"","sources":["../../src/core/LearningsReplicatedStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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