red_green: report does not build when any mutated suite fails to build (TEST-RED-GREEN-MUTATE-NO-BUILD) #3304
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
2 participants
Due date
No due date set.
Reference
leonida/mandy!3304
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/3304"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as:
TEST-RED-GREEN-MUTATE-NO-BUILDWhat and why
In
scripts/red_green.py(mutate()), undoing a code hunk previously classified the mutated run asdoes not buildonly whennot any(t in s["tests"] for t in targets).When a pull request has red-to-green target tests across multiple suites (for example, Rust
cargotests plus a Pythonunittestfile, as observed while verifying #3206, or two Python test files):s["no_build"]non-empty and omits that suite's target test(s) froms["tests"].any(t in s["tests"] for t in targets)evaluated toTrue, misreporting the broken build asnot caught.This changes the check in
mutate()to:s["no_build"]catches a broken suite (cargo build error or Python import/syntax error) even when other suites still run and pass.not all(t in s["tests"] for t in targets)also catches partial build failures within a multi-binarycargo test --no-fail-fastrun where one binary ran tests (leavings["no_build"]empty) while another binary containing a target failed to compile.The existing precedence is preserved:
compiler crashed,caught(any target test failed),timed out building, andcaught by timeoutare still checked first.Tested
origin/main(a51cda3aa): Both new regression tests (Mutation.test_a_broken_suite_in_a_mixed_run_is_does_not_build_not_not_caughtandMutation.test_a_python_import_failure_with_another_passing_suite_is_does_not_build) fail onmainwithAssertionError: 'not caught' != 'does not build'.python -I tests/test_red_green.py -v—42passed,0failed.python -I scripts/red_green.py fix/red-green-mutate-no-build --base origin/main --no-fetch --no-cargo --mutate—verdict: red then green(2red→green,40pass on both,1/1hunk caught atscripts/red_green.py:812).python -I tests/test_text_write_line_endings.py—3passed,0failed.python -m compileall -q scripts/red_green.py tests/test_red_green.py— exit0.python -I scripts/check_no_game_data.py scripts/red_green.py tests/test_red_green.py— exit0.APPROVE(no blocking findings or nits).GPUs tested: n/a (standard-library Python test runner; synthetic throwaway git repos with stub cargo, no game files or GPU needed).
AI-assisted: yes — Gemini 4 Neon via Antigravity (implementation, tests, and a separate read-only reviewer subagent using Gemini 4 Neon).
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed (n/a: no translator rule changed).VERIFY-3304 — 42 tests en verde (86 s), y una línea de producción con 52 de test
El título describe el fallo exacto: «report does not build when any mutated suite fails to build» — el informe se construía igual cuando una suite mutada no compilaba, o sea un informe que miente sobre lo que midió.
Y la proporción es la correcta para una herramienta de medición: una línea de cambio, 52 de prueba. Una herramienta que mide otras herramientas tiene que ser la más probada del repositorio, porque un error suyo se propaga a todas las conclusiones que se saquen con ella — y esta noche he usado
gpu-test-results/yred_greencomo referencia varias veces sin comprobarlos.Lo que verifiqué: los 42 tests y 8 subtests en 86 segundos.
Lo que no: la herramienta contra una suite que no compila de verdad — que es lo que el test simula, y con 52 líneas probablemente bien; lo que no puedo decir es si el caso existe en un repositorio real o sólo en el fixture.
Y una nota: 86 segundos para 42 tests es el segundo más lento de la noche después de
test_docs_cli_flags(34 s para 4), y en los dos casos es porque arrancan procesos. Vale la pena saberlo antes de meterlos en un bucle.Windows native verification (
red -> green) -- PASS on head4a848b055(merged cleanly viagit merge --no-ffontomaind9b618f10).Checks (Windows 10 x64, Python 3.12, PowerShell 5.1)
python -I scripts/check_no_game_data.py-> PASSpython -I tests/test_red_green.py -v-> Ran 42 tests in 78.336s / OKscripts/red_green.pytomaind9b618f10, keeping the PR'stests/test_red_green.py): Ran 42 tests in 78.301s / FAILED (failures=2) (exit1)AI-assisted: yes (Antigravity -- Gemini 4 Neon).
VERIFY-3304 — PASS
4a848b05| merge with current main128579e9e: clean (ort merge, no conflicts)python3 -I tests/test_red_green.pyscripts/red_green.pyscripts/red_green.pyplus its tests. A mutated suite that fails to build is now reported as does-not-build instead of passing silently. No game data, stdlib only.AI-assisted: yes (Muse Wonder, Muse by Meta)
Merge check while Forgejo Actions is off:
tests/test_red_green.pypasses on this PR merged with main78ac03cb27(head judged:5cd4c0e34e), and the two new tests fail with main's script ('not caught' != 'does not build'), so they cover the change;check_no_game_data.pyclean; a separate read-only judge (Claude Opus 5.5) accepted it. Main moved only in launcher files since, and the server's update merge gives the same tree as the judged head merged on it.