增加技术验证证据筛选并区分材料与独立测试

This commit is contained in:
2026-10-30 05:41:35 +08:00
parent 3e0cbf9831
commit cfb9273f88
7 changed files with 130 additions and 21 deletions
+21 -1
View File
@@ -24,7 +24,7 @@ test("research revisions share the authentication database and preserve replay l
assert.equal(consumeCode(config, "invalid"), "limited");
const initial = readResearchSnapshot();
assert.equal(initial.companies.length, 1006);
assert.equal(initial.evidence.length, 1067);
assert.equal(initial.evidence.length, 1069);
assert.equal(initial.observations.length, 129);
assert.deepEqual(readResearchSnapshot(), initial, "reopening does not duplicate records");
const db = openSiteDatabase();
@@ -73,6 +73,26 @@ test("disclosure counts exclude client income, biographies, targets and duplicat
assert.ok(snapshot.observations.filter((o) => o.selection === "signal").every((o) => o.scope === "公司整体"));
});
test("technical reviews keep accessible materials separate from tested capabilities", () => {
const snapshot = structuredClone(seed) as ResearchSnapshot;
assert.equal(snapshot.companies.filter((c) => c.technicalReview).length, 5);
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "public-artifact").length, 2);
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "independent-test").length, 0);
const company = snapshot.companies.find((c) => c.id === "AI061")!;
const review = company.technicalReview!;
review.evidenceIds = ["missing-technical-evidence"];
assert.throws(() => validateResearch(snapshot), /technical review/);
review.evidenceIds = ["TECH-NAIVE-HF"];
review.reviewedAt = "2026-02-30";
assert.throws(() => validateResearch(snapshot), /technical review/);
review.reviewedAt = "2099-01-01";
assert.throws(() => validateResearch(snapshot), /technical review/);
review.reviewedAt = snapshot.asOf;
review.level = "independent-test";
assert.throws(() => validateResearch(snapshot), /technical review/,
"an accessible artifact cannot become a test record without a stated test scope");
});
// Retractions and forecasts must stay visible for review without becoming revenue signals.
test("retracted ARR and projected margins remain excluded", () => {
const snapshot = seed as ResearchSnapshot;