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

'on':
pull_request:
paths:
- 'frontiers/c8_normalizer_floor_planar_20260930/**'
- '.github/workflows/c8-normalizer-floor-planar.yml'
- 'imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md'
- 'frontiers/c6_cluster_coefficients_numerics_20260930/RESULTS.json'
workflow_dispatch:

permissions:
contents: read

jobs:
certified-replay:
runs-on: ubuntu-latest
timeout-minutes: 30
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, replay the certified floor (twelve sub-boxes of the two bands exactly), reject mutants
env:
PYTHONDONTWRITEBYTECODE: '1'
run: |
set -euo pipefail
python -B -S - <<'PY'
import hashlib, json, pathlib, subprocess, sys
root = pathlib.Path('frontiers/c8_normalizer_floor_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 / 'floor.py')
for flags in (['-B', '-S'], ['-B', '-O', '-S']):
out = subprocess.run([sys.executable, *flags, script, '--check'], cwd=root, capture_output=True, timeout=1500)
Comment thread
d6g8k5htny-coder marked this conversation as resolved.
if out.returncode != 0:
raise RuntimeError('check failed under ' + ' '.join(flags) + ': ' + out.stdout.decode()[-400:] + out.stderr.decode()[-400:])
for m in ['swap-minmax', 'drop-torus-error', 'sign-saddle']:
rc = subprocess.run([sys.executable, *flags, script, '--check', '--mutant', m], cwd=root, capture_output=True, timeout=1500).returncode
if rc != 1:
raise RuntimeError('mutant ' + m + ' not rejected')
print(json.dumps({'scientific_effect': 'NONE', 'certified_floor_replayed': True}))
PY
git diff --exit-code

full-regeneration:
# complete regeneration of every sub-box floor and comparison with RESULTS.json (about two hours on two cores);
# run on demand (workflow_dispatch), not on every pull request
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 350
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: '3.11.16'
- name: Regenerate all 11904 sub-box floors of both bands and compare exactly with RESULTS.json
env:
PYTHONDONTWRITEBYTECODE: '1'
run: |
set -euo pipefail
cd frontiers/c8_normalizer_floor_planar_20260930
python -B -S floor.py --check-full --procs 2
git diff --exit-code
Loading
Loading