Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/c6-factorial-moment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: C6 factorial-moment candidate checks

'on':
pull_request:
paths:
- 'frontiers/c6_factorial_moment_20260929/**'
- '.github/workflows/c6-factorial-moment.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
exact-and-probe:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: '3.11.16'
- name: Verify sources, replay both modes, reject mutants
env:
PYTHONDONTWRITEBYTECODE: '1'
run: |
set -euo pipefail
python -B -S - <<'PY'
import hashlib, json, pathlib, subprocess, sys
root = pathlib.Path('frontiers/c6_factorial_moment_20260929').resolve()
manifest = json.loads((root / 'SOURCE_FILES.json').read_text())['files']
present = sorted(p.name for p in root.iterdir())
expected_names = sorted([e['path'] for e in manifest] + ['SOURCE_FILES.json'])
if present != expected_names:
raise ValueError('packet tree differs from manifest: ' + repr(present))
for entry in manifest:
path = root / entry['path']
if pathlib.PurePosixPath(entry['path']).name != entry['path'] or path.is_symlink():
raise ValueError('flat regular source required: ' + entry['path'])
data = path.read_bytes()
if len(data) != entry['bytes'] or hashlib.sha256(data).hexdigest() != entry['sha256']:
raise ValueError('source identity mismatch: ' + entry['path'])
script = str(root / 'c6_check.py')
expected = (root / 'RESULTS.json').read_bytes()
mutants = ['wrong-elimination', 'touching-balls', 'no-log', 'short-remainder']
for flags in (['-B', '-S'], ['-B', '-O', '-S']):
out = subprocess.run([sys.executable, *flags, script],
check=True, capture_output=True, timeout=300).stdout
if out != expected:
raise RuntimeError('output differs from RESULTS.json under ' + ' '.join(flags))
for m in mutants:
rc = subprocess.run([sys.executable, *flags, script, '--mutant', m],
capture_output=True, timeout=300).returncode
if rc != 1:
raise RuntimeError('mutant ' + m + ' not rejected')
print(json.dumps({'scientific_effect': 'NONE', 'mathematical_acceptance': False}))
PY
git diff --exit-code
Loading
Loading