Reject contradictory submission identities and correct snapshot fixtures
Metadata integrity checks / metadata (push) Successful in 4s

This commit is contained in:
2026-11-06 16:32:09 +08:00
parent 53a83a85a6
commit 8bfe52df68
4 changed files with 18 additions and 2 deletions
+10
View File
@@ -55,6 +55,16 @@ class SubmissionTests(unittest.TestCase):
self.decision(paper,two,'forum2',[('openreview','forum2'),('iclr_number','2')])
self.assertEqual(self.store.conn.execute('SELECT count(*) FROM submissions').fetchone()[0],2)
def test_conflicting_forums_cannot_be_bridged_by_one_submission_number(self):
paper,one=self.record('snapshot','realForum',['Jane Doe'])
other,two=self.record('snapshot','differentForum',['Other Author'])
self.decision(paper,one,'realForum',[('openreview','realForum'),('iclr_number','42')])
with self.assertRaisesRegex(ValueError,'Conflicting authoritative submission identities'):
self.decision(other,two,'differentForum',[('openreview','differentForum'),('iclr_number','42')])
self.assertEqual(self.store.conn.execute('SELECT count(*) FROM papers').fetchone()[0],2)
self.assertEqual(self.store.conn.execute('SELECT count(*) FROM submissions').fetchone()[0],1)
self.assertEqual(self.store.conn.execute('SELECT count(*) FROM submission_merges').fetchone()[0],0)
def test_late_identity_bridge_preserves_decisions_and_does_not_reuse_merged_ids(self):
first,one=self.record('iclr_program','number-42',['Jane Doe','John Smith'])
second,two=self.record('openreview_snapshot','realForum',['Anonymous'])