Merge pull request '增加 CIKM 2026 节目与出版登记采集命令' (#77) from codex/cikm2026-collector into main
Metadata integrity checks / metadata (push) Successful in 8m59s

Reviewed-on: #77
This commit was merged in pull request #77.
This commit is contained in:
2026-11-18 10:58:19 +00:00
5 changed files with 209 additions and 0 deletions
+20
View File
@@ -47,6 +47,26 @@ jobs:
subprocess.run([python,'-B','-m','pip','install','--no-deps',str(wheel)],check=True)
outside = root / 'outside-checkout'
outside.mkdir()
cikm_snapshots = pathlib.Path('/data/paper-index/validation/cikm2026-source-snapshots-v1')
if cikm_snapshots.is_dir():
cikm_output = root / 'installed-cikm2026'
command = [python, '-I', '-B', '-m', 'paper_atlas', 'collect', 'cikm2026-sources']
subprocess.run([*command, '--snapshots', str(cikm_snapshots), '--out', str(cikm_output)], cwd=outside, check=True)
report = json.loads((cikm_output/'collection-report.json').read_text())
assert {name: entry['records'] for name, entry in report['files'].items()} == {
'programme.jsonl': 1008, 'alternate-programme.jsonl': 1005,
'supplemental-programme.jsonl': 73, 'crossref.jsonl': 1081}
assert len(report['registry_outside_doi_programme']) == 73 and not report['database_written']
programme = [json.loads(line) for line in (cikm_output/'programme.jsonl').read_text().splitlines()]
assert all(row['abstract'] and row['author_display_names'] for row in programme)
assert len({row['doi'] for row in programme}) == 1008
broken = root/'tampered-cikm2026'
broken.mkdir()
(broken/'program.html').write_text('tampered')
rejected = subprocess.run([*command, '--snapshots', str(broken), '--out', str(root/'rejected-cikm2026')], cwd=outside, capture_output=True, text=True)
assert rejected.returncode != 0 and 'Snapshot hash mismatch' in rejected.stderr
assert not (root/'rejected-cikm2026').exists()
print('CIKM 2026 full frozen-source CLI check passed', flush=True)
mm_fixture = json.loads(gzip.decompress((src/'tests/fixtures/mm2026-source.json.gz').read_bytes()))
mm_snapshots = root/'mm2026-snapshots'
for name, body in mm_fixture['files'].items():