补2025产品候选并核对成立年与Trace主体

This commit is contained in:
2026-10-30 15:21:28 +08:00
parent dca7c81889
commit 79a6a8dbd7
9 changed files with 699 additions and 75 deletions
+23 -3
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, 1016);
assert.equal(initial.evidence.length, 1101);
assert.equal(initial.evidence.length, 1124);
assert.equal(initial.observations.length, 187);
assert.deepEqual(initial.candidateBatches, seed.candidateBatches, "candidate gaps persist in the same database metadata");
assert.deepEqual(readResearchSnapshot(), initial, "reopening does not duplicate records");
@@ -63,7 +63,7 @@ test("research validation rejects broken evidence and unsafe source links", () =
test("reviews link explicit companies without turning global or excluded cases into companies", () => {
const snapshot = structuredClone(seed) as ResearchSnapshot;
assert.equal(snapshot.reviews.filter((r) => r.scope === "companies").length, 46);
assert.equal(snapshot.reviews.filter((r) => r.scope === "companies").length, 47);
assert.equal(snapshot.reviews.filter((r) => r.scope === "dataset").length, 3);
assert.equal(snapshot.reviews.filter((r) => r.scope === "excluded-candidate").length, 8);
const review = snapshot.reviews.find((r) => r.id === "R4")!;
@@ -96,7 +96,7 @@ test("disclosure counts exclude client income, biographies, targets and duplicat
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, 8);
assert.equal(snapshot.companies.filter((c) => c.technicalReview).length, 9);
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "public-artifact").length, 4);
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "independent-test").length, 1);
assert.equal(snapshot.companies.find((c) => c.id === "AI051")?.revenueStatus, "unknown");
@@ -271,3 +271,23 @@ test("product launch candidates preserve unresolved years and many launches per
kilo[0].companyId = "missing-company";
assert.throws(() => validateResearch(snapshot), /research candidate/);
});
test("annual launch archives exclude older companies only with evidence and reuse existing records", () => {
const snapshot = structuredClone(seed) as ResearchSnapshot;
const batch = snapshot.candidateBatches!.find((b) => b.id === "PH-2025-visible-1")!;
assert.equal(batch.complete, false);
assert.equal(batch.records.length, 19);
const older = batch.records.filter((r) => r.status === "outside-cohort");
assert.equal(older.length, 3);
assert.ok(older.every((r) => !r.companyId && r.evidenceIds?.length));
assert.equal(batch.records.find((r) => r.name === "Trace")?.companyId, "YC30687");
const trace = snapshot.companies.find((c) => c.id === "YC30687")!;
assert.equal(trace.profileOnly, false);
assert.equal(trace.directoryOrigin, "yc-2025-2026");
assert.equal(trace.revenueStatus, "unknown");
assert.ok(!snapshot.observations.some((o) => o.evidence === "TRACE-HOME"), "demo metrics must not become reported results");
older[0].evidenceIds = [];
assert.throws(() => validateResearch(snapshot), /research candidate/);
older[0].evidenceIds = ["missing-proof"];
assert.throws(() => validateResearch(snapshot), /research candidate/);
});