@mneme-ai/core 2.89.0 → 2.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent_manifest.d.ts.map +1 -1
- package/dist/agent_manifest.js +4 -0
- package/dist/agent_manifest.js.map +1 -1
- package/dist/gephyra/index.d.ts +12 -0
- package/dist/gephyra/index.d.ts.map +1 -1
- package/dist/gephyra/index.js +38 -0
- package/dist/gephyra/index.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/truth_gate/claims.d.ts.map +1 -1
- package/dist/truth_gate/claims.js +14 -0
- package/dist/truth_gate/claims.js.map +1 -1
- package/dist/truth_gate/probes.d.ts.map +1 -1
- package/dist/truth_gate/probes.js +94 -0
- package/dist/truth_gate/probes.js.map +1 -1
- package/dist/truth_kernel/anamnesis.d.ts +172 -0
- package/dist/truth_kernel/anamnesis.d.ts.map +1 -0
- package/dist/truth_kernel/anamnesis.js +335 -0
- package/dist/truth_kernel/anamnesis.js.map +1 -0
- package/dist/truth_kernel/anamnesis.test.d.ts +15 -0
- package/dist/truth_kernel/anamnesis.test.d.ts.map +1 -0
- package/dist/truth_kernel/anamnesis.test.js +136 -0
- package/dist/truth_kernel/anamnesis.test.js.map +1 -0
- package/dist/truth_kernel/compound.d.ts +55 -0
- package/dist/truth_kernel/compound.d.ts.map +1 -0
- package/dist/truth_kernel/compound.js +72 -0
- package/dist/truth_kernel/compound.js.map +1 -0
- package/dist/truth_kernel/gauntlet_public.d.ts +37 -0
- package/dist/truth_kernel/gauntlet_public.d.ts.map +1 -0
- package/dist/truth_kernel/gauntlet_public.js +81 -0
- package/dist/truth_kernel/gauntlet_public.js.map +1 -0
- package/dist/truth_kernel/savant_diamonds.test.d.ts +11 -0
- package/dist/truth_kernel/savant_diamonds.test.d.ts.map +1 -0
- package/dist/truth_kernel/savant_diamonds.test.js +137 -0
- package/dist/truth_kernel/savant_diamonds.test.js.map +1 -0
- package/dist/truth_kernel/symbiosis.d.ts +54 -0
- package/dist/truth_kernel/symbiosis.d.ts.map +1 -0
- package/dist/truth_kernel/symbiosis.js +98 -0
- package/dist/truth_kernel/symbiosis.js.map +1 -0
- package/dist/truth_kernel/truth_mesh.d.ts +63 -0
- package/dist/truth_kernel/truth_mesh.d.ts.map +1 -0
- package/dist/truth_kernel/truth_mesh.js +124 -0
- package/dist/truth_kernel/truth_mesh.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.91.0 — 💎⑥ ANAMNESIS tests (compute once, recollect forever).
|
|
3
|
+
*
|
|
4
|
+
* N1 canonicalForm — meaning-preserving paraphrase collapse (arith forms, words, commutative sort, case/space)
|
|
5
|
+
* N2 NO false collision — word order preserved; different values ≠; non-commutative not sorted
|
|
6
|
+
* N3 recollect-or-recompute — first computes, repeat recollects (~0), compute runs exactly once
|
|
7
|
+
* N4 re-verify EVERY hit — tampered body / forged sig / stale / invalidated all force recompute
|
|
8
|
+
* N5 freshness window — within ttl → recollect, past ttl → recompute; ttl 0 = eternal axiom
|
|
9
|
+
* N6 energy ledger — anamnesisStats totals + mintEnergyCertificate signs the savings
|
|
10
|
+
* N7 cross-vendor export/import — added, idempotent, forged (claim-swap) dropped
|
|
11
|
+
* N8 Anamnesis Gauntlet — recollection-rate > 0 AND stale-serve-rate === 0
|
|
12
|
+
* N9 QUAN — never throws over fuzz; always 3-valued
|
|
13
|
+
*/
|
|
14
|
+
import { describe, it, expect } from "vitest";
|
|
15
|
+
import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";
|
|
16
|
+
import { tmpdir } from "node:os";
|
|
17
|
+
import { join } from "node:path";
|
|
18
|
+
import { canonicalForm, canonicalClaimKey, recollectOrCompute, recollectAssertion, isTrustworthy, invalidate, anamnesisStats, mintEnergyCertificate, exportProofs, importProofs, runAnamnesisGauntlet, } from "./anamnesis.js";
|
|
19
|
+
function repo() { return mkdtempSync(join(tmpdir(), "anamnesis-")); }
|
|
20
|
+
const T = 1_700_000_000_000;
|
|
21
|
+
const storeFile = (r) => join(r, ".mneme", "anamnesis", "proofs.jsonl");
|
|
22
|
+
const proveTrue = (costTokens = 1800, ttlMs = 0) => () => Promise.resolve({ verdict: "TRUE", lineage: [{ sensor: "flash", verdict: "TRUE", weight: 1 }], ttlMs, costTokens });
|
|
23
|
+
describe("v2.91.0 💎⑥ ANAMNESIS — compute once, recollect forever", () => {
|
|
24
|
+
it("N1 canonicalForm — meaning-preserving paraphrase collapse", () => {
|
|
25
|
+
const k = (s) => canonicalClaimKey(s);
|
|
26
|
+
// four arithmetic paraphrases → one key
|
|
27
|
+
expect(new Set(["2+2=4", "2 + 2 = 4", "two plus two equals four", "4 = 2 + 2"].map(k)).size).toBe(1);
|
|
28
|
+
// commutative operands sorted (3*4 ≡ 4*3)
|
|
29
|
+
expect(k("3*4=12")).toBe(k("4*3=12"));
|
|
30
|
+
expect(k("5+7=12")).toBe(k("7+5=12"));
|
|
31
|
+
// case + whitespace + trailing punctuation
|
|
32
|
+
expect(k("React 19 ships RSC")).toBe(k("react 19 ships rsc."));
|
|
33
|
+
// number-words in prose
|
|
34
|
+
expect(canonicalForm("ten times ten = 100")).toBe(canonicalForm("10*10=100"));
|
|
35
|
+
});
|
|
36
|
+
it("N2 NO false collision — the savant won't trade safety for hit-rate", () => {
|
|
37
|
+
const k = (s) => canonicalClaimKey(s);
|
|
38
|
+
expect(k("dog bites man")).not.toBe(k("man bites dog")); // word order is meaning
|
|
39
|
+
expect(k("2+2=4")).not.toBe(k("2+2=5")); // different value
|
|
40
|
+
expect(k("10-3=7")).not.toBe(k("3-10=7")); // subtraction NOT commutative → not sorted
|
|
41
|
+
});
|
|
42
|
+
it("N3 recollect-or-recompute — compute runs exactly once across repeats + paraphrases", async () => {
|
|
43
|
+
const r = repo();
|
|
44
|
+
let computeCalls = 0;
|
|
45
|
+
const compute = () => { computeCalls++; return proveTrue(1800, 0)(); };
|
|
46
|
+
const a = await recollectOrCompute(r, "2+2=4", compute, { now: T, agent: "claude" });
|
|
47
|
+
const b = await recollectOrCompute(r, "2 + 2 = 4", compute, { now: T + 10, agent: "gpt" }); // paraphrase
|
|
48
|
+
const c = await recollectOrCompute(r, "two plus two equals four", compute, { now: T + 20 }); // paraphrase
|
|
49
|
+
expect(a.source).toBe("recompute");
|
|
50
|
+
expect(b.source).toBe("recollect");
|
|
51
|
+
expect(c.source).toBe("recollect");
|
|
52
|
+
expect(b.energySavedTokens).toBe(1800);
|
|
53
|
+
expect(computeCalls).toBe(1); // ← the whole point: proven once, recollected forever
|
|
54
|
+
});
|
|
55
|
+
it("N4 re-verify EVERY hit — tampered body / forged sig / invalidated all force recompute", async () => {
|
|
56
|
+
// (a) tamper the stored verdict in the jsonl → next ask must recompute (body ≠ signed payload)
|
|
57
|
+
{
|
|
58
|
+
const r = repo();
|
|
59
|
+
await recollectOrCompute(r, "2+2=4", proveTrue(), { now: T });
|
|
60
|
+
const rec = JSON.parse(readFileSync(storeFile(r), "utf8").trim());
|
|
61
|
+
rec.verdict = "FALSE";
|
|
62
|
+
writeFileSync(storeFile(r), JSON.stringify(rec) + "\n", "utf8");
|
|
63
|
+
const again = await recollectOrCompute(r, "2+2=4", proveTrue(), { now: T + 5 });
|
|
64
|
+
expect(again.source).toBe("recompute");
|
|
65
|
+
expect(again.reason).toBe("forged");
|
|
66
|
+
}
|
|
67
|
+
// (b) invalidate → recompute
|
|
68
|
+
{
|
|
69
|
+
const r = repo();
|
|
70
|
+
await recollectOrCompute(r, "the version is 1.2", proveTrue(1800, 999999), { now: T });
|
|
71
|
+
expect(invalidate(r, "the version is 1.2", "shipped 1.3")).toBe(true);
|
|
72
|
+
const again = await recollectOrCompute(r, "the version is 1.2", proveTrue(1800, 999999), { now: T + 5 });
|
|
73
|
+
expect(again.source).toBe("recompute");
|
|
74
|
+
expect(again.reason).toBe("invalidated");
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
it("N5 freshness window — within ttl recollect, past ttl recompute; ttl 0 eternal", async () => {
|
|
78
|
+
const r = repo();
|
|
79
|
+
await recollectOrCompute(r, "weather is sunny today", proveTrue(1800, 1000), { now: T }); // 1s ttl
|
|
80
|
+
expect((await recollectOrCompute(r, "weather is sunny today", proveTrue(1800, 1000), { now: T + 500 })).source).toBe("recollect");
|
|
81
|
+
expect((await recollectOrCompute(r, "weather is sunny today", proveTrue(1800, 1000), { now: T + 5000 })).source).toBe("recompute"); // stale
|
|
82
|
+
// eternal axiom (ttl 0) recollects far in the future
|
|
83
|
+
const r2 = repo();
|
|
84
|
+
await recollectOrCompute(r2, "2+2=4", proveTrue(1800, 0), { now: T });
|
|
85
|
+
expect((await recollectOrCompute(r2, "2+2=4", proveTrue(1800, 0), { now: T + 10 ** 12 })).source).toBe("recollect");
|
|
86
|
+
});
|
|
87
|
+
it("N6 energy ledger — stats total + signed savings certificate", async () => {
|
|
88
|
+
const r = repo();
|
|
89
|
+
await recollectOrCompute(r, "2+2=4", proveTrue(1800, 0), { now: T });
|
|
90
|
+
await recollectOrCompute(r, "2+2=4", proveTrue(1800, 0), { now: T + 1 });
|
|
91
|
+
await recollectOrCompute(r, "2+2=4", proveTrue(1800, 0), { now: T + 2 });
|
|
92
|
+
const s = anamnesisStats(r);
|
|
93
|
+
expect(s.records).toBe(1);
|
|
94
|
+
expect(s.recollections).toBe(2);
|
|
95
|
+
expect(s.totalEnergySavedTokens).toBe(3600); // 2 recollections × 1800
|
|
96
|
+
const cert = await mintEnergyCertificate(r, { windowStartMs: T, windowEndMs: T + 10 });
|
|
97
|
+
expect(cert.totalTokensSaved).toBe(3600);
|
|
98
|
+
expect(typeof cert.hmac).toBe("string");
|
|
99
|
+
});
|
|
100
|
+
it("N7 cross-vendor export/import — added, idempotent, forged claim-swap dropped", async () => {
|
|
101
|
+
const a = repo();
|
|
102
|
+
await recollectOrCompute(a, "2+2=4", proveTrue(), { now: T });
|
|
103
|
+
await recollectOrCompute(a, "10*10=100", proveTrue(), { now: T });
|
|
104
|
+
const bundle = exportProofs(a, "agentA");
|
|
105
|
+
expect(bundle.proofs.length).toBe(2);
|
|
106
|
+
const dest = repo();
|
|
107
|
+
expect(importProofs(dest, bundle).added).toBe(2);
|
|
108
|
+
expect(importProofs(dest, bundle).duplicate).toBe(2); // idempotent
|
|
109
|
+
// forge: swap a claimKey but keep the (now-mismatched) valid signature → dropped
|
|
110
|
+
const forged = JSON.parse(JSON.stringify(bundle));
|
|
111
|
+
forged.proofs[0].claimKey = "deadbeef";
|
|
112
|
+
expect(importProofs(repo(), forged).rejectedForged).toBe(1);
|
|
113
|
+
});
|
|
114
|
+
it("N8 Anamnesis Gauntlet — recollection-rate > 0 AND stale-serve-rate 0%", async () => {
|
|
115
|
+
const g = await runAnamnesisGauntlet(repo(), [
|
|
116
|
+
"2+2=4", "2 + 2 = 4", "two plus two equals four", "10*10=100", "ten times ten = 100", "2+2=4",
|
|
117
|
+
], { now: T });
|
|
118
|
+
expect(g.recollectionRate).toBeGreaterThan(0);
|
|
119
|
+
expect(g.staleServeRate).toBe(0); // never serves an unre-verifiable proof
|
|
120
|
+
expect(g.energySavedTokens).toBeGreaterThan(0);
|
|
121
|
+
expect(g.recomputes).toBe(2); // only 2 distinct facts
|
|
122
|
+
});
|
|
123
|
+
it("N9 QUAN — never throws over fuzz; always 3-valued; isTrustworthy total", async () => {
|
|
124
|
+
const r = repo();
|
|
125
|
+
for (let i = 0; i < 40; i++) {
|
|
126
|
+
const claim = ["", " ", `${i}+${i}=${i * 2}`, `claim ${i}`, "weirdchars", `${i} is not ${i}`][i % 6];
|
|
127
|
+
const out = await recollectAssertion(r, claim, { now: T });
|
|
128
|
+
expect(["TRUE", "FALSE", "UNKNOWN"]).toContain(out.verdict);
|
|
129
|
+
}
|
|
130
|
+
expect(() => canonicalForm("")).not.toThrow();
|
|
131
|
+
expect(() => anamnesisStats(r)).not.toThrow();
|
|
132
|
+
const fakeRec = { claimKey: "x", verdict: "TRUE", receipt: null, ttlMs: 0, computedAt: 0, invalidated: false };
|
|
133
|
+
expect(isTrustworthy(fakeRec, T)).toBe(false); // unsigned ⇒ never trustworthy
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
//# sourceMappingURL=anamnesis.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anamnesis.test.js","sourceRoot":"","sources":["../../src/truth_kernel/anamnesis.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EACvF,UAAU,EAAE,cAAc,EAAE,qBAAqB,EAAE,YAAY,EAAE,YAAY,EAAE,oBAAoB,GAEpG,MAAM,gBAAgB,CAAC;AAExB,SAAS,IAAI,KAAa,OAAO,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7E,MAAM,CAAC,GAAG,iBAAiB,CAAC;AAC5B,MAAM,SAAS,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AACxF,MAAM,SAAS,GAAG,CAAC,UAAU,GAAG,IAAI,EAAE,KAAK,GAAG,CAAC,EAAkC,EAAE,CACjF,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,OA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BAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;YAC3D,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC9D,CAAC;QACD,MAAM,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QAC9C,MAAM,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QAC9C,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,EAA4B,CAAC;QACzI,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,+BAA+B;IAChF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.90.0 — 💎③ IDLE COMPOUNDING · the savant sharpens in its sleep.
|
|
3
|
+
*
|
|
4
|
+
* A daemon's idle window is wasted time for an LLM (its weights are frozen). For the
|
|
5
|
+
* savant it's when it gets SHARPER: it consolidates the many corroborating ACTIVE
|
|
6
|
+
* truths in the Axiom Lattice into fewer, higher-SUPPORT axioms, and quarantines any
|
|
7
|
+
* subject where the active truths conflict (a contested subject is NOT an axiom).
|
|
8
|
+
*
|
|
9
|
+
* Pure + deterministic + idempotent: this is a READ-ONLY projection over the lattice
|
|
10
|
+
* (it never mutates it), so re-running yields the identical axiom set + the identical
|
|
11
|
+
* signed digest — the savant's current, provable axiom base, attestable offline.
|
|
12
|
+
* Never throws.
|
|
13
|
+
*/
|
|
14
|
+
import { type NotaryReceipt } from "../notary/index.js";
|
|
15
|
+
export interface Axiom {
|
|
16
|
+
subject: string;
|
|
17
|
+
/** A representative claim for the subject (the earliest ACTIVE one). */
|
|
18
|
+
claim: string;
|
|
19
|
+
verdict: "TRUE" | "FALSE";
|
|
20
|
+
/** How many ACTIVE lattice nodes corroborate this verdict on this subject. */
|
|
21
|
+
support: number;
|
|
22
|
+
nodeIds: string[];
|
|
23
|
+
/** True once support ≥ minSupport — a "crystallised" high-support axiom. */
|
|
24
|
+
crystallised: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ContestedSubject {
|
|
27
|
+
subject: string;
|
|
28
|
+
claims: string[];
|
|
29
|
+
/** Why it can't be an axiom: the active truths on this subject disagree. */
|
|
30
|
+
reason: string;
|
|
31
|
+
}
|
|
32
|
+
export interface CompoundReport {
|
|
33
|
+
totalActive: number;
|
|
34
|
+
/** Subjects whose ACTIVE truths agree → consolidated axioms (sorted by subject). */
|
|
35
|
+
axioms: Axiom[];
|
|
36
|
+
/** Subjects with conflicting ACTIVE verdicts → quarantined, NOT axioms. */
|
|
37
|
+
contested: ContestedSubject[];
|
|
38
|
+
/** Count of crystallised (high-support) axioms. */
|
|
39
|
+
crystallisedCount: number;
|
|
40
|
+
/** NOTARY-signed digest over the axiom set — the savant's attestable axiom base. */
|
|
41
|
+
receipt: NotaryReceipt | null;
|
|
42
|
+
summary: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Consolidate the lattice's ACTIVE truths into axioms. A subject becomes an axiom
|
|
46
|
+
* iff all its ACTIVE non-UNKNOWN nodes agree on one verdict; if they conflict it is
|
|
47
|
+
* CONTESTED (quarantined). Deterministic (sorted) + idempotent (read-only). Signs the
|
|
48
|
+
* resulting axiom set so "what the savant currently holds as proven" is verifiable.
|
|
49
|
+
*/
|
|
50
|
+
export declare function compoundLattice(repoRoot: string, opts?: {
|
|
51
|
+
minSupport?: number;
|
|
52
|
+
issuedAt?: number;
|
|
53
|
+
noSign?: boolean;
|
|
54
|
+
}): CompoundReport;
|
|
55
|
+
//# sourceMappingURL=compound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compound.d.ts","sourceRoot":"","sources":["../../src/truth_kernel/compound.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEtE,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,4EAA4E;IAC5E,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,2EAA2E;IAC3E,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,mDAAmD;IACnD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,cAAc,CAiDzI"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.90.0 — 💎③ IDLE COMPOUNDING · the savant sharpens in its sleep.
|
|
3
|
+
*
|
|
4
|
+
* A daemon's idle window is wasted time for an LLM (its weights are frozen). For the
|
|
5
|
+
* savant it's when it gets SHARPER: it consolidates the many corroborating ACTIVE
|
|
6
|
+
* truths in the Axiom Lattice into fewer, higher-SUPPORT axioms, and quarantines any
|
|
7
|
+
* subject where the active truths conflict (a contested subject is NOT an axiom).
|
|
8
|
+
*
|
|
9
|
+
* Pure + deterministic + idempotent: this is a READ-ONLY projection over the lattice
|
|
10
|
+
* (it never mutates it), so re-running yields the identical axiom set + the identical
|
|
11
|
+
* signed digest — the savant's current, provable axiom base, attestable offline.
|
|
12
|
+
* Never throws.
|
|
13
|
+
*/
|
|
14
|
+
import { readLattice } from "./lattice.js";
|
|
15
|
+
import { issueReceipt } from "../notary/index.js";
|
|
16
|
+
/**
|
|
17
|
+
* Consolidate the lattice's ACTIVE truths into axioms. A subject becomes an axiom
|
|
18
|
+
* iff all its ACTIVE non-UNKNOWN nodes agree on one verdict; if they conflict it is
|
|
19
|
+
* CONTESTED (quarantined). Deterministic (sorted) + idempotent (read-only). Signs the
|
|
20
|
+
* resulting axiom set so "what the savant currently holds as proven" is verifiable.
|
|
21
|
+
*/
|
|
22
|
+
export function compoundLattice(repoRoot, opts = {}) {
|
|
23
|
+
const minSupport = Math.max(1, opts.minSupport ?? 2);
|
|
24
|
+
const active = readLattice(repoRoot).filter((n) => n.status === "ACTIVE" && (n.verdict === "TRUE" || n.verdict === "FALSE"));
|
|
25
|
+
// Group by subject (stable insertion via Map; keys sorted at the end for determinism).
|
|
26
|
+
const bySubject = new Map();
|
|
27
|
+
for (const n of active) {
|
|
28
|
+
if (!n.subject)
|
|
29
|
+
continue;
|
|
30
|
+
const arr = bySubject.get(n.subject) ?? [];
|
|
31
|
+
arr.push(n);
|
|
32
|
+
bySubject.set(n.subject, arr);
|
|
33
|
+
}
|
|
34
|
+
const axioms = [];
|
|
35
|
+
const contested = [];
|
|
36
|
+
for (const subject of [...bySubject.keys()].sort()) {
|
|
37
|
+
const nodes = bySubject.get(subject);
|
|
38
|
+
const verdicts = new Set(nodes.map((n) => n.verdict));
|
|
39
|
+
if (verdicts.size > 1) {
|
|
40
|
+
contested.push({ subject, claims: nodes.map((n) => n.claim), reason: "active truths disagree on this subject" });
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const verdict = nodes[0].verdict;
|
|
44
|
+
const support = nodes.length;
|
|
45
|
+
axioms.push({
|
|
46
|
+
subject,
|
|
47
|
+
claim: nodes[0].claim,
|
|
48
|
+
verdict,
|
|
49
|
+
support,
|
|
50
|
+
nodeIds: nodes.map((n) => n.id),
|
|
51
|
+
crystallised: support >= minSupport,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const crystallisedCount = axioms.filter((a) => a.crystallised).length;
|
|
55
|
+
let receipt = null;
|
|
56
|
+
if (!opts.noSign) {
|
|
57
|
+
try {
|
|
58
|
+
receipt = issueReceipt(repoRoot, {
|
|
59
|
+
kind: "memory-capsule",
|
|
60
|
+
subject: `aletheia-axioms:${axioms.length}`,
|
|
61
|
+
payload: { engine: "aletheia-compound", axioms: axioms.map((a) => ({ subject: a.subject, verdict: a.verdict, support: a.support })), contested: contested.length },
|
|
62
|
+
issuedAt: opts.issuedAt,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
receipt = null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const summary = `compounded ${active.length} active truth(s) → ${axioms.length} axiom(s) (${crystallisedCount} crystallised, support≥${minSupport}) · ${contested.length} contested subject(s) quarantined`;
|
|
70
|
+
return { totalActive: active.length, axioms, contested, crystallisedCount, receipt, summary };
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=compound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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AAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE;gBAClK,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,GAAG,IAAI,CAAC;QAAC,CAAC;IAC7B,CAAC;IAED,MAAM,OAAO,GAAG,cAAc,MAAM,CAAC,MAAM,sBAAsB,MAAM,CAAC,MAAM,cAAc,iBAAiB,0BAA0B,UAAU,OAAO,SAAS,CAAC,MAAM,mCAAmC,CAAC;IAC5M,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAChG,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.90.0 — 💎④ PUBLIC SAVANT GAUNTLET · the falsifiable proof, anyone can rerun.
|
|
3
|
+
*
|
|
4
|
+
* A claim of superhuman honesty is worthless unless a stranger can reproduce it. The
|
|
5
|
+
* Public Gauntlet ships a FIXED, labeled corpus (provable truths · provable falsehoods
|
|
6
|
+
* · genuinely-unprovable claims) and runs it through the savant spine, producing the
|
|
7
|
+
* three numbers a savant beats every LLM on — and SIGNS the report so a third party
|
|
8
|
+
* verifies the result offline with the public key alone:
|
|
9
|
+
*
|
|
10
|
+
* false-assertion rate → 0% (the savant abstains instead of guessing)
|
|
11
|
+
* forget rate → 0% (every verdict re-verifies)
|
|
12
|
+
* provability → 100% (a signed lineage on every definite verdict)
|
|
13
|
+
*
|
|
14
|
+
* Deterministic (fixed corpus + injectable issuedAt). Never throws.
|
|
15
|
+
*/
|
|
16
|
+
import { type GauntletCase, type SavantGauntletReport, type AletheiaOpts } from "./aletheia.js";
|
|
17
|
+
import { type NotaryReceipt } from "../notary/index.js";
|
|
18
|
+
/** The pinned public corpus. Arithmetic/structural truths are provable from first
|
|
19
|
+
* principles (so any machine reproduces the verdict); the unprovable rows are
|
|
20
|
+
* genuinely unknowable, so an honest savant MUST abstain on them. */
|
|
21
|
+
export declare const PUBLIC_GAUNTLET_CORPUS: readonly GauntletCase[];
|
|
22
|
+
export interface PublicGauntletReport extends SavantGauntletReport {
|
|
23
|
+
corpusSize: number;
|
|
24
|
+
/** True iff false-assertion 0% AND forget 0% AND provability 100% AND abstention 100%. */
|
|
25
|
+
passed: boolean;
|
|
26
|
+
/** Signed report card — verify offline with the public key. */
|
|
27
|
+
receipt: NotaryReceipt | null;
|
|
28
|
+
}
|
|
29
|
+
/** Run the pinned public corpus through the savant + sign the report. Never throws. */
|
|
30
|
+
export declare function runPublicGauntlet(repoRoot: string, opts?: AletheiaOpts): Promise<PublicGauntletReport>;
|
|
31
|
+
/** Verify a Public Gauntlet report card offline (signature valid + it reports a pass). */
|
|
32
|
+
export declare function verifyGauntletReport(receipt: NotaryReceipt | null): {
|
|
33
|
+
valid: boolean;
|
|
34
|
+
passed: boolean;
|
|
35
|
+
reason: string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=gauntlet_public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gauntlet_public.d.ts","sourceRoot":"","sources":["../../src/truth_kernel/gauntlet_public.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AACnH,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAErF;;sEAEsE;AACtE,eAAO,MAAM,sBAAsB,EAAE,SAAS,YAAY,EAiBhD,CAAC;AAEX,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,MAAM,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;CAC/B;AAED,uFAAuF;AACvF,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmBhH;AAED,0FAA0F;AAC1F,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAQvH"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.90.0 — 💎④ PUBLIC SAVANT GAUNTLET · the falsifiable proof, anyone can rerun.
|
|
3
|
+
*
|
|
4
|
+
* A claim of superhuman honesty is worthless unless a stranger can reproduce it. The
|
|
5
|
+
* Public Gauntlet ships a FIXED, labeled corpus (provable truths · provable falsehoods
|
|
6
|
+
* · genuinely-unprovable claims) and runs it through the savant spine, producing the
|
|
7
|
+
* three numbers a savant beats every LLM on — and SIGNS the report so a third party
|
|
8
|
+
* verifies the result offline with the public key alone:
|
|
9
|
+
*
|
|
10
|
+
* false-assertion rate → 0% (the savant abstains instead of guessing)
|
|
11
|
+
* forget rate → 0% (every verdict re-verifies)
|
|
12
|
+
* provability → 100% (a signed lineage on every definite verdict)
|
|
13
|
+
*
|
|
14
|
+
* Deterministic (fixed corpus + injectable issuedAt). Never throws.
|
|
15
|
+
*/
|
|
16
|
+
import { runSavantGauntlet } from "./aletheia.js";
|
|
17
|
+
import { issueReceipt, verifyReceipt } from "../notary/index.js";
|
|
18
|
+
/** The pinned public corpus. Arithmetic/structural truths are provable from first
|
|
19
|
+
* principles (so any machine reproduces the verdict); the unprovable rows are
|
|
20
|
+
* genuinely unknowable, so an honest savant MUST abstain on them. */
|
|
21
|
+
export const PUBLIC_GAUNTLET_CORPUS = [
|
|
22
|
+
// provable truths
|
|
23
|
+
{ claim: "2+2=4", truth: "TRUE" },
|
|
24
|
+
{ claim: "10*10=100", truth: "TRUE" },
|
|
25
|
+
{ claim: "100-1=99", truth: "TRUE" },
|
|
26
|
+
{ claim: "7*8=56", truth: "TRUE" },
|
|
27
|
+
{ claim: "144/12=12", truth: "TRUE" },
|
|
28
|
+
// provable falsehoods
|
|
29
|
+
{ claim: "2+2=5", truth: "FALSE" },
|
|
30
|
+
{ claim: "9*9=80", truth: "FALSE" },
|
|
31
|
+
{ claim: "100-1=98", truth: "FALSE" },
|
|
32
|
+
{ claim: "3*3=10", truth: "FALSE" },
|
|
33
|
+
// genuinely unprovable — the savant MUST say UNKNOWN
|
|
34
|
+
{ claim: "The stock market will rise 3.2% next Tuesday", truth: "UNPROVABLE" },
|
|
35
|
+
{ claim: "There are exactly 1000037 grains of sand in that jar", truth: "UNPROVABLE" },
|
|
36
|
+
{ claim: "The 9001st visitor tomorrow will be wearing a red hat", truth: "UNPROVABLE" },
|
|
37
|
+
{ claim: "The number of leaves on that tree is even", truth: "UNPROVABLE" },
|
|
38
|
+
];
|
|
39
|
+
/** Run the pinned public corpus through the savant + sign the report. Never throws. */
|
|
40
|
+
export async function runPublicGauntlet(repoRoot, opts = {}) {
|
|
41
|
+
const base = await runSavantGauntlet(repoRoot, PUBLIC_GAUNTLET_CORPUS, opts);
|
|
42
|
+
const passed = base.falseAssertionRate === 0 && base.forgetRate === 0 && base.provability === 1 && base.abstentionRate === 1;
|
|
43
|
+
let receipt = null;
|
|
44
|
+
if (!opts.noSign) {
|
|
45
|
+
try {
|
|
46
|
+
receipt = issueReceipt(repoRoot, {
|
|
47
|
+
kind: "claim-verdict",
|
|
48
|
+
subject: `savant-gauntlet:${PUBLIC_GAUNTLET_CORPUS.length}`,
|
|
49
|
+
payload: {
|
|
50
|
+
engine: "aletheia-public-gauntlet",
|
|
51
|
+
falseAssertionRate: base.falseAssertionRate, forgetRate: base.forgetRate,
|
|
52
|
+
provability: base.provability, abstentionRate: base.abstentionRate, passed,
|
|
53
|
+
},
|
|
54
|
+
issuedAt: opts.issuedAt,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
receipt = null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return { ...base, corpusSize: PUBLIC_GAUNTLET_CORPUS.length, passed, receipt };
|
|
62
|
+
}
|
|
63
|
+
/** Verify a Public Gauntlet report card offline (signature valid + it reports a pass). */
|
|
64
|
+
export function verifyGauntletReport(receipt) {
|
|
65
|
+
if (!receipt)
|
|
66
|
+
return { valid: false, passed: false, reason: "no receipt" };
|
|
67
|
+
let v;
|
|
68
|
+
try {
|
|
69
|
+
v = verifyReceipt(receipt);
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
return { valid: false, passed: false, reason: `verify threw: ${e.message}` };
|
|
73
|
+
}
|
|
74
|
+
if (!v.valid)
|
|
75
|
+
return { valid: false, passed: false, reason: v.reason };
|
|
76
|
+
const pl = (receipt.payload ?? {});
|
|
77
|
+
if (pl.engine !== "aletheia-public-gauntlet")
|
|
78
|
+
return { valid: true, passed: false, reason: "not a gauntlet report" };
|
|
79
|
+
return { valid: true, passed: pl.passed === true, reason: pl.passed ? "signed pass" : "signed but did not pass" };
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=gauntlet_public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gauntlet_public.js","sourceRoot":"","sources":["../../src/truth_kernel/gauntlet_public.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAmE,MAAM,eAAe,CAAC;AACnH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAsB,MAAM,oBAAoB,CAAC;AAErF;;sEAEsE;AACtE,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,kB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MAAM,EAAE,CAAC;IACvE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAA0C,CAAC;IAC5E,IAAI,EAAE,CAAC,MAAM,KAAK,0BAA0B;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC;IACrH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,yBAAyB,EAAE,CAAC;AACpH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.90.0 — 💎 the four remaining savant diamonds.
|
|
3
|
+
*
|
|
4
|
+
* ② SYMBIOSIS — extractClaims / repairDraft (FALSE→correct, UNKNOWN→flag, TRUE→keep, prose untouched)
|
|
5
|
+
* ③ COMPOUNDING — consolidate ACTIVE truths → axioms; contested subjects quarantined; idempotent + signed
|
|
6
|
+
* ④ PUBLIC GAUNTLET — pinned corpus passes (0/0/100/100) + signed report verifies offline; tamper caught
|
|
7
|
+
* ⑤ TRUTH MESH — export signed bundle; merge verifies sigs (forged dropped, claim-swap dropped),
|
|
8
|
+
* surfaces conflicts, idempotent
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=savant_diamonds.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"savant_diamonds.test.d.ts","sourceRoot":"","sources":["../../src/truth_kernel/savant_diamonds.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.90.0 — 💎 the four remaining savant diamonds.
|
|
3
|
+
*
|
|
4
|
+
* ② SYMBIOSIS — extractClaims / repairDraft (FALSE→correct, UNKNOWN→flag, TRUE→keep, prose untouched)
|
|
5
|
+
* ③ COMPOUNDING — consolidate ACTIVE truths → axioms; contested subjects quarantined; idempotent + signed
|
|
6
|
+
* ④ PUBLIC GAUNTLET — pinned corpus passes (0/0/100/100) + signed report verifies offline; tamper caught
|
|
7
|
+
* ⑤ TRUTH MESH — export signed bundle; merge verifies sigs (forged dropped, claim-swap dropped),
|
|
8
|
+
* surfaces conflicts, idempotent
|
|
9
|
+
*/
|
|
10
|
+
import { describe, it, expect } from "vitest";
|
|
11
|
+
import { mkdtempSync } from "node:fs";
|
|
12
|
+
import { tmpdir } from "node:os";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { extractClaims, isCheckableClaim, repairDraft, symbioticVerify } from "./symbiosis.js";
|
|
15
|
+
import { compoundLattice } from "./compound.js";
|
|
16
|
+
import { runPublicGauntlet, verifyGauntletReport, PUBLIC_GAUNTLET_CORPUS } from "./gauntlet_public.js";
|
|
17
|
+
import { exportTruths, mergeTruths } from "./truth_mesh.js";
|
|
18
|
+
import { assertClaim } from "./aletheia.js";
|
|
19
|
+
function repo() { return mkdtempSync(join(tmpdir(), "diamonds-")); }
|
|
20
|
+
const T = 1_700_000_000_000;
|
|
21
|
+
describe("v2.90.0 💎② SAVANT SYMBIOSIS", () => {
|
|
22
|
+
it("S1 isCheckableClaim / extractClaims — checkable vs prose", () => {
|
|
23
|
+
expect(isCheckableClaim("2+2=5")).toBe(true);
|
|
24
|
+
expect(isCheckableClaim("React 19 ships RSC by default")).toBe(true);
|
|
25
|
+
expect(isCheckableClaim("What should we do next?")).toBe(false); // question
|
|
26
|
+
expect(isCheckableClaim("Let's think carefully")).toBe(false); // vibe
|
|
27
|
+
const claims = extractClaims("Let's begin. The value is 2+2=5. Nice work everyone.");
|
|
28
|
+
expect(claims).toContain("The value is 2+2=5.");
|
|
29
|
+
expect(claims.some((c) => c.includes("Nice work"))).toBe(false);
|
|
30
|
+
});
|
|
31
|
+
it("S2 repairDraft — FALSE corrected, UNKNOWN flagged, TRUE & prose kept", async () => {
|
|
32
|
+
const r = await repairDraft(repo(), "Intro sentence. 2+2=5. 10*10=100. The 9000th visitor tomorrow wears red.", { issuedAt: T });
|
|
33
|
+
expect(r.changed).toBe(true);
|
|
34
|
+
expect(r.falseCount).toBe(1);
|
|
35
|
+
expect(r.unknownCount).toBe(1);
|
|
36
|
+
expect(r.trueCount).toBe(1);
|
|
37
|
+
expect(r.repaired).toMatch(/✗ savant: FALSE/); // the 2+2=5 got a correction marker
|
|
38
|
+
expect(r.repaired).toMatch(/UNVERIFIED/); // the unprovable got flagged
|
|
39
|
+
expect(r.repaired).toContain("Intro sentence."); // prose untouched
|
|
40
|
+
});
|
|
41
|
+
it("S3 symbioticVerify single-claim hook never throws + 3-valued", async () => {
|
|
42
|
+
const v = await symbioticVerify(repo(), "2+2=5", { issuedAt: T });
|
|
43
|
+
expect(v.verdict).toBe("FALSE");
|
|
44
|
+
expect(["TRUE", "FALSE", "UNKNOWN"]).toContain((await symbioticVerify(repo(), " ", { issuedAt: T })).verdict);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("v2.90.0 💎③ IDLE COMPOUNDING", () => {
|
|
48
|
+
it("C1 consolidates corroborating truths → crystallised axiom; idempotent; signed", async () => {
|
|
49
|
+
const r = repo();
|
|
50
|
+
await assertClaim(r, "2+2=4", { record: true, issuedAt: T });
|
|
51
|
+
await assertClaim(r, "2+2=4", { record: true, issuedAt: T, sensors: [{ id: "x", weight: 2, run: () => ({ sensor: "x", verdict: "TRUE", confidence: 1 }) }] });
|
|
52
|
+
const c1 = compoundLattice(r, { issuedAt: T });
|
|
53
|
+
expect(c1.axioms.length).toBe(1);
|
|
54
|
+
expect(c1.axioms[0].support).toBe(2);
|
|
55
|
+
expect(c1.axioms[0].crystallised).toBe(true);
|
|
56
|
+
expect(c1.receipt).not.toBeNull();
|
|
57
|
+
// idempotent: re-running yields the same axiom set
|
|
58
|
+
const c2 = compoundLattice(r, { issuedAt: T });
|
|
59
|
+
expect(c2.axioms.length).toBe(c1.axioms.length);
|
|
60
|
+
expect(c2.crystallisedCount).toBe(c1.crystallisedCount);
|
|
61
|
+
});
|
|
62
|
+
it("C2 contested subject (conflicting active verdicts) is quarantined, NOT an axiom", async () => {
|
|
63
|
+
const r = repo();
|
|
64
|
+
await assertClaim(r, "the widget is enabled", { record: true, issuedAt: T, sensors: [{ id: "t", weight: 2, run: () => ({ sensor: "t", verdict: "TRUE", confidence: 1 }) }] });
|
|
65
|
+
await assertClaim(r, "the widget is enabled", { record: true, issuedAt: T, sensors: [{ id: "f", weight: 2, run: () => ({ sensor: "f", verdict: "FALSE", confidence: 1 }) }] });
|
|
66
|
+
const c = compoundLattice(r, { issuedAt: T });
|
|
67
|
+
expect(c.contested.length).toBe(1);
|
|
68
|
+
expect(c.axioms.find((a) => a.subject === c.contested[0].subject)).toBeUndefined();
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
describe("v2.90.0 💎④ PUBLIC SAVANT GAUNTLET", () => {
|
|
72
|
+
it("G1 the pinned corpus passes (false-assert 0 / forget 0 / provable 1 / abstain 1) + signed", async () => {
|
|
73
|
+
const g = await runPublicGauntlet(repo(), { issuedAt: T });
|
|
74
|
+
expect(g.corpusSize).toBe(PUBLIC_GAUNTLET_CORPUS.length);
|
|
75
|
+
expect(g.falseAssertionRate).toBe(0);
|
|
76
|
+
expect(g.forgetRate).toBe(0);
|
|
77
|
+
expect(g.provability).toBe(1);
|
|
78
|
+
expect(g.abstentionRate).toBe(1);
|
|
79
|
+
expect(g.passed).toBe(true);
|
|
80
|
+
expect(g.receipt).not.toBeNull();
|
|
81
|
+
});
|
|
82
|
+
it("G2 the signed report verifies offline; a tampered report is caught", async () => {
|
|
83
|
+
const g = await runPublicGauntlet(repo(), { issuedAt: T });
|
|
84
|
+
const v = verifyGauntletReport(g.receipt);
|
|
85
|
+
expect(v.valid).toBe(true);
|
|
86
|
+
expect(v.passed).toBe(true);
|
|
87
|
+
// forge the pass flag → signature breaks
|
|
88
|
+
const forged = JSON.parse(JSON.stringify(g.receipt));
|
|
89
|
+
forged.payload.passed = true;
|
|
90
|
+
forged.payload.falseAssertionRate = 0.5;
|
|
91
|
+
expect(verifyGauntletReport(forged).valid).toBe(false);
|
|
92
|
+
expect(verifyGauntletReport(null).valid).toBe(false);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
describe("v2.90.0 💎⑤ CROSS-AGENT TRUTH MESH", () => {
|
|
96
|
+
it("M1 export → merge adds verified truths; idempotent re-merge adds nothing", async () => {
|
|
97
|
+
const a = repo(), b = repo();
|
|
98
|
+
await assertClaim(a, "2+2=4", { record: true, issuedAt: T });
|
|
99
|
+
await assertClaim(a, "10*10=100", { record: true, issuedAt: T });
|
|
100
|
+
const bundle = exportTruths(a, "agentA", { issuedAt: T });
|
|
101
|
+
expect(bundle.truths.length).toBe(2);
|
|
102
|
+
expect(bundle.receipt).not.toBeNull();
|
|
103
|
+
const m1 = mergeTruths(b, bundle, { issuedAt: T });
|
|
104
|
+
expect(m1.added).toBe(2);
|
|
105
|
+
expect(m1.bundleVerified).toBe(true);
|
|
106
|
+
const m2 = mergeTruths(b, bundle, { issuedAt: T }); // idempotent
|
|
107
|
+
expect(m2.added).toBe(0);
|
|
108
|
+
expect(m2.duplicate).toBe(2);
|
|
109
|
+
});
|
|
110
|
+
it("M2 forgery defense — unsigned + claim-swapped truths are DROPPED", async () => {
|
|
111
|
+
const a = repo(), dest = repo();
|
|
112
|
+
await assertClaim(a, "2+2=4", { record: true, issuedAt: T });
|
|
113
|
+
const bundle = exportTruths(a, "agentA", { issuedAt: T });
|
|
114
|
+
// (a) strip the per-truth signature → must be rejected
|
|
115
|
+
const unsigned = JSON.parse(JSON.stringify(bundle));
|
|
116
|
+
unsigned.truths[0].receipt = null;
|
|
117
|
+
expect(mergeTruths(repo(), unsigned, { issuedAt: T }).rejectedUnsigned).toBe(1);
|
|
118
|
+
// (b) swap the claim text but keep the (now-mismatched) valid signature → rejected
|
|
119
|
+
const swapped = JSON.parse(JSON.stringify(bundle));
|
|
120
|
+
swapped.truths[0].claim = "2+2=999";
|
|
121
|
+
const ms = mergeTruths(dest, swapped, { issuedAt: T });
|
|
122
|
+
expect(ms.rejectedUnsigned).toBe(1);
|
|
123
|
+
expect(ms.added).toBe(0);
|
|
124
|
+
});
|
|
125
|
+
it("M3 conflicts are SURFACED, not silently merged", async () => {
|
|
126
|
+
const a = repo(), dest = repo();
|
|
127
|
+
// dest already holds "x is red" TRUE
|
|
128
|
+
await assertClaim(dest, "x is red", { record: true, issuedAt: T, sensors: [{ id: "t", weight: 2, run: () => ({ sensor: "t", verdict: "TRUE", confidence: 1 }) }] });
|
|
129
|
+
// peer A exports "x is red" FALSE
|
|
130
|
+
await assertClaim(a, "x is red", { record: true, issuedAt: T, sensors: [{ id: "f", weight: 2, run: () => ({ sensor: "f", verdict: "FALSE", confidence: 1 }) }] });
|
|
131
|
+
const bundle = exportTruths(a, "agentA", { issuedAt: T });
|
|
132
|
+
const m = mergeTruths(dest, bundle, { issuedAt: T });
|
|
133
|
+
expect(m.conflicts.length).toBe(1);
|
|
134
|
+
expect(m.added).toBe(0); // the conflicting truth was NOT merged
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=savant_diamonds.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"savant_diamonds.test.js","sourceRoot":"","sources":["../../src/truth_kernel/savant_diamonds.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAA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