Complete SR007 profile reconciliation and qualify historical revenue categories

This commit is contained in:
2026-11-01 01:44:35 +08:00
parent cd3e0c695c
commit 6e3a505d24
6 changed files with 692 additions and 121 deletions
+28 -8
View File
@@ -124,10 +124,10 @@ 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, 1253);
assert.equal(initial.evidence.length, 4866);
assert.equal(initial.evidence.length, 4894);
assert.equal(initial.observations.length, 491);
const businessReviews = initial.reviews.filter((review) => review.type === businessModelReviewType);
assert.equal(businessReviews.length, 6);
assert.equal(businessReviews.length, 7);
assert.deepEqual(businessReviews, seed.reviews.filter((review) => review.type === businessModelReviewType)
.sort((a, b) => a.id.localeCompare(b.id)),
"business model assessments and company/evidence links persist in the shared database");
@@ -169,8 +169,8 @@ 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, 244);
assert.equal(snapshot.reviews.filter((r) => r.scope === "dataset").length, 146);
assert.equal(snapshot.reviews.filter((r) => r.scope === "companies").length, 248);
assert.equal(snapshot.reviews.filter((r) => r.scope === "dataset").length, 147);
assert.equal(snapshot.reviews.filter((r) => r.scope === "excluded-candidate").length, 54);
const review = snapshot.reviews.find((r) => r.id === "R4")!;
assert.deepEqual(reviewCompanyIds(snapshot, review), ["AI007", "AI013", "AI021", "AI034"]);
@@ -229,7 +229,7 @@ test("service run rates, legacy freight revenue and paid adoption do not become
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, 238);
assert.equal(snapshot.companies.filter((c) => c.technicalReview).length, 244);
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "public-artifact").length, 28);
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "independent-test").length, 1);
assert.equal(snapshot.companies.find((c) => c.id === "AI051")?.revenueStatus, "unknown");
@@ -587,9 +587,9 @@ test("the public SR007 roster preserves unique entries and Alven's older operato
assert.ok(!arrDisclosures(snapshot).some(({ observation }) => observation.id.startsWith("SR007F8-")),
"previous-company ARR and financial amounts in document demonstrations are not current revenue");
assert.equal(batch.records.filter((row) => row.status === "linked").length, 71);
assert.equal(batch.records.filter((row) => row.profileStatus === "archive-only").length, 17,
"reused roster matches are not newly reread independent profiles");
assert.equal(batch.records.filter((row) => row.profileStatus === "readable").length, 62);
assert.equal(batch.records.filter((row) => row.profileStatus === "archive-only").length, 0,
"all reused independent profiles have now been explicitly reread");
assert.equal(batch.records.filter((row) => row.profileStatus === "readable").length, 79);
const ninthFollowup = snapshot.observations.filter((item) => item.id.startsWith("SR007F9-"));
assert.equal(ninthFollowup.length, 10);
assert.equal(ninthFollowup.filter((item) => item.selection === "excluded").length, 6);
@@ -608,6 +608,26 @@ test("the public SR007 roster preserves unique entries and Alven's older operato
}
assert.equal(snapshot.companies.find((item) => item.id === "AI161")!.cat, "C02",
"enterprise workload model specialization is classified by delivery rather than frontier-model slogans");
const rereadProfiles = snapshot.evidence.filter((item) => item.id.startsWith("SR007F10-P-"));
assert.equal(rereadProfiles.length, 17);
assert.equal(new Set(rereadProfiles.map((item) => item.companyId)).size, 17);
for (const evidence of rereadProfiles) {
const candidate = batch.records.find((row) => row.companyId === evidence.companyId)!;
assert.equal(candidate.url, evidence.url);
assert.ok(candidate.evidenceIds?.includes(evidence.id), "each reread has an exact profile link");
}
assert.ok(!snapshot.observations.some((item) => item.id.startsWith("SR007F10-")),
"rereading existing financial milestones must not introduce duplicate observations");
for (const id of ["AI067", "AI069"]) {
assert.equal(snapshot.companies.find((item) => item.id === id)!.cat, "C02",
"current hosted-model and training-data delivery are infrastructure");
}
const oldWorkflowArr = snapshot.observations.find((item) => item.id === "SR-O-AI069-arr")!;
assert.equal(oldWorkflowArr.evidence, "SR-E-infragrid", "retain the original workflow revenue evidence");
assert.equal(oldWorkflowArr.value, 302000);
assert.equal(oldWorkflowArr.observedAt, undefined);
assert.ok(snapshot.companies.find((item) => item.id === "AI069")!.notes.includes("历史ARR归属不清"),
"a current category change must retain the unresolved historical product attribution");
});
test("annual launch archives exclude older companies only with evidence and reuse existing records", () => {