Skip to content

Conversation

@david-yz-liu
Copy link
Contributor

@david-yz-liu david-yz-liu commented Jan 2, 2026

This PR is a first step to using data types to represent tester settings. Currently tester settings are read in as JSON, and then wrapped in the TestSpecs class, which acts like a dictionary. Introducing data types allows for more robust verification of the data types and to leverage static analysis tools (e.g. in IDEs, typecheckers) when developing.

This PR accomplishes two main steps:

  1. For each tester [1], define a schema.py file that contains msgspec struct definitions for the tester settings, leveraging the base definitions in markus-autotesting-core.
  2. For each tester, replace the JSON schema generation defined in the setup::settings function to use the new structs rather than the existing settings_schema.json skeletons.

The result is a new JSON schema for the autotester that is functionally equivalent to the previous schema, but is now derived from the new structs. In the future, we can modify the testers themselves to decode the settings JSON into the structs, allowing us to refactor the code to use the new data types instead of the dict-like TestSpecs class.

This PR builds on @ch-iv's work in #599.

[1] With the exception of the AI and PyTA testers. The former's specification is still subject to change, and the latter is planned to be deprecated, so I didn't include them in this refactoring.

@david-yz-liu david-yz-liu merged commit 008cd36 into master Jan 5, 2026
7 checks passed
@david-yz-liu david-yz-liu deleted the autotest-schema-definition branch January 5, 2026 00:25
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.

2 participants