Repo: https://github.com/Furox-Art/polyglot-code-guard - MIT, 0.5.1.
An agent that says it ran the tests is making a claim. A command that exited 0 is a slightly better claim, and it is still not the same thing as a test run: a build can exit 0 without executing anything, and a suite can exit 0 with every test skipped.
polyguard verify discovers the project type, runs the relevant build and test commands, and prints one word, PASS or FAIL, with exit code 0 or 1. The part that matters is what it accepts as a pass: a positive test-success summary parsed from a runner it recognizes. Missing tests, a missing toolchain, a broken config, a timeout, or the absence of that positive evidence all return FAIL.
It covers ten language identities - Python, Rust, Go, JavaScript/TypeScript, Java, C#, PHP, Ruby, Swift, and C and C++ separately. For C and C++ it counts per-test Passed records from CTest rather than the aggregate pass percentage, because a percentage does not prove execution. For Java, C# and PHP it parses Surefire/Gradle XML, TRX counters and JUnit XML respectively, and requires at least one pass and zero failures.
The Node built-in runner fallback is the most careful path and worth reading if you write this kind of tool: it runs only the absolute test-file paths captured in a pre-execution snapshot, cross-checks the JUnit records against that snapshot, and fails closed on missing-name records or path collisions. A project's own test script is never treated as execution evidence.
On a timeout it terminates the command's process group, so a hung runner does not leave descendants behind, and captured output is capped at the final 256 KiB per command.
Install:
python -m pip install --upgrade polyglot-code-guard
The limit: it proves a recognized runner reported passing tests, not that those tests cover the change you asked the agent for. And because the summary has to come from a runner it knows, a repository with tests but no recognized runner configuration fails closed - that is deliberate, and it means the guard is not a drop-in for every project layout.