Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bb75ee72f8 | |||
| 35249e222a | |||
| 45edbeae1f | |||
| a9af14ac63 | |||
| c1f4366379 | |||
| c0d6b4a8e1 | |||
| db70ef32da | |||
| 55b8fea7a8 | |||
| 701ef632ff | |||
| b6e44625b6 | |||
| c22739d4f8 | |||
| 46bff91af9 | |||
| fe6b3b5951 | |||
| e0806362f0 | |||
| bef80fba4d | |||
| 9c32f77722 | |||
| d631be2617 | |||
| 51d6364ddd | |||
| 17e9306c97 | |||
| 6e3a505d24 | |||
| cd3e0c695c | |||
| 5514875213 | |||
| ec50b3302e | |||
| 68780f1f2b | |||
| 34f7cae0fe | |||
| 76aa80fedc | |||
| 7901ab940e | |||
| d52dac64e5 | |||
| b3fcb9ad3a | |||
| 91d6c22e6b | |||
| e04ab96187 | |||
| eb7e758570 | |||
| 5ba790eec2 | |||
| ac9ddd9c27 | |||
| ea31287924 | |||
| 5b31fa5b77 | |||
| c833aa56c1 | |||
| 0a640d75d4 | |||
| 0bd2ce6b02 | |||
| cce2fd8581 | |||
| ae84304e16 | |||
| c6e5a7b05f | |||
| 9bfd6891c3 |
@@ -182,10 +182,10 @@ async function main() {
|
||||
assert.equal(researchResponse.status, 200, "authenticated research API");
|
||||
assert.ok(researchResponse.headers.get("cache-control")?.includes("no-store"));
|
||||
const research = await researchResponse.json();
|
||||
assert.equal(research.companies.length, 1196);
|
||||
assert.equal(research.companies.length, 1312);
|
||||
assert.equal(research.categories.length, 11);
|
||||
assert.equal(research.evidence.length, 4600);
|
||||
assert.equal(research.observations.length, 453);
|
||||
assert.equal(research.evidence.length, 5354);
|
||||
assert.equal(research.observations.length, 495);
|
||||
assert.equal((await request("/api/research/ai-companies", { method: "POST", headers })).status, 405);
|
||||
const researchPage = await request("/docs/other-research/ai-company-research/overview", { headers });
|
||||
assert.equal(researchPage.status, 200);
|
||||
|
||||
@@ -2,6 +2,8 @@ import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import IncomeDistribution from "./IncomeDistribution";
|
||||
import ArrDisclosures from "./ArrDisclosures";
|
||||
import BusinessModelAssessment from "./BusinessModelAssessment";
|
||||
import ResearchCandidates from "./ResearchCandidates";
|
||||
import {
|
||||
categorySummary, evidenceUrl, technicalReviewLabels, reviewCompanyIds, type ResearchEvidence, type ResearchReview, type ResearchSnapshot,
|
||||
} from "@/lib/ai-research";
|
||||
@@ -56,7 +58,7 @@ export default function AICompanyResearch() {
|
||||
: router.isReady && typeof linkedCompany === "string" && data?.companies.some((c) => c.id === linkedCompany)
|
||||
? linkedCompany : null;
|
||||
function setSelected(id: string | null) { setSelection({ route: router.asPath, id }); }
|
||||
const [tab, setTab] = useState<"companies" | "revenue" | "sources" | "reviews">("companies");
|
||||
const [tab, setTab] = useState<"companies" | "candidates" | "revenue" | "models" | "sources" | "reviews">("companies");
|
||||
const companySection = useRef<HTMLElement>(null);
|
||||
const detailSection = useRef<HTMLElement>(null);
|
||||
useEffect(() => {
|
||||
@@ -128,7 +130,7 @@ export default function AICompanyResearch() {
|
||||
<section ref={companySection} className="research-section" aria-labelledby="research-records-title">
|
||||
<h2 id="research-records-title">研究数据</h2>
|
||||
<div className="research-tabs" role="group" aria-label="研究数据视图">
|
||||
{([['companies','公司与产品'],['revenue','收入观测'],['sources','原始证据'],['reviews','核查记录']] as const).map(([id,label]) =>
|
||||
{([['companies','公司与产品'],['candidates','候选与缺项'],['revenue','收入观测'],['models','商业模式初评'],['sources','原始证据'],['reviews','核查记录']] as const).map(([id,label]) =>
|
||||
<button key={id} aria-pressed={tab === id} onClick={() => setTab(id)}>{label}</button>)}
|
||||
</div>
|
||||
{tab === "companies" && <>
|
||||
@@ -153,6 +155,8 @@ export default function AICompanyResearch() {
|
||||
{!filtered.length && <p className="research-message">没有匹配公司,请调整筛选条件。</p>}
|
||||
{filtered.length > pageSize && <nav className="research-pagination" aria-label="公司数据分页"><button disabled={page === 0} onClick={() => setPage((n) => n - 1)}>上一页</button><span>{page + 1} / {Math.ceil(filtered.length / pageSize)}</span><button disabled={(page + 1) * pageSize >= filtered.length} onClick={() => setPage((n) => n + 1)}>下一页</button></nav>}
|
||||
</>}
|
||||
{tab === "models" && <BusinessModelAssessment data={data} onSelect={setSelected} onChooseCategory={chooseCategory} />}
|
||||
{tab === "candidates" && <ResearchCandidates data={data} onSelect={setSelected} onChooseCategory={chooseCategory} />}
|
||||
{tab === "revenue" && <>
|
||||
<IncomeDistribution data={data} onSelect={setSelected} />
|
||||
<ArrDisclosures data={data} onSelect={setSelected} />
|
||||
|
||||
@@ -1,29 +1,40 @@
|
||||
import { useState } from "react";
|
||||
import { evidenceUrl, type ResearchSnapshot } from "@/lib/ai-research";
|
||||
import { arrDisclosureCoverage, arrDisclosures } from "@/lib/research-statistics";
|
||||
import { arrDisclosureCoverage, arrDisclosures, arrFieldGaps, type ArrFieldGap } from "@/lib/research-statistics";
|
||||
|
||||
const labels: Record<string, string> = {
|
||||
signal: "企业或当事方披露", estimate: "第三方估算",
|
||||
historical: "历史披露", "historical-estimate": "历史估算",
|
||||
};
|
||||
const gapLabels: Record<ArrFieldGap, string> = {
|
||||
date: "缺有效财务截至日", currency: "USD 未确认(含其他币种)",
|
||||
amount: "下界、近似或非精确金额", estimate: "第三方估算",
|
||||
};
|
||||
|
||||
export default function ArrDisclosures({ data, onSelect }: { data: ResearchSnapshot; onSelect: (id: string) => void }) {
|
||||
const [category, setCategory] = useState("");
|
||||
const [year, setYear] = useState("");
|
||||
const rows = arrDisclosures(data, { category, foundedYear: year ? Number(year) : undefined });
|
||||
const [gap, setGap] = useState<ArrFieldGap | "">("");
|
||||
const claims = arrDisclosures(data, { category, foundedYear: year ? Number(year) : undefined });
|
||||
const rows = claims.filter(({ observation }) => !gap || arrFieldGaps(observation, data.asOf).includes(gap));
|
||||
const gapCounts = (Object.keys(gapLabels) as ArrFieldGap[]).map((id) => ({
|
||||
id, count: claims.filter(({ observation }) => arrFieldGaps(observation, data.asOf).includes(id)).length,
|
||||
}));
|
||||
const completeFields = claims.filter(({ observation }) => !arrFieldGaps(observation, data.asOf).length).length;
|
||||
const coverage = arrDisclosureCoverage(data, year ? Number(year) : undefined);
|
||||
const companies = new Set(rows.map((row) => row.company.id));
|
||||
const companies = new Set(claims.map((row) => row.company.id));
|
||||
const categories = new Map(data.categories.map((item) => [item.id, item.name]));
|
||||
const evidence = new Map(data.evidence.map((item) => [item.id, item]));
|
||||
return <section aria-label="ARR披露分类表">
|
||||
<h3>2025—2026 年成立公司的 ARR 披露</h3>
|
||||
<p className="research-notice">这是跨时点证据表,共 {companies.size} 家公司、{rows.length} 条记录;同一公司的历史里程碑逐条保留,不能相加或视为独立公司。ARR 标签沿用原始披露,未证明经常性收入定义或审计状态;不纳入 MRR 图表,不计算同期行业均值或造假概率。仅收录明确标注的 ARR;定义冲突、目标、承诺、客户和前雇主收入排除,缺失不作零。</p>
|
||||
<p className="research-notice">这是跨时点证据表,共 {companies.size} 家公司、{claims.length} 条记录;同一公司的历史里程碑逐条保留,不能相加或视为独立公司。ARR 标签沿用原始披露,未证明经常性收入定义或审计状态;不纳入 MRR 图表,不计算同期行业均值或造假概率。仅收录明确标注的 ARR;定义冲突、目标、承诺、客户和前雇主收入排除,缺失不作零。</p>
|
||||
<div className="research-filters">
|
||||
<label>业务分类<select value={category} onChange={(event) => setCategory(event.target.value)}><option value="">全部分类</option>{data.categories.map((item) => <option key={item.id} value={item.id}>{item.name}</option>)}</select></label>
|
||||
<label>成立年份<select value={year} onChange={(event) => setYear(event.target.value)}><option value="">2025 与 2026</option><option value="2025">2025</option><option value="2026">2026</option></select></label>
|
||||
<label>补证项目<select value={gap} onChange={(event) => setGap(event.target.value as ArrFieldGap | "")}><option value="">全部记录</option>{gapCounts.map((item) => <option key={item.id} value={item.id}>{gapLabels[item.id]}({item.count} 条)</option>)}</select></label>
|
||||
</div>
|
||||
<div className="research-table-wrap"><table>
|
||||
<caption>ARR 披露覆盖:按所选成立年份、每家公司计一次。点击分类筛选下方证据表。</caption>
|
||||
<caption>ARR 披露覆盖:按公司当前分类及所选成立年份、每家公司计一次。点击分类筛选下方证据表。</caption>
|
||||
<thead><tr><th>业务分类</th><th>已采集公司</th><th>企业或当事方披露</th><th>仅第三方估算</th><th>缺少 ARR</th><th>披露覆盖率</th></tr></thead>
|
||||
<tbody>{coverage.filter((item) => item.companies > 0).map((item) => <tr key={item.id}>
|
||||
<td><button onClick={() => setCategory(item.id)} aria-pressed={category === item.id}>{item.name}</button></td>
|
||||
@@ -31,10 +42,16 @@ export default function ArrDisclosures({ data, onSelect }: { data: ResearchSnaps
|
||||
<td>{new Intl.NumberFormat("zh-CN", { style: "percent", maximumFractionDigits: 1 }).format(item.disclosed / item.companies)}</td>
|
||||
</tr>)}</tbody>
|
||||
</table></div>
|
||||
<p className="research-muted">分母含仅有目录资料的公司,覆盖率反映本次采集深度,不代表行业披露率。企业披露含历史里程碑,同一公司兼有披露和估算时归企业披露;缺少 ARR 的公司仍可能有其他收入。披露时点、币种与合同定义未对齐,不能将已披露少数公司的均值外推至整个分类,也不能由离散性判断财务造假。</p>
|
||||
<p className="research-muted">分母含仅有目录资料的公司,覆盖率反映本次采集深度,不代表行业披露率。分类及收费模式采用公司当前资料;公司转向或同时经营多个产品时,历史 ARR 未必属于当前业务,需打开公司核对产品、主体与期间,不能据当前分类重归历史收入。企业披露含历史里程碑,同一公司兼有披露和估算时归企业披露;缺少 ARR 的公司仍可能有其他收入。披露时点、币种与合同定义未对齐,不能将已披露少数公司的均值外推至整个分类,也不能由离散性判断财务造假。</p>
|
||||
<aside className="research-notice" aria-label="ARR比较前的补证检查">
|
||||
<strong>ARR 比较前的补证检查</strong>
|
||||
<p>当前分类及成立年下有 {claims.length} 条披露,{completeFields} 条同时具有有效日期、明确 USD、精确金额且不是第三方估算。补证筛选后显示 {rows.length} 条。</p>
|
||||
<div className="income-options">{gapCounts.map((item) => <button key={item.id} aria-pressed={gap === item.id} onClick={() => setGap(gap === item.id ? "" : item.id)}>{gapLabels[item.id]}:{item.count}</button>)}</div>
|
||||
<p>各项可重叠,不能相加为独立公司数。日期必须是经营指标截至日,网页访问、发布或更新时间不能代替;其他币种保留原值,不擅自换算。基础字段齐全也不证明可比,还需对齐收入定义、业务期间、收费模式、主体与独立验证;这些缺项不作为造假判定。</p>
|
||||
</aside>
|
||||
<div className="research-table-wrap"><table>
|
||||
<caption>金额保留原币种、下界和估算身份;日期栏保留业务截至日缺项</caption>
|
||||
<thead><tr><th>公司 / 分类</th><th>收费与交付模式</th><th>原始 ARR 声明</th><th>时点</th><th>身份 / 限制</th><th>证据</th></tr></thead>
|
||||
<thead><tr><th>公司 / 当前分类</th><th>当前收费与交付模式</th><th>原始 ARR 声明</th><th>时点</th><th>身份 / 限制</th><th>证据</th></tr></thead>
|
||||
<tbody>{rows.map(({ company, observation: item }) => {
|
||||
const source = evidence.get(item.evidence);
|
||||
const url = source && evidenceUrl(source.url);
|
||||
@@ -42,11 +59,11 @@ export default function ArrDisclosures({ data, onSelect }: { data: ResearchSnaps
|
||||
<td><button onClick={() => onSelect(company.id)}>{company.name}</button><small>{categories.get(company.cat)} · {company.year}</small></td>
|
||||
<td>{company.businessModel ?? company.price}</td>
|
||||
<td>{item.bound !== "=" && item.bound}{new Intl.NumberFormat("zh-CN", { maximumFractionDigits: 2 }).format(item.value)} {item.unit}<small>{item.kind}</small></td>
|
||||
<td>{item.timing}</td><td>{labels[item.selection]}<small>{item.reason}</small></td>
|
||||
<td>{item.timing}</td><td>{labels[item.selection]}<small>{item.reason}</small><small>{arrFieldGaps(item, data.asOf).map((id) => gapLabels[id]).join(";") || "基础字段齐全;定义、期间与主体仍须核实"}</small></td>
|
||||
<td>{url ? <a href={url} target="_blank" rel="noopener noreferrer">{item.evidence} ↗</a> : item.evidence}</td>
|
||||
</tr>;
|
||||
})}</tbody>
|
||||
</table></div>
|
||||
{!rows.length && <p>当前筛选没有符合条件的已记录 ARR 声明;不代表这些公司收入为零。</p>}
|
||||
{!rows.length && <p>当前分类、成立年与补证筛选没有符合条件的已记录 ARR 声明;不代表这些公司收入为零。</p>}
|
||||
</section>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import { businessModelReviewType, evidenceUrl, reviewCompanyIds, type ResearchSnapshot } from "@/lib/ai-research";
|
||||
|
||||
export default function BusinessModelAssessment({ data, onSelect, onChooseCategory }: {
|
||||
data: ResearchSnapshot; onSelect: (id: string) => void; onChooseCategory: (id: string) => void;
|
||||
}) {
|
||||
const reviews = data.reviews.filter((review) => review.type === businessModelReviewType && review.scope === "companies");
|
||||
const evidence = new Map(data.evidence.map((item) => [item.id, item]));
|
||||
return <section aria-labelledby="research-models-title">
|
||||
<h3 id="research-models-title">商业模式初评</h3>
|
||||
<p>从已核个案提炼收费方式、成本约束与下一步验证条件。已知事实与研究判断分列;同一种收费方式可以跨业务分类,以下个案不能代表整个行业。</p>
|
||||
<p className="research-muted">这是基于当前证据的初步评估,不是收入预测或盈利排名。判断能否用于我们的业务,还需用实际客户任务、付费留存与交付成本验证;ARR 或平台 MRR 单独不能证明利润。</p>
|
||||
{reviews.length ? <div className="research-table-wrap"><table>
|
||||
<caption>收费模式与业务分类、公司明细及原始证据相互关联</caption>
|
||||
<thead><tr><th scope="col">模式 / 业务分类</th><th scope="col">已核事实</th><th scope="col">初步判断 / 验证条件</th><th scope="col">参考个案与证据</th></tr></thead>
|
||||
<tbody>{reviews.map((review) => {
|
||||
const companyIds = new Set(reviewCompanyIds(data, review));
|
||||
const companies = data.companies.filter((company) => companyIds.has(company.id));
|
||||
const categories = data.categories.filter((category) => companies.some((company) => company.cat === category.id));
|
||||
return <tr key={review.id}>
|
||||
<td><strong>{review.company}</strong><div>{categories.map((category) => <button key={category.id} onClick={() => onChooseCategory(category.id)}>{category.name}</button>)}</div></td>
|
||||
<td>{review.summary}</td><td>{review.handling}</td>
|
||||
<td><div>{companies.map((company) => <button key={company.id} className="research-company-name" onClick={() => onSelect(company.id)}>{company.name}</button>)}</div>
|
||||
<div>{review.evidenceIds.map((id) => {
|
||||
const item = evidence.get(id); const url = item && evidenceUrl(item.url);
|
||||
return item && url ? <p key={id}><a href={url} target="_blank" rel="noopener noreferrer">{item.title} ↗</a></p> : null;
|
||||
})}</div>
|
||||
</td>
|
||||
</tr>;
|
||||
})}</tbody>
|
||||
</table></div> : <p>当前数据版本尚未记录商业模式初评。</p>}
|
||||
</section>;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { useMemo, useState } from "react";
|
||||
import { evidenceUrl, type ResearchCandidateBatch, type ResearchSnapshot } from "@/lib/ai-research";
|
||||
|
||||
type CandidateStatus = ResearchCandidateBatch["records"][number]["status"];
|
||||
const statusLabels: Record<CandidateStatus, string> = {
|
||||
"pending-year": "成立年或主体待核", "pending-ai": "AI 主营待核", linked: "已关联公司",
|
||||
"existing-outside-cohort": "已关联范围外对照", "outside-cohort": "范围外候选", promotion: "推广活动",
|
||||
};
|
||||
const pageSize = 20;
|
||||
const sourceNames: Record<string, string> = {
|
||||
S01: "Y Combinator", S02: "TechCrunch AI", S04: "Product Hunt", S05: "Sacra",
|
||||
S10: "机器之心", S11: "36氪", S13: "TrustMRR", S14: "a16z Speedrun",
|
||||
};
|
||||
const sourceLabel = (id: string) => `${id} · ${sourceNames[id] ?? "其他来源"}`;
|
||||
|
||||
function SourceLink({ url, label }: { url: string | null; label: string }) {
|
||||
const safe = url && evidenceUrl(url);
|
||||
return safe ? <a href={safe} target="_blank" rel="noopener noreferrer">{label} ↗</a> : <span>{label}(链接未取得)</span>;
|
||||
}
|
||||
|
||||
export default function ResearchCandidates({ data, onSelect, onChooseCategory }: {
|
||||
data: ResearchSnapshot; onSelect: (id: string) => void; onChooseCategory: (id: string) => void;
|
||||
}) {
|
||||
const [source, setSource] = useState("");
|
||||
const [batchId, setBatchId] = useState("");
|
||||
const [category, setCategory] = useState("");
|
||||
const [status, setStatus] = useState<CandidateStatus | "pending" | "">("pending");
|
||||
const [query, setQuery] = useState("");
|
||||
const [page, setPage] = useState(0);
|
||||
const all = useMemo(() => (data.candidateBatches ?? []).flatMap((batch) => batch.records.map((record) => ({ batch, record }))), [data.candidateBatches]);
|
||||
const sources = [...new Set(all.map(({ batch }) => batch.sourceId))].sort();
|
||||
const batches = (data.candidateBatches ?? []).filter((batch) => !source || batch.sourceId === source);
|
||||
const matched = all.filter(({ batch, record }) => (!source || batch.sourceId === source)
|
||||
&& (!batchId || batch.id === batchId) && (!category || record.categoryId === category)
|
||||
&& `${record.name} ${record.id} ${record.note}`.toLocaleLowerCase().includes(query.trim().toLocaleLowerCase()));
|
||||
const pending = (value: CandidateStatus) => value === "pending-year" || value === "pending-ai";
|
||||
const rows = matched.filter(({ record }) => !status || (status === "pending" ? pending(record.status) : record.status === status));
|
||||
const companies = new Map(data.companies.map((company) => [company.id, company]));
|
||||
const evidence = new Map(data.evidence.map((item) => [item.id, item]));
|
||||
const categories = new Map(data.categories.map((item) => [item.id, item.name]));
|
||||
return <section aria-labelledby="research-candidates-title">
|
||||
<h3 id="research-candidates-title">候选与缺项</h3>
|
||||
<p>展示已登记的有限来源批次及后续核查。默认显示成立年、主体或 AI 主营待核的条目;待核不是确认排除,也不计入公司表。每行是一次发现位置,同一公司或产品可以重复出现。</p>
|
||||
<p className="research-muted">候选初分类与公司表数量分开,来源批次不等全年或全站名单。原始发现范围及后续结论见每行说明;暂无收入资料不作零,推广活动也不算公司。</p>
|
||||
<div className="research-filters">
|
||||
<label className="research-query">搜索候选<input type="search" value={query} placeholder="名称、编号或核查说明" onChange={(event) => { setQuery(event.target.value); setPage(0); }} /></label>
|
||||
<label>发现来源<select value={source} onChange={(event) => { setSource(event.target.value); setBatchId(""); setPage(0); }}><option value="">全部已登记来源</option>{sources.map((id) => <option key={id} value={id}>{sourceLabel(id)}</option>)}</select></label>
|
||||
<label>发现批次<select value={batchId} onChange={(event) => { setBatchId(event.target.value); setPage(0); }}><option value="">全部批次</option>{batches.map((batch) => <option key={batch.id} value={batch.id}>{batch.id}</option>)}</select></label>
|
||||
<label>候选初分类<select value={category} onChange={(event) => { setCategory(event.target.value); setPage(0); }}><option value="">全部分类</option>{data.categories.map((item) => <option key={item.id} value={item.id}>{item.name}</option>)}</select></label>
|
||||
<label>核查状态<select value={status} onChange={(event) => { setStatus(event.target.value as typeof status); setPage(0); }}>
|
||||
<option value="">全部状态({matched.length})</option><option value="pending">全部待核({matched.filter(({ record }) => pending(record.status)).length})</option>
|
||||
{Object.entries(statusLabels).map(([id, label]) => <option key={id} value={id}>{label}({matched.filter(({ record }) => record.status === id).length})</option>)}
|
||||
</select></label>
|
||||
</div>
|
||||
<p role="status">{rows.length} 个发现位置匹配;不是独立公司数。</p>
|
||||
<div className="research-table-wrap"><table>
|
||||
<caption>有限来源候选与处理记录;选择关联公司查看主数据,原始证据直接链接来源</caption>
|
||||
<thead><tr><th scope="col">候选</th><th scope="col">初分类 / 状态</th><th scope="col">来源及范围</th><th scope="col">核查结论 / 缺项</th><th scope="col">关联公司 / 证据</th></tr></thead>
|
||||
<tbody>{rows.slice(page * pageSize, (page + 1) * pageSize).map(({ batch, record }) => {
|
||||
const company = record.companyId && companies.get(record.companyId);
|
||||
return <tr key={record.id}>
|
||||
<td><SourceLink url={record.url} label={record.name} /><small>{record.id}</small></td>
|
||||
<td><button onClick={() => onChooseCategory(record.categoryId)} aria-label={`查看${categories.get(record.categoryId)}分类内的公司`}>{categories.get(record.categoryId)}</button><small>{statusLabels[record.status]}</small></td>
|
||||
<td><SourceLink url={batch.url} label={sourceLabel(batch.sourceId)} /><small>{batch.id} · 读取 {batch.accessedAt}</small><details><summary>发现批次范围</summary><p>{batch.scope}</p><p>{batch.complete ? "该批次标记已完成;不代表来源全站覆盖。" : "该批次仍保留覆盖缺项。"}</p></details></td>
|
||||
<td>{record.note}</td>
|
||||
<td>{company ? <button className="research-company-name" onClick={() => onSelect(company.id)}>{company.name}</button> : <small>尚未关联公司主记录</small>}
|
||||
{record.evidenceIds?.map((id) => { const item = evidence.get(id); return item ? <p key={id}><SourceLink url={item.url} label={id} /></p> : null; })}
|
||||
</td>
|
||||
</tr>;
|
||||
})}</tbody>
|
||||
</table></div>
|
||||
{!rows.length && <p>当前筛选没有已登记的候选记录;不代表该来源或分类没有公司。</p>}
|
||||
{rows.length > pageSize && <nav className="research-pagination" aria-label="候选与缺项分页"><button disabled={page === 0} onClick={() => setPage((value) => value - 1)}>上一页</button><span>{page + 1} / {Math.ceil(rows.length / pageSize)}</span><button disabled={(page + 1) * pageSize >= rows.length} onClick={() => setPage((value) => value + 1)}>下一页</button></nav>}
|
||||
</section>;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
export type ResearchCategory = { id: string; name: string; description: string };
|
||||
export const businessModelReviewType = "商业模式初评";
|
||||
export const technicalReviewLabels = {
|
||||
unreviewed: "技术证据尚未专项评审",
|
||||
description: "已读技术自述",
|
||||
|
||||
@@ -31,6 +31,20 @@ export function arrDisclosureCoverage(snapshot: ResearchSnapshot, foundedYear?:
|
||||
missing: companies.length - disclosed.size, records: claims.length };
|
||||
});
|
||||
}
|
||||
|
||||
export type ArrFieldGap = "date" | "currency" | "amount" | "estimate";
|
||||
|
||||
/** Prerequisites for inspecting exact, dated USD disclosures; never a comparability or audit verdict. */
|
||||
export function arrFieldGaps(observation: ResearchObservation, asOf: string): ArrFieldGap[] {
|
||||
const gaps: ArrFieldGap[] = [];
|
||||
const day = calendarDay(observation.observedAt);
|
||||
const end = calendarDay(asOf);
|
||||
if (day === null || end === null || day > end) gaps.push("date");
|
||||
if (observation.unit !== "USD") gaps.push("currency");
|
||||
if (observation.bound !== "=" || !Number.isFinite(observation.value) || observation.value < 0) gaps.push("amount");
|
||||
if (["estimate", "historical-estimate"].includes(observation.selection)) gaps.push("estimate");
|
||||
return gaps;
|
||||
}
|
||||
export type IncomeStats = {
|
||||
n: number; mean: number; median: number; min: number; max: number;
|
||||
sampleDeviation: number | null; cv: number | null; meanMedianRatio: number | null;
|
||||
|
||||
@@ -8,10 +8,29 @@ import coverageAudit from "../../../content/research/ai-companies.coverage.json"
|
||||
import incomeReference from "../../../content/research/ai-income-analysis.json";
|
||||
import { readResearchSnapshot } from "../src/lib/ai-research-store";
|
||||
import { openSiteDatabase } from "../src/lib/site-database";
|
||||
import { categorySummary, evidenceUrl, reviewCompanyIds, validateResearch, type ResearchSnapshot } from "../src/lib/ai-research";
|
||||
import { businessModelReviewType, categorySummary, evidenceUrl, reviewCompanyIds, validateResearch, type ResearchSnapshot } from "../src/lib/ai-research";
|
||||
import { consumeCode, initializeStore } from "../src/lib/auth-store";
|
||||
import { newAuthConfig } from "../src/lib/auth";
|
||||
import { arrDisclosureCoverage, arrDisclosures, compareIncomeGroups, describeIncome, groupIncome, platformIncomeSample } from "../src/lib/research-statistics";
|
||||
import { arrDisclosureCoverage, arrDisclosures, arrFieldGaps, compareIncomeGroups, describeIncome, groupIncome, platformIncomeSample } from "../src/lib/research-statistics";
|
||||
|
||||
test("ARR field checks distinguish missing dates, other currencies, bounds and estimates", () => {
|
||||
const observation = { ...seed.observations[0], metric: "arr", unit: "USD", value: 100,
|
||||
bound: "=", selection: "signal", observedAt: "2026-10-30" } as ResearchSnapshot["observations"][number];
|
||||
assert.deepEqual(arrFieldGaps(observation, "2026-10-31"), []);
|
||||
for (const observedAt of [undefined, "2026-02-30", "2026-11-01"])
|
||||
assert.deepEqual(arrFieldGaps({ ...observation, observedAt }, "2026-10-31"), ["date"]);
|
||||
assert.deepEqual(arrFieldGaps({ ...observation, unit: "EUR" }, "2026-10-31"), ["currency"],
|
||||
"known foreign currencies stay distinct without an invented USD conversion");
|
||||
assert.deepEqual(arrFieldGaps({ ...observation, unit: "原文$,币种待核", bound: ">",
|
||||
selection: "historical-estimate", observedAt: undefined }, "2026-10-31"), ["date", "currency", "amount", "estimate"]);
|
||||
assert.deepEqual(arrFieldGaps({ ...observation, value: Number.NaN }, "2026-10-31"), ["amount"]);
|
||||
assert.deepEqual(arrFieldGaps({ ...observation, value: -1 }, "2026-10-31"), ["amount"]);
|
||||
assert.deepEqual(arrFieldGaps({ ...observation, value: 0 }, "2026-10-31"), [], "disclosed zero is a valid amount");
|
||||
const rows = arrDisclosures(seed as ResearchSnapshot);
|
||||
assert.ok(rows.length > 0);
|
||||
assert.ok(rows.every(({ observation: claim }) => arrFieldGaps(claim, seed.asOf).length > 0),
|
||||
"the current ledger cannot be described as a complete dated exact USD sample");
|
||||
});
|
||||
|
||||
test("income interpretations compare sufficient samples within a provider and known billing model", () => {
|
||||
const snapshot = structuredClone(seed) as ResearchSnapshot;
|
||||
@@ -73,7 +92,8 @@ test("ARR ledger preserves historical estimates without promoting targets, run r
|
||||
const ids = new Set(rows.map((row) => row.observation.id));
|
||||
for (const id of ["O064", "O065", "O066", "O069", "O070", "O071", "O046"])
|
||||
assert.ok(ids.has(id), `${id}: historical claims, estimates and unknown currencies remain visible`);
|
||||
for (const id of ["O050", "O052", "O053", "O055", "SR-O-AI067-runrate", "ROCKET-O-arr", "AQ-O-RUNRATE"])
|
||||
for (const id of ["O050", "O052", "O053", "O055", "SR-O-AI067-runrate", "ROCKET-O-arr", "AQ-O-RUNRATE",
|
||||
"SRLEARN1-O-CLAIR-D2C", "SRLEARN1-O-CLAIR-B2B"])
|
||||
assert.ok(!ids.has(id), `${id}: excluded or ambiguous records cannot enter the ARR ledger`);
|
||||
assert.equal(rows.find((row) => row.observation.id === "O066")?.observation.selection, "historical-estimate");
|
||||
assert.equal(rows.find((row) => row.observation.id === "O046")?.observation.unit, "原文$,币种待核");
|
||||
@@ -104,9 +124,14 @@ test("research revisions share the authentication database and preserve replay l
|
||||
for (let i = 0; i < 20; i++) consumeCode(config, "invalid");
|
||||
assert.equal(consumeCode(config, "invalid"), "limited");
|
||||
const initial = readResearchSnapshot();
|
||||
assert.equal(initial.companies.length, 1196);
|
||||
assert.equal(initial.evidence.length, 4600);
|
||||
assert.equal(initial.observations.length, 453);
|
||||
assert.equal(initial.companies.length, 1312);
|
||||
assert.equal(initial.evidence.length, 5354);
|
||||
assert.equal(initial.observations.length, 495);
|
||||
const businessReviews = initial.reviews.filter((review) => review.type === businessModelReviewType);
|
||||
assert.equal(businessReviews.length, 26);
|
||||
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");
|
||||
assert.deepEqual(initial.candidateBatches, seed.candidateBatches, "candidate gaps persist in the same database metadata");
|
||||
assert.deepEqual(initial.directoryRechecks, seed.directoryRechecks, "follow-up classifications persist without rewriting the discovery audit");
|
||||
assert.deepEqual(readResearchSnapshot(), initial, "reopening does not duplicate records");
|
||||
@@ -145,9 +170,9 @@ 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, 207);
|
||||
assert.equal(snapshot.reviews.filter((r) => r.scope === "dataset").length, 139);
|
||||
assert.equal(snapshot.reviews.filter((r) => r.scope === "excluded-candidate").length, 44);
|
||||
assert.equal(snapshot.reviews.filter((r) => r.scope === "companies").length, 299);
|
||||
assert.equal(snapshot.reviews.filter((r) => r.scope === "dataset").length, 159);
|
||||
assert.equal(snapshot.reviews.filter((r) => r.scope === "excluded-candidate").length, 65);
|
||||
const review = snapshot.reviews.find((r) => r.id === "R4")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, review), ["AI007", "AI013", "AI021", "AI034"]);
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, snapshot.reviews.find((r) => r.id === "CN-R-PSI")!), []);
|
||||
@@ -166,11 +191,11 @@ test("reviews link explicit companies without turning global or excluded cases i
|
||||
test("disclosure counts exclude client income, biographies, targets and duplicate milestones", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
const summary = categorySummary(snapshot);
|
||||
assert.equal(summary.reduce((n, c) => n + c.count, 0), 1196);
|
||||
assert.equal(summary.reduce((n, c) => n + c.self, 0), 58);
|
||||
assert.equal(summary.reduce((n, c) => n + c.count, 0), 1312);
|
||||
assert.equal(summary.reduce((n, c) => n + c.self, 0), 63);
|
||||
assert.equal(summary.reduce((n, c) => n + c.estimate, 0), 2);
|
||||
assert.equal(summary.reduce((n, c) => n + c.platform, 0), 19);
|
||||
assert.equal(summary.reduce((n, c) => n + c.unknown, 0), 1117);
|
||||
assert.equal(summary.reduce((n, c) => n + c.unknown, 0), 1228);
|
||||
assert.equal(snapshot.companies.find((c) => c.name === "Rork")?.revenueStatus, "unknown");
|
||||
assert.equal(snapshot.companies.find((c) => c.name === "Result")?.revenueStatus, "unknown");
|
||||
assert.ok(snapshot.observations.filter((o) => o.selection === "signal").every((o) => o.scope === "公司整体"));
|
||||
@@ -205,8 +230,8 @@ 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, 181);
|
||||
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "public-artifact").length, 25);
|
||||
assert.equal(snapshot.companies.filter((c) => c.technicalReview).length, 303);
|
||||
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "public-artifact").length, 29);
|
||||
assert.equal(snapshot.companies.filter((c) => c.technicalReview?.level === "independent-test").length, 1);
|
||||
assert.equal(snapshot.companies.find((c) => c.id === "AI051")?.revenueStatus, "unknown");
|
||||
assert.match(snapshot.companies.find((c) => c.id === "AI051")!.technicalReview!.testScope!, /Sep 2026/);
|
||||
@@ -279,9 +304,15 @@ test("ambiguous ARR claims retain currency, precision and attribution limits", (
|
||||
const portfolio = snapshot.observations.filter((o) => o.company === "AI100");
|
||||
assert.deepEqual(portfolio.filter((o) => o.selection === "signal").map((o) => o.id), ["SR25-O-DRS-PORTFOLIO"],
|
||||
"a product milestone must not be added to its company portfolio as another company");
|
||||
assert.ok(snapshot.observations.filter((o) => o.id.startsWith("SR25-O-")).every((o) =>
|
||||
o.unit !== "USD" && !o.metric && !o.observedAt && o.comparisonGroup === null),
|
||||
const speedrun2025 = snapshot.observations.filter((o) => o.id.startsWith("SR25-O-"));
|
||||
assert.ok(speedrun2025.every((o) =>
|
||||
o.unit !== "USD" && !o.observedAt && o.comparisonGroup === null),
|
||||
"access dates and dollar symbols must not invent dated USD income samples");
|
||||
assert.deepEqual(speedrun2025.filter((o) => o.metric).map((o) => [o.id, o.metric]).sort(),
|
||||
[["SR25-O-DRS-PORTFOLIO", "arr"], ["SR25-O-LOOPS-ARR", "arr"]],
|
||||
"explicit company ARR claims retain their metric without inferring currency or reporting dates");
|
||||
assert.ok(platformIncomeSample(snapshot, { windowDays: null }).points.every((point) =>
|
||||
!point.observation.id.startsWith("SR25-O-")), "undated ARR claims never enter platform MRR comparisons");
|
||||
});
|
||||
|
||||
// Retractions and forecasts must stay visible for review without becoming revenue signals.
|
||||
@@ -414,7 +445,7 @@ test("platform samples exclude stale data and keep ARR, estimates and collection
|
||||
const invalid = structuredClone(snapshot);
|
||||
invalid.observations = invalid.observations.filter((o) => o.company === "MR001" && o.metric === "mrr");
|
||||
const first = invalid.observations[0];
|
||||
invalid.observations.push({ ...first, id: "future", observedAt: "2026-11-01", value: 999999 });
|
||||
invalid.observations.push({ ...first, id: "future", observedAt: "2026-11-02", value: 999999 });
|
||||
invalid.observations.push({ ...first, id: "bad-date", observedAt: "2026-02-30", value: 999999 });
|
||||
invalid.observations.push({ ...first, id: "currency", unit: "EUR", value: 999999 });
|
||||
invalid.observations.push({ ...first, id: "older", observedAt: "2026-10-28", value: 1 });
|
||||
@@ -460,6 +491,356 @@ test("product launch candidates preserve unresolved years and many launches per
|
||||
assert.throws(() => validateResearch(snapshot), /research candidate/);
|
||||
});
|
||||
|
||||
test("the public SR007 roster preserves unique entries and Alven's older operator conflict", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
const batch = snapshot.candidateBatches!.find((item) => item.id === "SR007-public-roster-2026-1")!;
|
||||
assert.equal(batch.complete, false, "one public default cohort is not all source coverage");
|
||||
assert.equal(batch.records.length, 79);
|
||||
assert.equal(new Set(batch.records.map((row) => row.url)).size, 79);
|
||||
const alven = batch.records.find((row) => row.name === "Alven")!;
|
||||
assert.equal(alven.status, "pending-year");
|
||||
assert.equal(alven.companyId, undefined);
|
||||
assert.ok(alven.evidenceIds?.includes("SR007R-ALVEN-REG"));
|
||||
assert.ok(!snapshot.observations.some((item) => item.evidence.startsWith("SR007R-")),
|
||||
"roster claims, deployment plans and per-unit prices are not new financial observations");
|
||||
const coherence = batch.records.find((row) => row.name === "Coherence Health")!;
|
||||
assert.equal(coherence.status, "pending-ai", "a new coaching business still needs current AI delivery evidence");
|
||||
assert.equal(coherence.companyId, undefined);
|
||||
const followup = snapshot.observations.filter((item) => item.id.startsWith("SR007F2-"));
|
||||
assert.equal(followup.length, 4);
|
||||
assert.ok(followup.every((item) => ["excluded", "adoption"].includes(item.selection) && !item.metric && !item.observedAt));
|
||||
assert.ok(!arrDisclosures(snapshot).some(({ observation }) => observation.id.startsWith("SR007F2-")),
|
||||
"contracted ARR and pipeline are not live ARR disclosures");
|
||||
const thirdFollowup = snapshot.observations.filter((item) => item.id.startsWith("SR007F3-"));
|
||||
assert.equal(thirdFollowup.length, 6);
|
||||
assert.equal(thirdFollowup.filter((item) => item.selection === "excluded").length, 3);
|
||||
assert.equal(thirdFollowup.filter((item) => item.selection === "adoption").length, 3);
|
||||
assert.ok(thirdFollowup.every((item) => !item.metric && !item.observedAt));
|
||||
assert.ok(!arrDisclosures(snapshot).some(({ observation }) => observation.id.startsWith("SR007F3-")),
|
||||
"projected ARR, connected customer assets and prospective contracts are not realized ARR");
|
||||
assert.equal(snapshot.companies.find((item) => item.id === "AI121")!.cat, "C02",
|
||||
"training data and environments are infrastructure rather than demonstrated foundation models");
|
||||
const embrasure = snapshot.companies.find((item) => item.id === "AI122")!;
|
||||
assert.equal(embrasure.technicalReview!.level, "public-artifact");
|
||||
assert.ok(embrasure.technicalReview!.evidenceIds.includes("SR007F3-EMBRASURE-FLOW"),
|
||||
"the public connector supports artifact availability, not independently reproduced warehouse performance");
|
||||
for (const name of ["KIRA", "Leonidas", "Mecone", "PhotonSpear"]) {
|
||||
const candidate = batch.records.find((row) => row.name === name)!;
|
||||
assert.equal(candidate.status, "pending-ai",
|
||||
"serving AI customers or using software controls is not evidence of an AI business");
|
||||
assert.equal(candidate.companyId, undefined);
|
||||
}
|
||||
const maestroClaims = arrDisclosures(snapshot).filter(({ company }) => company.id === "AI130");
|
||||
assert.equal(maestroClaims.length, 2, "keep the two original ARR milestones in the evidence ledger");
|
||||
assert.ok(maestroClaims.every(({ observation }) => observation.selection === "historical" &&
|
||||
arrFieldGaps(observation, snapshot.asOf).includes("date") &&
|
||||
arrFieldGaps(observation, snapshot.asOf).includes("currency")));
|
||||
const cumulative = snapshot.observations.find((item) => item.id === "SR007F4-O-MAESTRO-CUMULATIVE")!;
|
||||
assert.equal(cumulative.selection, "historical");
|
||||
assert.equal(cumulative.metric, undefined, "nine-month cumulative revenue cannot become ARR");
|
||||
const contracted = snapshot.observations.find((item) => item.id === "SR007F4-O-HOID-CONTRACT")!;
|
||||
assert.equal(contracted.selection, "excluded");
|
||||
assert.equal(contracted.metric, undefined, "contracted run rate is not realized ARR");
|
||||
const openwhispr = snapshot.companies.find((item) => item.id === "AI135")!;
|
||||
assert.equal(openwhispr.technicalReview!.level, "public-artifact");
|
||||
assert.ok(openwhispr.technicalReview!.evidenceIds.includes("SR007F5-OPENWHISPR-REPO"));
|
||||
const voiceArr = arrDisclosures(snapshot).find(({ company }) => company.id === openwhispr.id)!.observation;
|
||||
assert.equal(voiceArr.value, 120000);
|
||||
assert.equal(voiceArr.bound, "≥");
|
||||
assert.ok(arrFieldGaps(voiceArr, snapshot.asOf).includes("date"));
|
||||
assert.ok(arrFieldGaps(voiceArr, snapshot.asOf).includes("currency"),
|
||||
"current plan prices cannot supply the currency of an undated investor ARR claim");
|
||||
const voiceUsers = snapshot.observations.find((item) => item.id === "SR007F5-O-OPENWHISPR-DAU")!;
|
||||
assert.equal(voiceUsers.selection, "adoption", "daily active users are not paying subscribers");
|
||||
assert.equal(voiceUsers.metric, undefined);
|
||||
const salesLive = snapshot.observations.find((item) => item.id === "SR007F6-O-OTHELLO-LIVE")!;
|
||||
assert.equal(salesLive.metric, "arr");
|
||||
assert.equal(salesLive.value, 600000, "live ARR must not include contracted ARR or pipeline");
|
||||
for (const suffix of ["CONTRACT", "PIPELINE"]) {
|
||||
const prospective = snapshot.observations.find((item) => item.id === `SR007F6-O-OTHELLO-${suffix}`)!;
|
||||
assert.equal(prospective.selection, "excluded");
|
||||
assert.equal(prospective.metric, undefined);
|
||||
}
|
||||
const professionalService = snapshot.observations.find((item) => item.id === "SR007F6-O-PARCA-RUNRATE")!;
|
||||
assert.equal(professionalService.metric, "annualized-revenue");
|
||||
assert.equal(professionalService.selection, "historical");
|
||||
assert.ok(!arrDisclosures(snapshot).some(({ observation }) => observation.id === professionalService.id),
|
||||
"annualized professional-service revenue is not recurring subscription ARR");
|
||||
assert.equal(snapshot.companies.find((item) => item.id === "AI137")!.technicalReview!.level, "description",
|
||||
"a preliminary external ranking with unresolved methodology is not complete independent verification");
|
||||
const contractFollowup = snapshot.observations.filter((item) => item.id.startsWith("SR007F7-"));
|
||||
assert.equal(contractFollowup.filter((item) => item.selection === "excluded").length, 4);
|
||||
assert.equal(contractFollowup.filter((item) => item.selection === "adoption").length, 1);
|
||||
assert.ok(contractFollowup.every((item) => !item.metric && !item.observedAt));
|
||||
assert.ok(!arrDisclosures(snapshot).some(({ observation }) => observation.id.startsWith("SR007F7-")),
|
||||
"contracted revenue and potential customers' active users cannot become realized ARR");
|
||||
assert.equal(snapshot.companies.find((item) => item.id === "AI144")!.revenueStatus, "unknown",
|
||||
"free current SDK terms and a contracted ARR claim need reconciliation before labeling realized revenue");
|
||||
const scaledrive = batch.records.find((row) => row.name === "scaledrive.ai")!;
|
||||
assert.equal(scaledrive.status, "outside-cohort", "SR007 membership cannot replace a stated 2024 founding year");
|
||||
assert.equal(scaledrive.companyId, undefined);
|
||||
assert.ok(scaledrive.evidenceIds?.includes("SR007F8-SCALEDRIVE-SR"));
|
||||
for (const id of ["AI147", "AI150"]) {
|
||||
assert.equal(snapshot.companies.find((item) => item.id === id)!.technicalReview!.level, "description",
|
||||
"self-hosting and SDK documentation do not establish correctly attributed public source code");
|
||||
assert.equal(snapshot.companies.find((item) => item.id === id)!.revenueStatus, "unknown");
|
||||
}
|
||||
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, 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);
|
||||
assert.equal(ninthFollowup.filter((item) => item.selection === "adoption").length, 3);
|
||||
const industrialRunRate = ninthFollowup.find((item) => item.id === "SR007F9-O-VALENT-ANNUALIZED")!;
|
||||
assert.equal(industrialRunRate.metric, "annualized-revenue");
|
||||
assert.equal(industrialRunRate.selection, "historical");
|
||||
assert.ok(ninthFollowup.every((item) => !item.observedAt),
|
||||
"access dates and weeks since launch cannot supply precise financial dates");
|
||||
assert.ok(ninthFollowup.filter((item) => item !== industrialRunRate).every((item) => !item.metric));
|
||||
assert.ok(!arrDisclosures(snapshot).some(({ observation }) => observation.id.startsWith("SR007F9-")),
|
||||
"annual contracts without fulfillment evidence, funding, annualized revenue and pipeline remain outside live ARR");
|
||||
for (const id of ["AI152", "AI158"]) {
|
||||
assert.equal(snapshot.companies.find((item) => item.id === id)!.revenueStatus, "unknown",
|
||||
"contracted labels alone cannot establish realized revenue");
|
||||
}
|
||||
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("public Speedrun cohort rosters preserve the finite boundary without inventing founding years", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
const rosters = snapshot.candidateBatches!.filter((batch) => /^SR00[1-7]-public-roster-2026-1$/.test(batch.id));
|
||||
assert.equal(rosters.length, 7);
|
||||
for (const [index, count] of [25, 25, 32, 42, 59, 59, 79].entries()) {
|
||||
const batch = rosters.find((item) => item.id.startsWith(`SR${String(index + 1).padStart(3, "0")}-`))!;
|
||||
assert.equal(batch.records.length, count);
|
||||
assert.equal(batch.complete, false, "a complete directory page is not completed company-level research");
|
||||
}
|
||||
const rows = rosters.flatMap((batch) => batch.records);
|
||||
assert.equal(rows.length, 321);
|
||||
assert.equal(new Set(rows.map((row) => row.url)).size, 321);
|
||||
const newlyRegistered = rosters.filter((batch) => !batch.id.startsWith("SR007-")).flatMap((batch) => batch.records);
|
||||
assert.equal(newlyRegistered.length, 242);
|
||||
assert.equal(newlyRegistered.filter((row) => row.status === "pending-year").length, 5);
|
||||
assert.equal(newlyRegistered.filter((row) => row.status === "linked").length, 68);
|
||||
assert.equal(newlyRegistered.filter((row) => row.status === "existing-outside-cohort").length, 1);
|
||||
assert.equal(newlyRegistered.filter((row) => row.status === "outside-cohort").length, 144);
|
||||
assert.equal(newlyRegistered.filter((row) => row.status === "pending-ai").length, 24,
|
||||
"a known self-reported founding year does not by itself establish the current AI business");
|
||||
assert.equal(newlyRegistered.filter((row) => row.profileStatus === "readable").length, 232);
|
||||
assert.ok(newlyRegistered.filter((row) => row.status === "outside-cohort").every((row) =>
|
||||
row.profileStatus === "readable" && row.evidenceIds?.some((id) => (id.startsWith("SRALL1-P-") || id.startsWith("SRPRO1-P-")))),
|
||||
"old founding years require independent profile evidence, not cohort age");
|
||||
const variants = newlyRegistered.filter((row) => row.name === "Variant");
|
||||
assert.equal(variants.length, 2);
|
||||
assert.equal(new Set(variants.map((row) => row.url)).size, 2, "same-name profiles must not be merged by name");
|
||||
assert.equal(variants.filter((row) => row.companyId === "AI066").length, 1);
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SRALL1-")),
|
||||
"roster discovery and outside-cohort claims do not create financial observations");
|
||||
const profiles = snapshot.evidence.filter((row) => row.id.startsWith("SRPRO1-P-"));
|
||||
assert.equal(profiles.length, 226);
|
||||
for (const proof of profiles) {
|
||||
const candidate = newlyRegistered.find((row) => row.id === proof.id.slice("SRPRO1-P-".length))!;
|
||||
assert.equal(candidate.url, proof.url);
|
||||
assert.ok(candidate.evidenceIds?.includes(proof.id));
|
||||
}
|
||||
for (const id of ["AI162", "AI163", "AI164", "AI165", "AI166", "AI167"]) {
|
||||
const company = snapshot.companies.find((row) => row.id === id)!;
|
||||
assert.equal(company.year, 2025);
|
||||
assert.equal(company.revenueStatus, "unknown");
|
||||
assert.equal(company.technicalReview!.level, "description");
|
||||
}
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SRPRO1-")),
|
||||
"future GPU capacity, free trials, customer savings and unread financial claims are not realized revenue");
|
||||
});
|
||||
|
||||
test("Speedrun brand dates and survey benchmark scores do not create new-company revenue", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
const rows = snapshot.candidateBatches!.flatMap((batch) => batch.records);
|
||||
for (const id of ["SR004R-C11", "SR004R-C20"]) {
|
||||
const row = rows.find((item) => item.id === id)!;
|
||||
assert.equal(row.status, "pending-year", "a known brand year must retain unresolved underlying entity dates");
|
||||
assert.equal(row.companyId, undefined);
|
||||
assert.ok(row.evidenceIds!.some((proof) => proof.startsWith("SR004F2-")));
|
||||
}
|
||||
for (const id of ["SR004R-C08", "SR004R-C15"]) {
|
||||
assert.equal(rows.find((item) => item.id === id)!.status, "pending-ai");
|
||||
}
|
||||
for (const [id, category] of [["AI168", "C06"], ["AI169", "C05"]]) {
|
||||
const company = snapshot.companies.find((item) => item.id === id)!;
|
||||
assert.equal(company.cat, category);
|
||||
assert.equal(company.revenueStatus, "unknown");
|
||||
assert.equal(company.technicalReview!.level, "description");
|
||||
}
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SR004F2-")),
|
||||
"brand-deal opportunities, listed fees and survey agreement are not financial observations");
|
||||
const model = snapshot.reviews.find((row) => row.id === "MODEL1-SIMULATION-PANEL")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, model), ["AI169"]);
|
||||
assert.ok(model.evidenceIds.includes("SR004F2-REHEARSALS-PRICE"));
|
||||
});
|
||||
|
||||
test("recruiting service adoption and official balance sheets do not become ARR", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
for (const id of ["AI170", "AI171", "AI172", "AI173", "AI174", "AI175"]) {
|
||||
const company = snapshot.companies.find((row) => row.id === id)!;
|
||||
assert.equal(company.year, 2025);
|
||||
assert.equal(company.revenueStatus, "unknown");
|
||||
assert.equal(company.technicalReview!.level, "description");
|
||||
}
|
||||
const accounts = snapshot.evidence.find((row) => row.id === "SR005F3-DEX-ACCOUNTS")!;
|
||||
assert.equal(accounts.companyId, "AI171");
|
||||
assert.equal(new URL(accounts.url).hostname, "find-and-update.company-information.service.gov.uk");
|
||||
assert.equal(accounts.publishedAt, "2026-09-08", "filing date is preserved without becoming a revenue measurement date");
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SR005F3-")),
|
||||
"balance-sheet cash, client quotes, salaries and recruiting outcomes do not disclose revenue");
|
||||
const model = snapshot.reviews.find((row) => row.id === "MODEL1-RECRUITING-SERVICE")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, model), ["AI175", "AI171"]);
|
||||
assert.ok(model.evidenceIds.includes("SR005F3-JOOBA-TERMS"));
|
||||
});
|
||||
|
||||
test("current products preserve unresolved identity and separate trading from software revenue", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
const presia = snapshot.candidateBatches!.flatMap((batch) => batch.records)
|
||||
.find((row) => row.id === "SR005R-C44")!;
|
||||
assert.equal(presia.status, "pending-ai");
|
||||
assert.equal(presia.companyId, undefined, "a reused domain does not resolve a changed business entity");
|
||||
assert.ok(presia.evidenceIds!.includes("SR005F4-PRESIA-ASSET"));
|
||||
for (const id of ["AI176", "AI177", "AI178", "AI179", "AI180"]) {
|
||||
const company = snapshot.companies.find((row) => row.id === id)!;
|
||||
assert.equal(company.revenueStatus, "unknown");
|
||||
}
|
||||
const syzygy = snapshot.companies.find((row) => row.id === "AI180")!;
|
||||
assert.equal(syzygy.technicalReview!.level, "public-artifact");
|
||||
assert.ok(syzygy.technicalReview!.evidenceIds.includes("SR005F4-SYZYGY-FILES"));
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SR005F4-")),
|
||||
"landed prices, customer savings, model scores and listed subscriptions are not reported ARR");
|
||||
const supply = snapshot.reviews.find((row) => row.id === "MODEL1-PHYSICAL-SUPPLY")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, supply), ["AI179"]);
|
||||
assert.ok(snapshot.reviews.find((row) => row.id === "MODEL1-LOCAL-CLOUD")!.companyIds!.includes("AI180"));
|
||||
});
|
||||
|
||||
test("new founding-year reports retain beta, academic and self-reported enforcement boundaries", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
for (const id of ["AI181", "AI182", "AI184", "AI185", "AI186"]) {
|
||||
const company = snapshot.companies.find((row) => row.id === id)!;
|
||||
assert.equal(company.year, 2026);
|
||||
assert.equal(company.revenueStatus, "unknown");
|
||||
assert.equal(company.technicalReview!.level, "description");
|
||||
}
|
||||
assert.equal(snapshot.companies.find((row) => row.id === "AI183")!.year, 2025);
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SR006F5-")),
|
||||
"trial credits, customer revenue impact, demonstration fundraises and normalized research scores are not ARR");
|
||||
const research = snapshot.reviews.find((row) => row.id === "SR006F5-R-RESEARCH")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, research), ["AI185", "AI169"]);
|
||||
assert.ok(research.evidenceIds.includes("SR004F2-REHEARSALS-BENCH"));
|
||||
const pricing = snapshot.reviews.find((row) => row.id === "MODEL1-MESSAGE-ENFORCEMENT")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, pricing), ["AI186"]);
|
||||
assert.ok(pricing.evidenceIds.includes("SR006F5-ZERODRIFT-TERMS"));
|
||||
});
|
||||
|
||||
test("rebrands and ambiguous monthly receipts stay outside comparable ARR", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
const rows = snapshot.candidateBatches!.flatMap((batch) => batch.records);
|
||||
for (const id of ["SR006R-C37", "SR006R-C54"]) {
|
||||
const row = rows.find((item) => item.id === id)!;
|
||||
assert.equal(row.status, "pending-year");
|
||||
assert.equal(row.companyId, undefined, "brand dates must not overwrite existing legal-entity dates");
|
||||
}
|
||||
const idilio = rows.find((item) => item.id === "SR006R-C22")!;
|
||||
assert.equal(idilio.status, "pending-ai");
|
||||
assert.ok(idilio.evidenceIds!.includes("SR006F6-IDILIO-SR"));
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SR006F6-")),
|
||||
"pipeline, retained client revenue, illustrative tax values and undated monthly receipts are not comparable ARR");
|
||||
for (const id of ["AI187", "AI188", "AI189"]) {
|
||||
assert.equal(snapshot.companies.find((row) => row.id === id)!.revenueStatus, "unknown");
|
||||
}
|
||||
const tax = snapshot.reviews.find((row) => row.id === "MODEL1-TAX-PREP")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, tax), ["AI188"]);
|
||||
assert.ok(tax.evidenceIds.includes("SR006F6-GROVE-PRICE"));
|
||||
});
|
||||
|
||||
test("care and legal delivery preserve financial exclusions and linked cost reviews", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
for (const id of ["AI190", "AI191", "AI192", "AI193", "AI194", "AI195"]) {
|
||||
const company = snapshot.companies.find((row) => row.id === id)!;
|
||||
assert.equal(company.revenueStatus, "unknown");
|
||||
assert.equal(company.technicalReview!.level, "description");
|
||||
const candidate = snapshot.candidateBatches!.flatMap((batch) => batch.records)
|
||||
.find((row) => row.companyId === id)!;
|
||||
assert.equal(candidate.status, "linked");
|
||||
assert.equal(candidate.categoryId, company.cat);
|
||||
assert.ok(company.evidenceIds.every((proof) => snapshot.evidence.some((row) => row.id === proof && row.companyId === id)));
|
||||
}
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SRCARE1-")),
|
||||
"undefined annual run rate, customer savings, list prices and usage are not comparable ARR");
|
||||
const hardware = snapshot.reviews.find((row) => row.id === "MODEL1-HARDWARE-LIFETIME")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, hardware), ["AI195"]);
|
||||
const clinical = snapshot.reviews.find((row) => row.id === "MODEL1-CARE-OPERATIONS")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, clinical), ["AI191", "AI194"]);
|
||||
});
|
||||
|
||||
test("enterprise contracts and launch-year conflicts retain their exclusions", () => {
|
||||
const snapshot = structuredClone(seed) as ResearchSnapshot;
|
||||
const accelerator = snapshot.candidateBatches!.flatMap((batch) => batch.records)
|
||||
.find((row) => row.id === "SR006R-C01")!;
|
||||
assert.equal(accelerator.status, "pending-year");
|
||||
assert.equal(accelerator.companyId, undefined);
|
||||
assert.ok(accelerator.evidenceIds!.includes("SRENTER1-ACCELER8-DEALROOM"));
|
||||
for (const [id, value, bound] of [["HEAVI", 100000, "="], ["VERRA", 700000, "≈"]] as const) {
|
||||
const contract = snapshot.observations.find((row) => row.id === `SRENTER1-O-${id}-CONTRACT`)!;
|
||||
assert.equal(contract.value, value);
|
||||
assert.equal(contract.bound, bound);
|
||||
assert.equal(contract.selection, "excluded");
|
||||
assert.equal(contract.observedAt, undefined);
|
||||
assert.equal(contract.comparisonGroup, null);
|
||||
assert.equal(snapshot.companies.find((row) => row.id === contract.company)!.revenueStatus, "unknown");
|
||||
contract.metric = "arr";
|
||||
assert.ok(!arrDisclosures(snapshot).some((row) => row.observation.id === contract.id),
|
||||
"even a wrongly added ARR label must not promote an excluded contract");
|
||||
assert.ok(!platformIncomeSample(snapshot, { windowDays: 90 }).points
|
||||
.some((row) => row.observation.id === contract.id));
|
||||
}
|
||||
});
|
||||
|
||||
test("financial candidates need current AI evidence before they acquire company and income links", () => {
|
||||
const snapshot = seed as ResearchSnapshot;
|
||||
const candidates = snapshot.candidateBatches!.flatMap((batch) => batch.records);
|
||||
for (const id of ["SR006R-C06", "SR006R-C16", "SR005R-C35", "SR006R-C08"]) {
|
||||
const candidate = candidates.find((row) => row.id === id)!;
|
||||
assert.equal(candidate.status, "pending-ai");
|
||||
assert.equal(candidate.companyId, undefined);
|
||||
assert.ok(candidate.evidenceIds!.some((proof) => proof.startsWith("SRFIN1-")));
|
||||
}
|
||||
const financial = snapshot.reviews.find((row) => row.id === "MODEL1-FINANCIAL-OPERATIONS")!;
|
||||
assert.deepEqual(reviewCompanyIds(snapshot, financial), ["AI202", "AI203", "AI204"]);
|
||||
assert.ok(!snapshot.observations.some((row) => row.evidence.startsWith("SRFIN1-")),
|
||||
"bank size, FX processing, artist revenue, demo portfolios and benchmark scores are not vendor income");
|
||||
});
|
||||
|
||||
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")!;
|
||||
@@ -487,7 +868,7 @@ test("unreconciled directory financials remain source reviews instead of income
|
||||
assert.ok(review.evidenceIds.includes("PH-TANA-DR"));
|
||||
assert.equal(reviewCompanyIds(snapshot, review).length, 0);
|
||||
assert.ok(!snapshot.observations.some((o) => o.evidence === "PH-TANA-DR"));
|
||||
assert.equal(snapshot.candidateBatches!.flatMap((b) => b.records).filter((r) => r.status === "pending-year").length, 125);
|
||||
assert.equal(snapshot.candidateBatches!.flatMap((b) => b.records).filter((r) => r.status === "pending-year").length, 136);
|
||||
});
|
||||
|
||||
test("product pivots and founder histories do not become new company years or current revenue", () => {
|
||||
@@ -682,7 +1063,8 @@ test("the fifth uncertain cohort separates dated ARR, service run rates, booking
|
||||
assert.equal(figures.length, 18);
|
||||
const dated = figures.find((o) => o.id.endsWith("TRELLIS-ARR-AUG"))!;
|
||||
assert.equal(dated.metric, "arr");
|
||||
assert.equal(dated.observedAt, "2026-08-24");
|
||||
assert.equal(dated.observedAt, undefined, "a page maintenance date is not a financial cutoff");
|
||||
assert.ok(arrFieldGaps(dated, snapshot.asOf).includes("date"));
|
||||
assert.equal(dated.bound, "≥");
|
||||
assert.equal(figures.find((o) => o.id.endsWith("INSTA-RUNRATE"))!.metric, "annualized-revenue");
|
||||
assert.equal(figures.find((o) => o.id.endsWith("INSTA-LAUNCH-ARR"))!.metric, "arr");
|
||||
|
||||
+21989
-75
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"sourceVersion": "2026-10-31-ph-all25-1",
|
||||
"asOf": "2026-10-31",
|
||||
"sourceVersion": "2026-11-01-source-closeout-1",
|
||||
"asOf": "2026-11-01",
|
||||
"metric": "platform-mrr-usd",
|
||||
"sampleUnit": "product-or-business",
|
||||
"note": "独立Python复算参考值,仅验证样本计算;不是行业估计或财务审计。",
|
||||
|
||||
@@ -4,7 +4,7 @@ from collections import Counter
|
||||
import json
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from urllib.parse import urlsplit
|
||||
from urllib.parse import parse_qs, urlsplit
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
DATA = json.loads((ROOT / 'content/research/ai-companies.seed.json').read_text())
|
||||
@@ -16,6 +16,20 @@ SOURCE_SLUG = 'ai-company-research/02-coverage-and-gaps'
|
||||
BASE = '/docs/other-research/ai-company-research/overview'
|
||||
|
||||
|
||||
def yc_coverage_summary():
|
||||
companies = {row['id']: row for row in DATA['companies']}
|
||||
imported = [companies[f"YC{row['ycId']}"] for row in AUDIT['records'] if row['status'] == 'imported']
|
||||
profile_only = sum(bool(row.get('profileOnly')) for row in imported)
|
||||
groups = {}
|
||||
for label, prefix in [('unclearAI', 'YC-AI-UNCLEAR-'), ('missingYear', 'YC-MISSING-YEAR-'),
|
||||
('dateConflict', 'YC-DATE-CONFLICT-')]:
|
||||
rows = [row for batch in DATA.get('candidateBatches', []) if batch['id'].startswith(prefix)
|
||||
for row in batch['records']]
|
||||
groups[label] = {'records': len(rows), 'statuses': dict(sorted(Counter(row['status'] for row in rows).items()))}
|
||||
return {'initialProfiles': len(AUDIT['records']), 'originalImported': len(imported),
|
||||
'profileOnly': profile_only, 'deepenedOriginal': len(imported) - profile_only, **groups}
|
||||
|
||||
|
||||
|
||||
def source_register():
|
||||
sources = SOURCES['sources']
|
||||
@@ -26,6 +40,63 @@ def source_register():
|
||||
for source in sources:
|
||||
assert source['status'] in {'candidate-audit', 'targeted', 'pending', 'context', 'access-limited', 'per-company'}
|
||||
assert source['boundary'] and source['nextCheck']
|
||||
if source['id'] == 'S01':
|
||||
assert source.get('coverageSummary') == yc_coverage_summary(), 'YC source summary is stale'
|
||||
if source['id'] == 'S14' and source.get('rosterAudit'):
|
||||
roster = source['rosterAudit']
|
||||
batch = next(batch for batch in DATA['candidateBatches'] if batch['id'] == roster['candidateBatchId'])
|
||||
assert batch['sourceId'] == 'S14' and not batch['complete']
|
||||
assert roster['defaultCohort'] == 'SR007' and roster['next'] is None
|
||||
assert len(batch['records']) == roster['recordCount'] == roster['reportedCount']
|
||||
assert len({row['url'] for row in batch['records']}) == roster['recordCount']
|
||||
if source['id'] == 'S14' and source.get('publicRosterAudits'):
|
||||
audits = source['publicRosterAudits']
|
||||
assert {a['cohort'] for a in audits} == {f'SR{i:03d}' for i in range(1, 8)}
|
||||
assert len(audits) == 7
|
||||
profile_urls = []
|
||||
for audit in audits:
|
||||
batch = next(b for b in DATA['candidateBatches'] if b['id'] == audit['candidateBatchId'])
|
||||
query = parse_qs(urlsplit(audit['url']).query)
|
||||
assert urlsplit(audit['url']).netloc == 'speedrun.a16z.com'
|
||||
assert query == {'limit': ['100'], 'offset': ['0'], 'cohort': [audit['cohort']]}
|
||||
assert urlsplit(audit['url']).path == '/api/companies/companyparams'
|
||||
assert audit['httpStatus'] == 200 and audit['accessedAt'] <= DATA['asOf']
|
||||
assert audit['next'] is None and audit['previous'] is None
|
||||
assert len(batch['records']) == audit['recordCount'] == audit['reportedCount']
|
||||
assert audit['uniquePublicIds'] == audit['uniqueSlugs'] == audit['recordCount']
|
||||
assert len(audit['responseSha256']) == 64 and all(c in '0123456789abcdef' for c in audit['responseSha256'])
|
||||
assert batch['sourceId'] == 'S14' and not batch['complete']
|
||||
proof = next(e for e in DATA['evidence'] if e['id'] == audit['evidenceId'])
|
||||
assert proof['url'] == audit['url'] and proof['companyId'] is None
|
||||
profile_urls.extend(row['url'] for row in batch['records'])
|
||||
assert len(profile_urls) == len(set(profile_urls)), 'duplicate profiles across public cohorts'
|
||||
if source['id'] == 'S14' and source.get('profileAudit'):
|
||||
audit = source['profileAudit']
|
||||
entries = audit['records']
|
||||
candidates = {row['id']: row for b in DATA['candidateBatches'] for row in b['records']}
|
||||
evidence_by_id = {row['id']: row for row in DATA['evidence']}
|
||||
assert len(entries) == audit['recordCount'] == audit['readable']
|
||||
assert audit['failed'] == 0 and len({e['candidateId'] for e in entries}) == len(entries)
|
||||
years = Counter(str(e['foundedYear']) for e in entries)
|
||||
assert dict(years) == audit['yearCounts']
|
||||
for entry in entries:
|
||||
row = candidates[entry['candidateId']]
|
||||
proof = evidence_by_id[entry['evidenceId']]
|
||||
assert row['profileStatus'] == 'readable' and proof['url'] == row['url']
|
||||
assert entry['evidenceId'] in row['evidenceIds']
|
||||
assert isinstance(entry['foundedYear'], int) and 1800 <= entry['foundedYear'] <= int(DATA['asOf'][:4])
|
||||
assert isinstance(entry['teamSize'], int) and entry['teamSize'] >= 0
|
||||
assert len(entry['htmlSha256']) == 64 and all(c in '0123456789abcdef' for c in entry['htmlSha256'])
|
||||
if entry['foundedYear'] not in [2025, 2026]:
|
||||
assert row['status'] == 'outside-cohort' and not row.get('companyId')
|
||||
assert sum(e['foundedYear'] not in [2025, 2026] for e in entries) == audit['outsideTargetYears']
|
||||
assert sum(e['foundedYear'] in [2025, 2026] for e in entries) == audit['targetYearSelfReports']
|
||||
assert sum(candidates[e['candidateId']]['status'] == 'linked' for e in entries) == audit['newLinkedCompanies']
|
||||
assert sum(candidates[e['candidateId']]['status'] == 'pending-ai' for e in entries) == audit['pendingCurrentAIOrIdentity']
|
||||
assert sum(candidates[e['candidateId']]['status'] == 'pending-year' for e in entries) == audit['pendingFoundingIdentity']
|
||||
assert audit['targetYearSelfReports'] == (
|
||||
audit['newLinkedCompanies'] + audit['pendingCurrentAIOrIdentity'] + audit['pendingFoundingIdentity']
|
||||
), 'self-reported years must retain unresolved brand/entity dates'
|
||||
if source['url']:
|
||||
assert urlsplit(source['url']).scheme in {'http', 'https'} and urlsplit(source['url']).netloc
|
||||
for host in source['hosts']:
|
||||
@@ -49,7 +120,18 @@ def source_register():
|
||||
company_ids = {e['companyId'] for e in evidence if e['companyId']}
|
||||
observations = sum(o['evidence'] in evidence_ids for o in DATA['observations'])
|
||||
name = f"[{source['name']}]({source['url']})" if source['url'] else source['name']
|
||||
lines.append(f"| {source['id']} {name} | {statuses[source['status']]} | {len(evidence)} / {len(company_ids)} / {observations} | {source['boundary']} | {source['nextCheck']} |")
|
||||
boundary = source['boundary']
|
||||
if source['id'] == 'S01':
|
||||
summary = source['coverageSummary']
|
||||
boundary += (f" 当前原候选池{summary['initialProfiles']}项,原新增{summary['originalImported']}项中"
|
||||
f"{summary['profileOnly']}项目录基础资料、{summary['deepenedOriginal']}项深化个案。")
|
||||
for key, label in [('unclearAI', '原AI不明'), ('missingYear', '原缺年'), ('dateConflict', '原日期冲突')]:
|
||||
group = summary[key]
|
||||
labels = {'linked': '关联公司', 'pending-ai': 'AI主营待核',
|
||||
'pending-year': '成立/主体待核', 'outside-cohort': '范围外'}
|
||||
counts = '、'.join(f'{labels.get(status, status)} {count}' for status, count in group['statuses'].items())
|
||||
boundary += f" {label}{group['records']}项当前:{counts}。"
|
||||
lines.append(f"| {source['id']} {name} | {statuses[source['status']]} | {len(evidence)} / {len(company_ids)} / {observations} | {boundary} | {source['nextCheck']} |")
|
||||
lines += ['', 'Dealroom、Product Hunt、机器之心与36氪入口于2026-10-30重新访问。官网首页可读不证明已取得完整筛选结果;安全检测页面不作为文章内容。候选池之外的来源边界尚需建立可回查条目,完成前不宣布来源清单已全部覆盖。', '']
|
||||
return lines
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 798 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 426 KiB |
Reference in New Issue
Block a user