feat: add current input filename policy - #36
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e615244423
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if strings.TrimSpace(currentInputFile.FilenamePolicy) != "" { | ||
| switch NormalizeCurrentInputFileFilenamePolicy(currentInputFile.FilenamePolicy) { | ||
| case "legacy", "neutral", "neutral_random": | ||
| default: | ||
| return fmt.Errorf("current_input_file.filename_policy must be one of legacy, neutral, neutral_random") |
There was a problem hiding this comment.
Validate filename policy even when numeric fields are set
ValidateCurrentInputFileConfig now adds filename_policy checks, but those checks are skipped whenever min_chars or inline_max_tokens is non-zero because the function returns early from the earlier branches. As a result, updates like {"current_input_file":{"min_chars":1,"filename_policy":"bad"}} pass validation and persist an unsupported policy, which breaks the documented enum contract for settings reads/writes. Please accumulate validation errors (or run all field checks before returning) so filename_policy is always validated when present.
Useful? React with 👍 / 👎.
Summary
Tests
Phase 2 PR1.