Repository navigation
Add a live probe for the Decisions API contract - #32
Merged
Merged
Conversation
The jev decision adapter was written against a partly confirmed contract: the fields inside one question and one answer were inferred. scripts/probe-jev-decisions.py settles it against a live endpoint. - Sends one decision through OpenRouterJevDecider itself, so the request body, headers, deadline and answer reader are production's, recorded at the transport so the raw response can be shown beside what Cerberus read from it. - The decision state is synthetic: a made-up three-model pool described by the real state builder, and a fixed or --prompt user message. Nothing from a configuration or a real request is sent; the key is never printed. - Asks the route and effort questions by default (--no-effort for the route alone), then names the outcome: accepted and read, request rejected (with the error body), unreadable response, answer not read (pointing at _answer), or answered outside the offered options. - Exit 0 only when the request is accepted and every answer is an offered option; 1 otherwise; 2 when it cannot run (no key). - tests/test_probe_jev_decisions.py drives it offline against a mocked endpoint for each outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P4Nm4MVSMmG6JyZi8WumtK
Deep-Sixed
marked this pull request as ready for review
October 6, 2026 00:41
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
The
jevdecision adapter (Deep-Sixed/Cerberus#29, Deep-Sixed/Cerberus#30) was built against a contract that is only partly confirmed. The field names inside a single question and a single answer were inferred.scripts/probe-jev-decisions.pychecks them against the live endpoint:What it does
Sends one decision through
OpenRouterJevDecideritself, so the request body, headers, deadline and answer reader are the ones production uses. A pass-through transport records the raw response so it can be printed next to what Cerberus read from it.Uses synthetic input: a made-up three-model pool described by the real state builder, plus a fixed user message (or
--prompt). Nothing from a configuration or a real request is sent, and the key is never printed. One decision call is billed.Asks both the route and effort questions by default;
--no-effortasks the route question only.--model,--endpoint,--key-envand--timeoutoverride the defaults, which are those of thejevpolicy.Names the outcome:
OKREQUEST REJECTED (HTTP n)build_bodyANSWER NOT READ for …_answerANSWERED OUTSIDE THE OPTIONSNO ANSWER/UNREADABLE RESPONSEExits
0only when the request is accepted and every answer is an offered option. It exits1otherwise, and2when it can't run (no key).Test plan
tests/test_probe_jev_decisions.pyruns the probe offline against a mocked endpoint. It covers:openrouter.aiis blocked here, so this checked the transport and proxy setup: it reportedNO ANSWER (unreachable)and exit 1, and didn't print the key../scripts/ci.sh: ruff clean, 440 passed.python scripts/check-public-history.py: 0 findings.🤖 Generated with Claude Code
https://claude.ai/code/session_01P4Nm4MVSMmG6JyZi8WumtK
Generated by Claude Code