test(01-07): integrate counted fidelity regressions and exact local results
Run existing fidelity Python, Node and observer checks with positive-count guards and explicit TAP output. Record the completed 782.05-second local suite and preserve human acceptance at 0/120.
This commit is contained in:
1 parent
b732256751
commit
472500bf4e
5 files changed
+128
-1
No files matched your search
+38
-1
@@ -1,7 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
source "$(dirname "$0")/env.sh"
|
||||
python3 -m unittest discover -s tests -p 'test_*.py' -v
|
||||
suite_started=$SECONDS
|
||||
mkdir -p artifacts/fidelity
|
||||
python3 - <<'PY'
|
||||
import sys
|
||||
import unittest
|
||||
suite = unittest.defaultTestLoader.discover('tests', pattern='test_*.py')
|
||||
def cases(node):
|
||||
for item in node:
|
||||
if isinstance(item, unittest.TestSuite):
|
||||
yield from cases(item)
|
||||
else:
|
||||
yield item
|
||||
counts = {}
|
||||
for case in cases(suite):
|
||||
module = case.id().split('.')[0]
|
||||
if module.startswith('test_fidelity_'):
|
||||
counts[module] = counts.get(module, 0) + 1
|
||||
required = ('sessions', 'scenarios', 'review', 'ledger', 'observation',
|
||||
'checkpoint', 'capture', 'acceptance')
|
||||
assert all(counts.get('test_fidelity_' + name, 0) > 0 for name in required), counts
|
||||
print('Fidelity Python checks:', sum(counts.values()), counts, flush=True)
|
||||
sys.exit(not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful())
|
||||
PY
|
||||
node --test --test-reporter=tap tests/fidelity-viewer.test.mjs | tee artifacts/fidelity/consolidated-viewer.log
|
||||
python3 - <<'PY'
|
||||
import re
|
||||
from pathlib import Path
|
||||
text = Path('artifacts/fidelity/consolidated-viewer.log').read_text()
|
||||
assert re.search(r'^# tests [1-9][0-9]*$', text, re.M), 'zero/missing viewer checks'
|
||||
PY
|
||||
dotnet run --project tests/GamePort.FidelityObservationTests | tee artifacts/fidelity/consolidated-observer.log
|
||||
python3 - <<'PY'
|
||||
import re
|
||||
from pathlib import Path
|
||||
text = Path('artifacts/fidelity/consolidated-observer.log').read_text()
|
||||
assert re.search(r'Fidelity observation checks: [1-9][0-9]* passed', text), 'zero/missing observer checks'
|
||||
PY
|
||||
python3 tools/extractors/prepare.py --all-scenes --audio sounds musicsecretlab
|
||||
dotnet run --project tests/GamePort.DataTests -- ../Original
|
||||
dotnet run --project tests/GamePort.CollisionTests -- ../Original
|
||||
@@ -118,3 +154,4 @@ if [[ "${NEUTRON_WINDOW_TEST:-0}" == 1 ]]; then
|
||||
dotnet run --no-build -- --scene artifacts/extracted/level1b/scene.json --smoke-window --frames 6 --screenshot artifacts/test-window.ppm
|
||||
dotnet run --no-build -- --smoke-walk --screenshot artifacts/test-walk-window.ppm
|
||||
fi
|
||||
printf 'Complete local suite passed in %s seconds; fidelity Python/Node/observer counts verified positive.\n' "$((SECONDS - suite_started))"
|
||||
Reference in new issue
Block a user