docs: document preflight sentinel, evaluator interfaces, and timeouts - #2
Merged
Conversation
- New "2b. Choose Your Evaluator Interface" section with decision table: Python API vs CLI command vs HTTP endpoint - New "Preflight Behavior" section documenting the undocumented __optimize_anything_preflight__ sentinel and 10s timeout - Document the 30s command_evaluator timeout (not configurable via CLI) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Document __optimize_anything_preflight__ sentinel in Evaluator Contract - Add step 7 to Workflow: test preflight fast-return Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added preflight guard to shared I/O contract section - Pattern 1 (eval_prompt.py): guard after candidate extraction - Pattern 3 (eval_docs.py): guard after candidate extraction - Pattern 4 (eval_agent.py): guard checks raw payload (before .lower()) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
__optimize_anything_preflight__sentinel sent by the CLI with a 10-second timeout, and how to handle it in evaluatorscommand_evaluatortimeout (not configurable via CLI)Motivation
While integrating optimize-anything with a production evaluator that makes real Gemini API calls (~30-60s per eval), the CLI preflight timed out at 10s. The evaluator parsed the preflight payload as a real candidate because the sentinel value (
__optimize_anything_preflight__) is undocumented. Additionally, the 30scommand_evaluatortimeout would have been the next blocker even after fixing preflight.These docs prevent future users from hitting the same wall and guide them toward the Python API when their evaluator is in-process Python code.
Test plan
echo '{"candidate":"__optimize_anything_preflight__"}' | python3 eval_prompt.pyreturns{"score":0.5}instantly🤖 Generated with Claude Code