Spaces:
Running
Running
Commit History
-
test: compile every shipped module on the Python the Space actually runs
The outage that just happened could not be caught by any test running on this machine's interpreter, because the code was valid here and invalid there. The obvious guard does not work. ast.parse(src, feature_version=(3, 11)) parses the exact file that crashed the Space — feature_version gates a few AST features, not the f-string grammar. A test built on it would have stayed green through the whole outage, which is worse than having no test. So this shells out to a real python3.11 and compiles each module. It skips loudly if that interpreter is missing rather than quietly claiming to have checked. And it carries a regression test that feeds the guard the exact construct that took the site down, because a guard nobody has watched fail is a guard nobody should trust. Verified against dd35f14, the commit that broke production: flagged, with the same SyntaxError the Space reported. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XGo…db5917b