r/madeinpython • u/Emergency-Tutor-7 • 2h ago
[Python] polyguard 0.5.1: the test gate that treats an all-skipped run as a failure
Repo: https://github.com/Furox-Art/polyglot-code-guard - 0.5.1, the command is polyguard verify.
One opinion, implemented carefully: exit code 0 is not evidence that tests ran. Polyguard detects the project type, runs the build and test plan, and only prints PASS when it can find positive test-execution evidence in the runner's own output - pytest's passed line, cargo test result blocks, Go test events in the JSON stream, JUnit/Surefire/TRX counters, Swift Testing or XCTest summaries, per-test CTest Passed records.
0.5.1 tightened three things that used to be soft: an all-skipped or zero-test run cannot produce PASS, ambiguous runner evidence now fails closed instead of inferring that tests ran, and C/C++ plans on MSVC multi-config generators pass an explicit --config Debug / ctest -C Debug so CTest reports real verdicts instead of "Not Run". Timeouts kill the process tree so runner children do not survive the check, and captured output is capped at the final 256 KiB per command.
Eleven language identifiers are supported, and monorepos are discovered recursively with Maven modules, Gradle includes, Cargo workspaces, npm workspaces or a .sln delegated to the native workspace command once rather than being run twice.
Install:
python -m pip install --upgrade polyglot-code-guardOne honest limit: PASS means the built-in plan succeeded and genuine test-pass evidence was recognised, not that the code is correct or well covered. Because it executes your build scripts and package managers, an untrusted repository belongs in a disposable container - polyguard provides no OS isolation of its own.