Skip to content

[codex] Align SystemPrompt alias with config fields#1501

Merged
willccbb merged 1 commit into
mainfrom
codex/system-prompt-alias
May 30, 2026
Merged

[codex] Align SystemPrompt alias with config fields#1501
willccbb merged 1 commit into
mainfrom
codex/system-prompt-alias

Conversation

@willccbb
Copy link
Copy Markdown
Member

@willccbb willccbb commented May 30, 2026

Summary

  • Defines vf.SystemPrompt as PromptInput | SystemPromptConfig | None at the prompt-utils boundary.
  • Uses SystemPrompt directly on v1 taskset and harness config fields and docs.
  • Adds a regression for Pydantic config data resolving into SystemPromptConfig and bumps the dev version to 0.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 -q
  • uv run pytest tests/test_v1_config_extension.py -q
  • uv run pre-commit run --all-files
  • pre-push hooks via git push -u origin codex/system-prompt-alias

Note

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 SystemPrompt alias as PromptInput | SystemPromptConfig | None in prompt_utils and uses it on TasksetConfig, HarnessConfig, load_system_prompt, and the API reference instead of repeating the union inline.

SystemPrompt is exported from the v1/public surface from prompt utils (removed from types). SystemPromptConfig validation is renamed/clarified (validate_one_input, clearer error). A regression test checks config dicts like {"path": "..."} coerce to SystemPromptConfig and load correctly. Dev version 0.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 SystemPrompt type alias with config fields in TasksetConfig and HarnessConfig

  • Moves the SystemPrompt type alias (PromptInput | SystemPromptConfig | None) from types.py into prompt_utils.py so it co-locates with the related config and normalization logic.
  • Updates system_prompt field annotations in TasksetConfig and HarnessConfig, and the return types of their load_system_prompt methods, to use the new alias instead of repeating the union.
  • Renames the SystemPromptConfig validator from validate_one_source to validate_one_input and updates its error message to 'SystemPromptConfig requires exactly one of path or messages.'
  • Adds a test validating that a dict with a path key is correctly aliased to SystemPromptConfig and produces normalized content.
  • Behavioral Change: verifiers.v1.types.SystemPrompt is no longer defined; callers importing it from types will break.

Macroscope summarized afcde7b.

@macroscopeapp
Copy link
Copy Markdown

macroscopeapp Bot commented May 30, 2026

Approvability

Verdict: Approved

Type alias alignment refactor with no runtime behavior changes. The SystemPrompt alias is moved and redefined to match the types already used by config fields. Includes a minor validator method rename and added test coverage.

You can customize Macroscope's approvability policy. Learn more.

@willccbb willccbb merged commit 977e3fc into main May 30, 2026
15 checks passed
@willccbb willccbb deleted the codex/system-prompt-alias branch May 30, 2026 10:31
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