fix: preserve and validate encoded ECCV structured author text
Metadata integrity checks / metadata (push) Successful in 3m9s
Metadata integrity checks / metadata (push) Successful in 3m9s
This commit is contained in:
@@ -58,12 +58,19 @@ jobs:
|
||||
(eccv_official/'manifest.json').write_bytes(eccv_fixture['official_manifest'].encode('utf-8'))
|
||||
for pid, html in eccv_fixture['paper_pages'].items():
|
||||
(eccv_papers/(pid+'.html')).write_bytes(html.encode('utf-8'))
|
||||
eccv_encoding = eccv_fixture['encoding_sample']
|
||||
(eccv_papers/(eccv_encoding['paper_id']+'.html')).write_bytes(eccv_encoding['html'].encode('utf-8'))
|
||||
eccv_fixture['paper_manifest']['records'].append({**eccv_encoding['receipt'], 'paper_id': eccv_encoding['paper_id'], 'file': eccv_encoding['paper_id']+'.html'})
|
||||
(eccv_papers/'manifest.json').write_text(json.dumps(eccv_fixture['paper_manifest']))
|
||||
subprocess.run([python,'-I','-B','-m','paper_atlas','collect','eccv2026-program','--official-snapshots',str(eccv_official),'--paper-snapshots',str(eccv_papers),'--out',str(root/'installed-eccv2026')],cwd=outside,check=True)
|
||||
eccv_report = json.loads((root/'installed-eccv2026/collection-report.json').read_text())
|
||||
assert eccv_report['records'] == 3 and eccv_report['expected_program_ids'] == 2834
|
||||
assert eccv_report['duplicate_program_occurrences'] == 17 and len(eccv_report['uncollected_program_ids']) == 2831
|
||||
assert eccv_report['records'] == 4 and eccv_report['expected_program_ids'] == 2834
|
||||
assert eccv_report['duplicate_program_occurrences'] == 17 and len(eccv_report['uncollected_program_ids']) == 2830
|
||||
assert not eccv_report['database_written'] and eccv_report['files'][0]['track'] == 'program_unclassified'
|
||||
eccv_rows = [json.loads(line) for line in pathlib.Path(eccv_report['files'][0]['file']).read_text().splitlines()]
|
||||
eccv_encoded_row = next(row for row in eccv_rows if row['external_id'] == '2026/4199')
|
||||
assert eccv_encoded_row['authors'] == eccv_encoding['gold']['authors']
|
||||
assert 'jsonld_display_text_normalized_requires_review' in eccv_encoded_row['metadata']['public_page_fields']['review_flags']
|
||||
icaps_fixture = json.loads(gzip.decompress((src/'tests/fixtures/icaps2026-source.json.gz').read_bytes()))
|
||||
icaps_snapshots = root/'icaps2026-snapshots'
|
||||
icaps_snapshots.mkdir()
|
||||
|
||||
@@ -24,6 +24,8 @@ paper-atlas collect eccv2026-program \
|
||||
|
||||
公开页的 canonical URL、可见标题/作者和 JSON-LD 相互核对;页面版本与冻结节目文字有差异时分别保留并标记待审阅,不制造人名别名。JSON-LD 日期只是网站条目时间,不当作论文发表日期或原始决定日期。摘要保留公开页 DOM 文本(规范空白),包括源头的断词、缺空格;不自动修补。原始 HTML 单独留存;遇到公式、上下标或图片结构会标记待审阅,不能把扁平化文本当作无损数学表达。页面上的登录提示对应直播内容,不用于访问受保护内容。
|
||||
|
||||
第 4199 页的 JSON-LD 作者姓名存在双重 HTML 实体编码。解析器最多解码两层文本实体并规范空白,且仍要求标题、完整作者序列与可见页面精确一致;真实不一致或更多编码层次仍停止。`jsonld_raw_text` 保留原始结构化标题/姓名,发生文本规范化时增加 `jsonld_display_text_normalized_requires_review`,不生成姓名别名。恢复必须使用校验过的修复版本、新输出目录和原缓存;保留旧失败目录,不重新请求已有成功页面。
|
||||
|
||||
官方关键词保存在独立 `eccv_program:keyword` 命名空间,并保留原始单元格和证据。关键词、展示形式、贡献/研究类型、自定义标签相互独立,投稿 track 暂用 `program_unclassified`,不按主题推断 main、findings、workshop 或 position。
|
||||
|
||||
[2026 投稿政策](https://eccv.ecva.net/Conferences/2026/SubmissionPolicies)明确评审和作者回复不公开;这不能代替对公开 rejected、desk rejected、withdrawn **决定元数据**的单独核查。当前拒稿决定可见性仍记为 unknown,不能从录用表缺席推断拒稿。
|
||||
|
||||
@@ -3,6 +3,7 @@ import argparse
|
||||
from collections import Counter
|
||||
from datetime import datetime, timezone
|
||||
import fcntl
|
||||
from html import unescape
|
||||
import json
|
||||
from pathlib import Path
|
||||
import re
|
||||
@@ -74,21 +75,35 @@ def parse_paper(raw, url, program):
|
||||
ld = one([json.loads(''.join(x for x in n.children if isinstance(x, str))) for n in scripts])
|
||||
authors = ld.get('author')
|
||||
if (canonical != url or ld.get('@type') != 'CreativeWork' or ld.get('creditText') != 'ECCV 2026'
|
||||
or not title or ld.get('name') != title or not abstract
|
||||
or not title or not isinstance(ld.get('name'), str) or not abstract
|
||||
or not isinstance(authors, list) or not authors
|
||||
or any(not isinstance(a, dict) or a.get('@type') != 'Person' or not isinstance(a.get('name'), str)
|
||||
or not clean(a['name']) or '@' in a['name'] for a in authors)):
|
||||
raise ValueError('Public visible/structured metadata identity or edition disagrees')
|
||||
names = [a['name'] for a in authors]
|
||||
if ' ⋅ '.join(names) != authors_literal:
|
||||
# The real poster 4199 double-encodes an apostrophe in JSON-LD. Decode a
|
||||
# bounded number of text-entity layers, then require exact visible agreement.
|
||||
# Keep literal structured fields as evidence; this does not create aliases.
|
||||
def display_text(value):
|
||||
for _ in range(2):
|
||||
value = unescape(value)
|
||||
return clean(value)
|
||||
|
||||
raw_names = [a['name'] for a in authors]
|
||||
names = [display_text(name) for name in raw_names]
|
||||
if display_text(ld['name']) != title:
|
||||
raise ValueError('Public visible and structured titles disagree')
|
||||
if any('@' in name for name in names) or ' ⋅ '.join(names) != authors_literal:
|
||||
raise ValueError('Complete visible and structured authors disagree')
|
||||
flags = ['structured_abstract_markup_requires_review'] if markup else []
|
||||
if raw_names != names or ld['name'] != title:
|
||||
flags.append('jsonld_display_text_normalized_requires_review')
|
||||
if title != program['listing']['title']:
|
||||
flags.append('program_and_page_title_versions_differ_requires_review')
|
||||
if authors_literal != program['listing']['authors_literal']:
|
||||
flags.append('program_and_page_author_versions_differ_requires_review')
|
||||
return {'title': title, 'authors': names, 'authors_literal': authors_literal, 'abstract': abstract,
|
||||
'page_metadata_dates': {k: ld.get(k) for k in ('datePublished', 'dateModified')}, 'review_flags': flags, 'abstract_markup_tags': markup}
|
||||
'page_metadata_dates': {k: ld.get(k) for k in ('datePublished', 'dateModified')}, 'review_flags': flags, 'abstract_markup_tags': markup,
|
||||
'jsonld_raw_text': {'name': ld['name'], 'author_names': raw_names}}
|
||||
|
||||
|
||||
def official_snapshot(root):
|
||||
|
||||
BIN
Binary file not shown.
@@ -112,3 +112,17 @@ class ECCV2026Tests(unittest.TestCase):
|
||||
for receipt in self.bundle['paper_manifest']['records']:
|
||||
raw = self.bundle['paper_pages'][receipt['paper_id']].encode('utf-8')
|
||||
self.assertEqual(hashlib.sha256(raw).hexdigest(), receipt['sha256'])
|
||||
|
||||
def test_real_double_encoded_author_requires_exact_visible_agreement(self):
|
||||
import hashlib
|
||||
sample = self.bundle['encoding_sample']; pid = sample['paper_id']; raw = sample['html']
|
||||
self.assertEqual(hashlib.sha256(raw.encode('utf-8')).hexdigest(), sample['receipt']['sha256'])
|
||||
self.assertEqual(sample['receipt']['sha256'], 'b575318fa569e83eea5e96f937dd60f078fbed482877318013f797c16a02ff09')
|
||||
fields = c.parse_paper(raw, sample['receipt']['url'], self.program[pid])
|
||||
self.assertEqual(fields['authors'], sample['gold']['authors'])
|
||||
self.assertEqual(fields['jsonld_raw_text']['author_names'][0], 'Zi'ang Lu')
|
||||
self.assertIn('jsonld_display_text_normalized_requires_review', fields['review_flags'])
|
||||
# Real changes to the author or an extra encoding layer remain errors.
|
||||
for replacement in ('Other Author', 'Zi'ang Lu'):
|
||||
with self.assertRaisesRegex(ValueError, 'authors disagree'):
|
||||
c.parse_paper(raw.replace('Zi'ang Lu', replacement), sample['receipt']['url'], self.program[pid])
|
||||
|
||||
Reference in New Issue
Block a user