Initial curated projectbrain source from 8a7b1e0651dbdab97d744cbd2e653ab3970ac6c5
This commit is contained in:
commit
5aa3e8d685
700 files changed
+132801
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { reconcileTruthCandidates } from "../src/services/projectKnowledge.js";
|
||||
|
||||
describe("project knowledge truth reconciliation", () => {
|
||||
it("flags ambiguous disagreement as one actionable conflict", () => {
|
||||
const conflicts = reconcileTruthCandidates([
|
||||
{ key: "architecture", claim: "uses service a", source: "memory", authority: "memory", confidence: 90, entryId: "memory:1" },
|
||||
{ key: "architecture", claim: "uses service b", source: "documentation", authority: "roadmap", confidence: 80, entryId: "documentation:1" },
|
||||
]);
|
||||
expect(conflicts).toHaveLength(1);
|
||||
expect(conflicts[0]).toMatchObject({ status: "attention", entryIds: ["memory:1", "documentation:1"] });
|
||||
});
|
||||
|
||||
it("lets verified repository truth supersede stale descriptive memory", () => {
|
||||
const conflicts = reconcileTruthCandidates([
|
||||
{ key: "architecture", claim: "uses service a", source: "memory", authority: "memory", confidence: 95, entryId: "memory:1" },
|
||||
{ key: "architecture", claim: "uses service b", source: "repository", authority: "repository", confidence: 95, verifiedAt: "2026-09-12T10:00:00.000Z", entryId: "repo:1" },
|
||||
]);
|
||||
expect(conflicts[0]).toMatchObject({ status: "reconciled", winningEntryId: "repo:1" });
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user