复核EveryApp入表并保留原候选初筛审计
This commit is contained in:
@@ -96,6 +96,30 @@ def candidate_register():
|
||||
return lines
|
||||
|
||||
|
||||
def directory_rechecks():
|
||||
rows = DATA.get('directoryRechecks', [])
|
||||
if not rows:
|
||||
return []
|
||||
original = {row['ycId']: row for row in AUDIT['records']}
|
||||
companies = {c['id']: c for c in DATA['companies']}
|
||||
evidence = {e['id']: e for e in DATA['evidence']}
|
||||
assert len({row['ycId'] for row in rows}) == len(rows)
|
||||
lines = ['', '## 原候选池的后续复核', '',
|
||||
'原始1,428条读取快照与初筛计数保持不变;下表记录当时未入表、后续补足证据后进入公司表的项目。初筛未通过不是永久排除。后续入表不回写为当时已匹配,也不重复计入928条原始新增目录项。', '',
|
||||
'| 原候选 | 原始状态 | 后续公司记录 | 复核证据 | 处理与限制 |', '| --- | --- | --- | --- | --- |']
|
||||
for row in rows:
|
||||
baseline = original[row['ycId']]
|
||||
assert baseline['status'] == row['originalStatus']
|
||||
assert row['reviewedAt'] <= DATA['asOf'] and row['reason']
|
||||
assert row['originalStatus'] in {'ai-unclear', 'year-outside-or-missing', 'date-conflict'}
|
||||
company = companies[row['companyId']]
|
||||
assert row['evidenceIds'] and all(eid in evidence for eid in row['evidenceIds'])
|
||||
proof = '、'.join(f"[{eid}]({evidence[eid]['url']})" for eid in row['evidenceIds'])
|
||||
lines.append(f"| [{baseline['name']} · YC{row['ycId']}]({baseline['source']}) | {row['originalStatus']} | [{company['name']}]({BASE}?company={company['id']}#research-company-detail) | {proof} | {row['reviewedAt']}:{row['reason']} |")
|
||||
lines += ['', f"已记录{len(rows)}条后续复核入表;其余未入表候选仍按原状态保留缺项,不能把这一批复核视为完成全部模糊项。", '']
|
||||
return lines
|
||||
|
||||
|
||||
def render():
|
||||
cov = DATA['coverage']
|
||||
companies = DATA['companies']
|
||||
@@ -168,6 +192,7 @@ def render():
|
||||
lines.append(f"| {name} | {len(entries)} | {len({e['url'] for e in entries})} | {note} |")
|
||||
others = [e for e in DATA['evidence'] if urlsplit(e['url']).netloc not in included]
|
||||
lines.append(f"| 其他官网、评测及公开资料 | {len(others)} | {len({e['url'] for e in others})} | 按每条来源限制理解,不能统一当作独立证据 |")
|
||||
lines += directory_rechecks()
|
||||
lines += source_register()
|
||||
lines += candidate_register()
|
||||
lines += ['', '## 尚未满足的研究条件', '',
|
||||
|
||||
Reference in New Issue
Block a user