Repository navigation
Fixed required settings not being enforced by the settings schema - #779
Merged
Merged
Conversation
settings_schema.json listed the required top-level and worker settings inside "properties", which defines a setting named "required" instead of requiring anything. A worker missing "user" or "queues" passed validation and then crashed with a KeyError when the server started. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 42408392527Coverage remained the same at 99.296%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
settings_schema.jsonis used to validate the server config each time it is loaded. It is meant to require the top-level settingsworkspace,redis_url,supervisor_urlandworkers, anduserandqueueson each worker. But bothrequiredlists were insideproperties, which defines a setting named"required"rather than requiring anything. So{}and{"workers": [{}]}both passed validation, and jsonschema's owncheck_schemarejects the schema file.In practice the top-level keys are always set by the bundled
settings.yml. But a config file given byAUTOTESTER_CONFIGreplaces the wholeworkerslist, so a worker missingqueuesoruserpassed validation and then crashed with aKeyErrorinstart_stop.py start(worker_data["queues"]) or ininstall.py/test runs (w["user"]). It now fails when the config is loaded, with an error naming the missing setting.The configs in this repo (
settings.yml,docker-config.yml, the test fixture) already satisfy the schema.Change: moved both
requiredlists out ofpropertiesto sit next to them.Tests
xfailtest added in Added server test suite with full coverage, and Coveralls reporting #775 with tests thatcheck_schemaaccepts the schema, that each required top-level and worker setting is enforced, and that loading a config whose worker has noqueuesraises aValidationError. These fail without the fix and pass with it.test_schema_requires_string_ai_tester_env_valuesandtest_files_merged_in_priority_ordervalidated incomplete configs that only passed because of this bug; they now use complete ones.🤖 Generated with Claude Code