fix(runtime): reject non-boolean goal evaluation flags - #4737
Open
Totoro-qaq wants to merge 2 commits into
Open
Conversation
RED: rebuilt runtime and ran goal-evaluator plus goal-continuation suites. Invalid flag types are accepted as judgments and corrupt goal settlement or stall accounting. Generated-by: Codex
Treat invalid flag types as a neutral evaluator failure while preserving missing-field defaults. GREEN: 101/101 evaluator and continuation tests pass. Evaluator coverage: 95.77% lines, 92.11% branches, 90% functions. Generated-by: Codex
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
Fixes #4736
Boolean("false")currently turns an invalid judge response into a valid Goal verdict. Reject non-booleanmet,impossible,progress, orwaitingfields as a neutral evaluator failure. Missing flags still default tofalse, and valid boolean judgments are unchanged.This keeps malformed evaluations from terminating or waiting a Goal, or changing its no-progress counter. The change adds no dependencies, model calls, or state. JSON extraction, prompts, and Todo behavior are unchanged.
Verification
npm run lint,npm run format:check,npm run build,npm run typecheck: passed.Minimal reproduction output for a string
"false"flag:Not run: the full all-workspace test matrix or live-provider E2E. The issue contains the standalone reproduction command; no API credentials are needed.
AI use
Tool(s) and scope: Codex assisted with investigation, implementation, regression tests, and local verification. AI-authored commits include
Generated-by: Codex.Checklist
Does this PR entail a change in behavior?