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
40 changes: 20 additions & 20 deletions .github/workflows/side24-d5-closed-form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ name: SIDE24 d5 closed form
paths:
- 'coefficients/side24_d5_closed_form_20260930/**'
- '.github/workflows/side24-d5-closed-form.yml'
- 'tools/**'
- 'tools.py'
- 'tests/test_side24_mutant_workflows.py'
- 'tests/test_legacy_workflow_triggers.py'
- 'imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md'
- 'coefficients/side24_v1/PROOF.md'
workflow_dispatch:
Expand All @@ -23,6 +27,13 @@ jobs:
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.11.16'
- name: Check trigger coverage and the SIDE24 replay contract in both modes
env:
SIDE24_MUTANT_TEST_FAMILY: 'side24-d5-closed-form'
PYTHONDONTWRITEBYTECODE: '1'
run: |
python -B -S tests/test_side24_mutant_workflows.py
python -B -O -S tests/test_side24_mutant_workflows.py
- name: Verify sources and pins, replay both modes, reject mutants
env:
PYTHONDONTWRITEBYTECODE: '1'
Expand Down Expand Up @@ -54,27 +65,16 @@ jobs:
blob = hashlib.sha1(b'blob %d\0' % len(data) + data).hexdigest()
if blob != pin['git_blob']:
raise ValueError('pinned source drifted: ' + pin['path'] + ' ' + blob)
script = str(root / 'closed_form_d4.py')
expected = (root / 'RESULTS.json').read_bytes()
mutants = ['shift-variance', 'vandermonde', 'erfc-sign', 'jacobian', 'mehta', 'by-parts', 'one-erf', 'two-erf', 'jk-init', 'gauss-half', 'boundary-term', 'atom-pi', 'cumulative-init', 'cumulative-recurrence']
def mutant_rc(args):
flags, m = args
return m, flags, subprocess.run([sys.executable, *flags, script, '--mutant', m],
capture_output=True, timeout=600).returncode
for flags in (['-B', '-S'], ['-B', '-O', '-S']):
out = subprocess.run([sys.executable, *flags, script],
check=True, capture_output=True, timeout=600).stdout
if out != expected:
raise RuntimeError('output differs from RESULTS.json under ' + ' '.join(flags))
doc = json.loads(out)
if not (doc['passed'] and len(doc['checks']) == 16 and all(doc['checks'].values())):
raise RuntimeError('certification did not pass under ' + ' '.join(flags))
if doc['closed_forms']['D_4'] != '6695/54 + -405/32 sqrt(6) + -1375/72 sqrt(21) pi^(-1) + -405/16 sqrt(6) pi^(-1) arctan(1/4 sqrt(14)) + -6695/27 pi^(-1) arctan(1/7 sqrt(21)) + 405/16 sqrt(6) pi^(-1) arctan(1/7 sqrt(14))' or doc['closed_forms']['Z_4'] != '1536 pi^(1)':
raise RuntimeError('closed form differs from the stated one')
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool:
for m, fl, rc in pool.map(mutant_rc, [(flags, m) for m in mutants]):
if rc != 1:
raise RuntimeError('mutant ' + m + ' not rejected under ' + ' '.join(fl))
doc = json.loads(expected)
if not (doc['passed'] and len(doc['checks']) == 16 and all(doc['checks'].values())):
raise RuntimeError('RESULTS.json is not a passing certification')
if doc['closed_forms']['D_4'] != '6695/54 + -405/32 sqrt(6) + -1375/72 sqrt(21) pi^(-1) + -405/16 sqrt(6) pi^(-1) arctan(1/4 sqrt(14)) + -6695/27 pi^(-1) arctan(1/7 sqrt(21)) + 405/16 sqrt(6) pi^(-1) arctan(1/7 sqrt(14))' or doc['closed_forms']['Z_4'] != '1536 pi^(1)':
raise RuntimeError('closed form differs from the stated one')
# Every child: exact exit status, one timing line on stderr, baseline stdout equal
# to RESULTS.json, each mutant's report equal to the measured one (both modes).
from tools.side24_mutant_replay import replay
replay('side24-d5-closed-form', pathlib.Path.cwd(), timeout=600)
print(json.dumps({'scientific_effect': 'NONE', 'mathematical_acceptance': False, 'exact_identity_checked': True, 'side24_v1': 'unchanged'}))
PY
git diff --exit-code
36 changes: 18 additions & 18 deletions .github/workflows/side24-d5-coefficient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ name: SIDE24 d5 coefficient
paths:
- 'coefficients/side24_d5_20260930/**'
- '.github/workflows/side24-d5-coefficient.yml'
- 'tools/**'
- 'tools.py'
- 'tests/test_side24_mutant_workflows.py'
- 'tests/test_legacy_workflow_triggers.py'
- 'imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md'
- 'coefficients/side24_v1/PROOF.md'
- 'coefficients/side24_v1/ENCLOSURE.json'
Expand All @@ -24,6 +28,13 @@ jobs:
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.11.16'
- name: Check trigger coverage and the SIDE24 replay contract in both modes
env:
SIDE24_MUTANT_TEST_FAMILY: 'side24-d5-coefficient'
PYTHONDONTWRITEBYTECODE: '1'
run: |
python -B -S tests/test_side24_mutant_workflows.py
python -B -O -S tests/test_side24_mutant_workflows.py
- name: Verify sources and pins, replay both modes, reject mutants
env:
PYTHONDONTWRITEBYTECODE: '1'
Expand Down Expand Up @@ -61,25 +72,14 @@ jobs:
for d in ('2', '3'):
if ('"%s", "%s"' % (enc[d]['lower'], enc[d]['upper'])) not in src:
raise ValueError('SIDE24 d = ' + d + ' enclosure quoted in the script differs from ENCLOSURE.json')
script = str(root / 'cone_moment_d5.py')
expected = (root / 'RESULTS.json').read_bytes()
mutants = ['shift-variance', 'vandermonde', 'erfc-branch', 'remainder-dropped', 'mehta', 'sphere-area', 'image-shells', 'sandwich-exponent', 'recurrence', 'jacobian', 'cumulative-half']
def mutant_rc(args):
flags, m = args
return m, flags, subprocess.run([sys.executable, *flags, script, '--mutant', m],
capture_output=True, timeout=1500).returncode
for flags in (['-B', '-S'], ['-B', '-O', '-S']):
out = subprocess.run([sys.executable, *flags, script],
check=True, capture_output=True, timeout=1500).stdout
if out != expected:
raise RuntimeError('output differs from RESULTS.json under ' + ' '.join(flags))
doc = json.loads(out)
if not (doc['passed'] and len(doc['checks']) == 13 and all(doc['checks'].values())):
raise RuntimeError('certification did not pass under ' + ' '.join(flags))
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool:
for m, fl, rc in pool.map(mutant_rc, [(flags, m) for m in mutants]):
if rc != 1:
raise RuntimeError('mutant ' + m + ' not rejected under ' + ' '.join(fl))
doc = json.loads(expected)
if not (doc['passed'] and len(doc['checks']) == 13 and all(doc['checks'].values())):
raise RuntimeError('RESULTS.json is not a passing certification')
# Every child: exact exit status, one timing line on stderr, baseline stdout equal
# to RESULTS.json, each mutant's report equal to the measured one (both modes).
from tools.side24_mutant_replay import replay
replay('side24-d5-coefficient', pathlib.Path.cwd(), timeout=1500)
print(json.dumps({'scientific_effect': 'NONE', 'mathematical_acceptance': False, 'certified_enclosures': True, 'side24_v1': 'unchanged'}))
PY
git diff --exit-code
36 changes: 18 additions & 18 deletions .github/workflows/side24-d6-coefficient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ name: SIDE24 d6 coefficient
paths:
- 'coefficients/side24_d6_20260930/**'
- '.github/workflows/side24-d6-coefficient.yml'
- 'tools/**'
- 'tools.py'
- 'tests/test_side24_mutant_workflows.py'
- 'tests/test_legacy_workflow_triggers.py'
- 'imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md'
- 'coefficients/side24_v1/PROOF.md'
- 'coefficients/side24_v1/ENCLOSURE.json'
Expand All @@ -24,6 +28,13 @@ jobs:
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.11.16'
- name: Check trigger coverage and the SIDE24 replay contract in both modes
env:
SIDE24_MUTANT_TEST_FAMILY: 'side24-d6-coefficient'
PYTHONDONTWRITEBYTECODE: '1'
run: |
python -B -S tests/test_side24_mutant_workflows.py
python -B -O -S tests/test_side24_mutant_workflows.py
- name: Verify sources and pins, replay both modes, reject mutants
env:
PYTHONDONTWRITEBYTECODE: '1'
Expand Down Expand Up @@ -61,25 +72,14 @@ jobs:
for d in ('2', '3'):
if ('"%s", "%s"' % (enc[d]['lower'], enc[d]['upper'])) not in src:
raise ValueError('SIDE24 d = ' + d + ' enclosure quoted in the script differs from ENCLOSURE.json')
script = str(root / 'cone_moment_d6.py')
expected = (root / 'RESULTS.json').read_bytes()
mutants = ['shift-variance', 'vandermonde', 'erfc-branch', 'jacobian', 'mehta', 'recurrence', 'layer-init', 'two-erf', 'cumulative-half', 'remainder-dropped', 'erf-inside', 'tail-dropped', 'image-shells', 'sandwich-exponent']
def mutant_rc(args):
flags, m = args
return m, flags, subprocess.run([sys.executable, *flags, script, '--mutant', m],
capture_output=True, timeout=3000).returncode
for flags in (['-B', '-S'], ['-B', '-O', '-S']):
out = subprocess.run([sys.executable, *flags, script],
check=True, capture_output=True, timeout=3000).stdout
if out != expected:
raise RuntimeError('output differs from RESULTS.json under ' + ' '.join(flags))
doc = json.loads(out)
if not (doc['passed'] and len(doc['checks']) == 20 and all(doc['checks'].values())):
raise RuntimeError('certification did not pass under ' + ' '.join(flags))
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool:
for m, fl, rc in pool.map(mutant_rc, [(flags, m) for m in mutants]):
if rc != 1:
raise RuntimeError('mutant ' + m + ' not rejected under ' + ' '.join(fl))
doc = json.loads(expected)
if not (doc['passed'] and len(doc['checks']) == 20 and all(doc['checks'].values())):
raise RuntimeError('RESULTS.json is not a passing certification')
# Every child: exact exit status, one timing line on stderr, baseline stdout equal
# to RESULTS.json, each mutant's report equal to the measured one (both modes).
from tools.side24_mutant_replay import replay
replay('side24-d6-coefficient', pathlib.Path.cwd(), timeout=3000)
print(json.dumps({'scientific_effect': 'NONE', 'mathematical_acceptance': False, 'certified_enclosures': True, 'side24_v1': 'unchanged'}))
PY
git diff --exit-code
Loading
Loading