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
12 changes: 9 additions & 3 deletions docs/FORMAL_REQUIRED_CHECKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ bundle for this repository and main #188 is preserved in main at
## Validation

Run python3 -B -S -m unittest discover -s tests -p test_required_formal_check.py -v
and the same command with -O. Each mode runs forty-six tests. Thirty cover real
CLI success/failure, missing/extra dependencies, all non-success states, stale
and the same command with -O. In this Math- repository, each mode runs
fifty-seven tests: thirty original tests, sixteen W8c controls and eleven W7j
controls. The original thirty cover real CLI success/failure, missing/extra
dependencies, all non-success states, stale
commit/run/attempt, repository substitution, malformed identity, modified
logs/manifests, duplicate JSON keys and reusable-workflow wiring. Sixteen W8c
mutation-gap controls cover the three context() identity bindings: the
Expand All @@ -82,7 +84,11 @@ empty refused), commit identity (40 lowercase hex accepted; short, long,
uppercase, non-hex and non-string refused) and run-ID binding (multi-digit and
single nonzero digit accepted; zero, leading zero, non-numeric and empty
refused). Their CLI children receive -O exactly when the outer run is optimized,
with any inherited PYTHONOPTIMIZE removed. Hosted negative and positive executions
with any inherited PYTHONOPTIMIZE removed. Eleven W7j mutation-gap controls cover
exact run-attempt identity, tested-checkout binding, receipt/manifest symlinks,
receipt object shape and identity fields, log-map shape and log-digest validation,
non-finite JSON and CLI duplicate keys, dependency-output shape and exact
receipt-digest strings. Hosted negative and positive executions
are recorded separately; unit tests alone do not establish platform merge refusal.

Official references consulted 27 September 2026:
Expand Down
4 changes: 2 additions & 2 deletions frontiers/downstream_gate_20260925/SOURCE_FILES.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"sha256": "84b7ad724e4da1c5b4b396c90ae03d4ddedc37771a6e45e1082a45fd80d7ff4a"
},
"run_validation.py": {
"bytes": 10454,
"sha256": "ec1d3315b0c21f4608ab7b824f45d7d6e1041555f62e77feeec2bacaa8e5a9f5"
"bytes": 10466,
"sha256": "6b5aa2361e8ce75ce4fc2e76a6386ebdc15e18de567471edefdd8a250f05b59a"
},
"test_hard_gate.py": {
"bytes": 23161,
Expand Down
6 changes: 3 additions & 3 deletions frontiers/downstream_gate_20260925/run_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def execute(command, cwd, out, name, mutant=False, *, mode, mutation=None):
(out/(name+'.stderr')).write_text(result.stderr)
require(f'Ran {EXPECTED_TESTS} tests' in result.stderr and 'skipped=' not in result.stderr, 'unexpected test coverage: '+name)
if mutant:
require(result.returncode != 0 and 'AssertionError' in result.stderr and 'FAILED (failures=' in result.stderr,
require(result.returncode == 1 and 'AssertionError' in result.stderr and 'FAILED (failures=' in result.stderr,
'mutation was not detected by a test assertion: '+name)
require('SyntaxError' not in result.stderr and 'ImportError' not in result.stderr and '\nERROR:' not in result.stderr,
'mutation caused a program error: '+name)
Expand All @@ -140,9 +140,9 @@ def main():
'meaning': 'software replay and mutation detection only; not independent analytic acceptance'}
try:
for mode, flags in [('normal', []), ('optimized', ['-O'])]:
cmd = [sys.executable, '-B', *flags, '-S', '-m', 'unittest', 'discover', '-p', 'test_*.py', '-v']
cmd = [sys.executable, '-E', '-B', *flags, '-S', '-m', 'unittest', 'discover', '-p', 'test_*.py', '-v']
execute(cmd, ROOT, out, 'tests_'+mode, mode=mode)
result = subprocess.run([sys.executable, '-B', *flags, '-S', 'hard_gate.py'], cwd=ROOT, capture_output=True, timeout=15)
result = subprocess.run([sys.executable, '-E', '-B', *flags, '-S', 'hard_gate.py'], cwd=ROOT, capture_output=True, timeout=15)
require(result.returncode == 0 and result.stdout == (ROOT/'RESULTS.json').read_bytes(), 'entry/result mismatch: '+mode)
(out/('output_'+mode+'.json')).write_bytes(result.stdout)
for name, (old, new) in MUTANTS.items():
Expand Down
Loading
Loading