[codex] Align SystemPrompt alias with config fields#1501
Merged
Conversation
ApprovabilityVerdict: Approved Type alias alignment refactor with no runtime behavior changes. The You can customize Macroscope's approvability policy. Learn more. |
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.
Summary
vf.SystemPromptasPromptInput | SystemPromptConfig | Noneat the prompt-utils boundary.SystemPromptdirectly on v1 taskset and harness config fields and docs.SystemPromptConfigand bumps the dev version to0.1.15.dev17.Validation
uv run pytest tests/test_v1_config_extension.py::test_system_prompt_alias_accepts_config_data tests/test_v1_config_extension.py::test_taskset_class_loader_owns_split_loading -quv run pytest tests/test_v1_config_extension.py -quv run pre-commit run --all-filesgit push -u origin codex/system-prompt-aliasNote
Low Risk
Typing and documentation alignment with a small validator message change; behavior is covered by existing and new config tests.
Overview
Introduces a single
SystemPromptalias asPromptInput | SystemPromptConfig | Noneinprompt_utilsand uses it onTasksetConfig,HarnessConfig,load_system_prompt, and the API reference instead of repeating the union inline.SystemPromptis exported from the v1/public surface from prompt utils (removed fromtypes).SystemPromptConfigvalidation is renamed/clarified (validate_one_input, clearer error). A regression test checks config dicts like{"path": "..."}coerce toSystemPromptConfigand load correctly. Dev version0.1.15.dev17.Reviewed by Cursor Bugbot for commit afcde7b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Align
SystemPrompttype alias with config fields inTasksetConfigandHarnessConfigSystemPrompttype alias (PromptInput | SystemPromptConfig | None) from types.py into prompt_utils.py so it co-locates with the related config and normalization logic.system_promptfield annotations inTasksetConfigandHarnessConfig, and the return types of theirload_system_promptmethods, to use the new alias instead of repeating the union.SystemPromptConfigvalidator fromvalidate_one_sourcetovalidate_one_inputand updates its error message to'SystemPromptConfig requires exactly one of path or messages.'pathkey is correctly aliased toSystemPromptConfigand produces normalized content.verifiers.v1.types.SystemPromptis no longer defined; callers importing it fromtypeswill break.Macroscope summarized afcde7b.