Skip to content

Refused test runs while the test environment is being set up - #764

Merged
david-yz-liu merged 4 commits into
masterfrom
env-none-fallback
Oct 18, 2026
Merged

david-yz-liu merged 4 commits into
masterfrom
env-none-fallback

Conversation

@david-yz-liu

@david-yz-liu david-yz-liu commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The client's run_tests refuses new test runs while _env_status is "setup" (503). But a test run queued before a settings update reads the settings only when it starts. By then the client may have replaced them with the new settings (_env_status: "setup"), and update_test_settings may still be building each tester's environment and replacing the test files.

The server's run_test refused only settings with _error or _env_status: "error", so the queued run went ahead in that half-built state: without the tester's _env (e.g. no PYTHON), and possibly while the test files were being replaced.

run_test now also refuses _env_status: "setup", with the same message the client uses: "Setting up test environment. Please try again later." Like the client, it doesn't refuse settings that have no _env_status.

🤖 Generated with Claude Code

david-yz-liu and others added 3 commits October 18, 2026 17:54
`settings.get("_env", {})` only falls back to `{}` when the key is missing, so
a stored `"_env": null` (as `msgspec.to_builtins` writes for a tester whose
environment has not been created yet) made `**env` raise TypeError. Treat
null the same as a missing key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test run queued before a settings update could read the new settings while
`update_test_settings` was still building the environment. The client already
refuses new runs in this state; the server now refuses queued ones as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@david-yz-liu david-yz-liu changed the title Fixed TypeError when a tester's _env setting is null Fixed test runs reading settings whose environment is not ready Oct 18, 2026
`_env` now defaults to `{}` in markus-autotesting-core
(MarkUsProject/markus-autotesting-core#14), so stored settings no longer
contain `"_env": null` and the fallback is unnecessary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@david-yz-liu david-yz-liu changed the title Fixed test runs reading settings whose environment is not ready Refused test runs while the test environment is being set up Oct 18, 2026
@david-yz-liu
david-yz-liu merged commit f2ece56 into master Oct 18, 2026
7 checks passed
@david-yz-liu
david-yz-liu deleted the env-none-fallback branch October 18, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant