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
72 changes: 72 additions & 0 deletions .github/workflows/c8-cap-failure-coefficient-planar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: C8 planar cap-failure coefficient (certified replay)

'on':
pull_request:
paths:
- 'frontiers/c8_cap_failure_coefficient_planar_20260930/**'
- '.github/workflows/c8-cap-failure-coefficient-planar.yml'
- 'imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md'
- 'imports/lifetime_parent_20260925/MARKED_CYLINDER_CAP_PROOF.md'
- 'frontiers/c6_cluster_coefficients_numerics_20260930/RESULTS.json'
- 'frontiers/local_elder_geometry_20260930/PROOF.md'
workflow_dispatch:

permissions:
contents: read

jobs:
certified-replay:
runs-on: ubuntu-latest
timeout-minutes: 75
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: '3.11.16'
- name: Verify manifest and main-resident pins, recompute every certified enclosure in both interpreter modes, reject mutants
env:
PYTHONDONTWRITEBYTECODE: '1'
run: |
set -euo pipefail
python -B -S - <<'PY'
import concurrent.futures, hashlib, json, pathlib, subprocess, sys
root = pathlib.Path('frontiers/c8_cap_failure_coefficient_planar_20260930').resolve()
manifest = json.loads((root / 'SOURCE_FILES.json').read_text())['files']
present = sorted(p.name for p in root.iterdir())
if present != sorted([e['path'] for e in manifest] + ['SOURCE_FILES.json']):
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'])
pins = json.loads((root / 'SOURCE_MAP.json').read_text())
for entry in pins['sources']:
if not entry['current_required']:
continue
data = pathlib.Path(entry['path']).read_bytes()
blob = hashlib.sha1(b'blob %d\0' % len(data) + data).hexdigest()
if len(data) != entry['bytes'] or hashlib.sha256(data).hexdigest() != entry['sha256'] or blob != entry['git_blob']:
raise ValueError('consumed source identity mismatch on this tree: ' + entry['path'])
script = str(root / 'cap_coefficient.py')
for flags in (['-B', '-S'], ['-B', '-O', '-S']):
out = subprocess.run([sys.executable, *flags, script, '--check', '--procs', '2'], cwd=root, capture_output=True, timeout=2400)
if out.returncode != 0:
raise RuntimeError('check failed under ' + ' '.join(flags) + ': ' + out.stdout.decode()[-400:] + out.stderr.decode()[-400:])
print(flags, out.stdout.decode().strip()[-300:])
# each mutant fails on the first k value (about four minutes); run them two at a time
def mutant(args):
flags, m = args
return m, flags, subprocess.run([sys.executable, *flags, script, '--check', '--procs', '1', '--mutant', m], cwd=root, capture_output=True, timeout=2400).returncode
jobs = [(flags, m) for flags in (['-B', '-S'], ['-B', '-O', '-S']) for m in ['no-third-jet', 'sign-lo', 'variance-yyy']]
with concurrent.futures.ThreadPoolExecutor(max_workers=2) as ex:
for m, flags, rc in ex.map(mutant, jobs):
if rc != 1:
raise RuntimeError('mutant ' + m + ' not rejected under ' + ' '.join(flags))
print(json.dumps({'scientific_effect': 'NONE', 'certified_enclosures_replayed': True, 'mutants_rejected': 6}))
PY
git diff --exit-code
Loading
Loading