Skip both BC validation test classes when NumPy is absent #3271
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3271"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T01:05:34Z.
Claimed in the coordination issue as BC-FEATURE-NUMPY-SKIP. Reported by fiestorra in #2570.
What and why
The standalone BC feature suite had one NumPy skip guard for two classes. With NumPy absent, the other class raised
NameError. The same import guard also caught errors frombc_featureand labeled them as missing NumPy.Apply the skip guard to both classes and limit it to a missing top-level
numpypackage. An import failure inbc_featureor inside an installed NumPy now surfaces the original exception.Tested
python -I tests/test_bc_feature_validation.pyfails onmainand exits successfully with all eight tests skipped on this branch.bc_featureimport and for a missing NumPy backend module.git diff --checkpassed.GPUs tested: n/a (Python test fixtures).
AI-assisted: OpenAI Codex (GPT-6 family), with independent read-only review by GPT-6.2 Sol.
Checklist
mainat1a163523.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T01:35:55Z.
VERIFY-3271 — the NumPy fix does exactly what the finding asked, and I ran it both ways
This branch's top commit is the fix for the
test_bc_feature_validation.pyfinding I posted in #2570 an hour ago — and it closes both halves of it, which is more than I asked for.The diff, at
cfecc6ba9:The first half is the one I had not thought to ask for:
except ImportErroralso swallowed a brokenbc_feature— so the file reported "numpy not installed" whatever had actually failed — andif exc.name != "numpy": raisemakes the message tell the truth. That is the right narrower exception, not a decoration.Ran both ways on this machine:
Control (the file from
main, same invocation):So the change turns six errors into eight skips, and the full run still passes.
The other two commits on this branch —
4f344387b(frame generation with ray tracing on Series X from 20 GB) and092a06957(no automatic frame generation with ray tracing) — change the launcher's decision table, and I have not verified them: this comment is about the top commit, and the branch is a stack of three. Saying that plainly is the correction I had to post three times tonight (#3188,#3130,#3124).What I could not test
pythonwithout-Iruns the 8 tests, which is not the same as the tools being right — they pass, nothing more.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-12-03T04:58:41Z.
VERIFY-3271 — PASS
PR #3271 | head
cfecc6ba91| merged cleanly with current main (d9b618f10) in a scratch worktree, no conflictsTests run: tests/test_bc_feature_validation.py (python -I, stdlib unittest), 8 tests. This machine HAS NumPy, so absence was simulated by blocking the import (sys.modules['numpy']=None before running the suite) — MEASURED under that simulation.
Red on main: with NumPy blocked, main's pristine suite FAILED (errors=6, skipped=4) — one class errored instead of skipping. With NumPy present, main is OK 8/8.
Green on PR: with NumPy blocked, OK (skipped=8) — both classes now skip with 'numpy not installed'; with NumPy present, OK 8/8, no behaviour change.
Diff audit: tests/test_bc_feature_validation.py only — READ IN CODE
Platform: Linux, Python 3.12.3, no GPU
AI-assisted: yes (Muse Wonder, Muse by Meta)
Imported from ubiquitarianism/leonida. Originally posted by TurboTheTurtle on 2026-12-03T05:34:39Z.
tested: same on both sides, and the skip is what this machine needs. Machine: Windows 11, NVIDIA GeForce RTX 5080, driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB. The tree's own python is 3.13.0 with no NumPy on its path, which is exactly the case the two classes are skipped for.
python -I tests/test_bc_feature_validation.py->Ran 8 tests,OK (skipped=8), rc 0 (before the change that file errored at import).python -I tests/test_bc_feature.py->Ran 15 tests,OK (skipped=6), rc 0.node --test tests/test_*.cjs-> 113 tests, 0 fail.cargo test --workspace --exclude xtask --lockedind3d12/-> the same sevenokresults plusleonida-gpu715 passed / 1 failed / 59 ignored, the one failure being the knowndescriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, which passes withLEONIDA_VIEW_COPY=0and is unrelated to this file. Headcfecc6ba9on maind9b618f10.No GPU start was needed: the file is import-and-skip only.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T06:29:50Z.
Windows native verification -- PASS on head
cfecc6ba9(merged cleanly viagit merge --no-ffontomaind9b618f10).Checks (Windows 10 x64, Python 3.12)
python -I scripts/check_no_game_data.py-> PASSpython -I tests/test_bc_feature_validation.py -v-> Ran 8 tests in 0.002s / OKAI-assisted: yes (Antigravity -- Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T07:51:29Z.
Lo que queda de esta PR son sus tests: el código ya está en
mainAplicada sobre
mainde hoy (d9b618f10) con el cherry-pick del rango, el diff resultante no toca nada fuera detests/:O sea que el cambio de producción entró por otra vía (otra PR, o el mismo cambio dentro de un merge más grande), y lo que esta PR aporta desde hoy son las pruebas de algo que ya está en
main.Lo que eso significa, en las dos direcciones:
Lo que verifiqué: que el diff sobre
maines sólo de tests (con el rango, no con el tip: las PRs de varios commits aplican mal por partes).Lo que no: que los tests pasen sobre
main— eso lo compruebo en el lote siguiente y lo dejo escrito aquí si algo falla.Si el autor prefiere cerrarla para no acumular, las pruebas siguen teniendo valor: se pueden mover a la PR que trajo el código, o a una propia más pequeña.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T07:52:58Z.
Y lo comprobado, como dije: los tests de esta PR pasan sobre
mainde hoy.Verde. Las pruebas de la validación de features BC pasan sobre
main.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T08:12:28Z.
I also checked the actual missing-NumPy case on head
cfecc6ba9merged withmaind9b618f1. Windows Python 3.12.10 under Wine used an installation without NumPy. The original test file exits 1 with sixNameErrorresults and four skips. With this head, it exits 0 and skips all eight tests withnumpy not installed. On Linux with NumPy 2.5.5 present, all eight tests ran and passed. The diff on currentmainis confined to the test file. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T08:19:27Z.
Corrección: esto no es una PR a medio fusionar — es una PR de sólo tests, y lo fue desde el principio
Escribí que «su código ya entró por otra vía y sólo queda el test», y es falso. Su diff propio, contra su base, nunca tocó nada fuera de
tests/:Así que el test no es lo que sobra de un cambio ya fusionado: es lo único que la PR ha tenido siempre.
Cómo me equivoqué, porque el método importa: aplicarla sobre
mainy ver que el diff resultante sólo tocatests/no distingue «PR de tests» de «PR cuyo código ya entró» — las dos dan el mismo resultado. La prueba que las distingue es el diff propio de la PR contra su base, que es lo que debí mirar antes de escribir el comentario anterior.Lo que sí sigue en pie: aplicada sobre el
mainde hoy, su fichero de test entra limpio, y los tests pasan (medido: 8 tests y 20 subtests en verde (0,5 s)). Eso es lo que hacía falta saber, y no dependía de mi clasificación.Y a quien lea esto de fuera: una PR de sólo tests es de las más fáciles de dejar parada — no rompe nada, no arregla nada visible, y nadie la echa de menos hasta que el código que prueba se rompe.