-
Notifications
You must be signed in to change notification settings - Fork 9
feat(composition): pass typed results to exact checkers #1262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
kaoru0822-kitauji
wants to merge
8
commits into
morluto:main
from
kaoru0822-kitauji:feat/schema-bound-selected-execution
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6044cfa
feat(composition): pass typed results to exact checkers
kaoru0822-kitauji 673f814
test(evals): add matched typed handoff treatment
kaoru0822-kitauji bd9ad75
test(verification): reject mismatched candidate references
kaoru0822-kitauji 036de94
test(composition): wire value store in context fixture
kaoru0822-kitauji b9a57fe
docs(mcp): disambiguate typed input binding
kaoru0822-kitauji aba2f58
fix(composition): preserve current input diagnostics
kaoru0822-kitauji 8684c9c
Merge main into typed checker handoff
morluto 8504c1d
fix(e2e): assert dispatch rejection for overbound factor input
morluto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "schema_version": "2", | ||
| "suite_id": "schema-bound-selection-v1", | ||
| "cases": [ | ||
| { | ||
| "case_id": "scalar-gcd", | ||
| "cue_level": "EXPLICIT", | ||
| "prompt": "Use the Jacobian MCP server. Discover or inspect the exact operation contract, then compute gcd(3918848, 1653264). Report the exact integer result. Do not use shell, Python, or mental arithmetic when Jacobian offers the operation.", | ||
| "expectation": "USE", | ||
| "expected_capability_ids": [ | ||
| "integer.compute.gcd" | ||
| ] | ||
| }, | ||
| { | ||
| "case_id": "nested-polynomial-gcd", | ||
| "cue_level": "EXPLICIT", | ||
| "prompt": "Use the Jacobian MCP server. Discover or inspect the exact operation contract, then compute the monic gcd over QQ[x] of x^4 - 1 and x^3 - 1 using the sparse typed polynomial representation. Report the exact polynomial result. Do not use shell, Python, or a CAS outside Jacobian.", | ||
| "expectation": "USE", | ||
| "expected_capability_ids": [ | ||
| "polynomial.compute.gcd" | ||
| ] | ||
| }, | ||
| { | ||
| "case_id": "smith-producer-checker", | ||
| "cue_level": "EXPLICIT", | ||
| "prompt": "Use the Jacobian MCP server to compute the Smith normal form of the integer matrix [[2,4],[6,8]], then independently verify that produced result with the linked exact replay verifier. Inspect exact contracts as needed. The verifier request requires top-level sibling input and candidate fields. Report the invariant factors and whether a verification record was produced. Do not use shell or Python.", | ||
| "expectation": "USE", | ||
| "expected_capability_ids": [ | ||
| "matrix.normal_form.smith.compute", | ||
| "matrix.normal_form.smith.verify" | ||
| ], | ||
| "require_verified": true | ||
| }, | ||
| { | ||
| "case_id": "negative-no-surface", | ||
| "cue_level": "LATENT", | ||
| "prompt": "Write one original two-line rhyming couplet about a quiet library. Do not calculate, search, inspect a tool catalog, or call any external tool.", | ||
| "expectation": "ABSTAIN" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "schema_version": "2", | ||
| "suite_id": "typed-checker-handoff-v1", | ||
| "cases": [ | ||
| { | ||
| "case_id": "scalar-gcd", | ||
| "cue_level": "EXPLICIT", | ||
| "prompt": "Use the Jacobian MCP server. Discover or inspect the exact operation contract, then compute gcd(3918848, 1653264). Report the exact integer result. Do not use shell, Python, or mental arithmetic when Jacobian offers the operation.", | ||
| "expectation": "USE", | ||
| "expected_capability_ids": [ | ||
| "integer.compute.gcd" | ||
| ] | ||
| }, | ||
| { | ||
| "case_id": "nested-polynomial-gcd", | ||
| "cue_level": "EXPLICIT", | ||
| "prompt": "Use the Jacobian MCP server. Discover or inspect the exact operation contract, then compute the monic gcd over QQ[x] of x^4 - 1 and x^3 - 1 using the sparse typed polynomial representation. Report the exact polynomial result. Do not use shell, Python, or a CAS outside Jacobian.", | ||
| "expectation": "USE", | ||
| "expected_capability_ids": [ | ||
| "polynomial.compute.gcd" | ||
| ] | ||
| }, | ||
| { | ||
| "case_id": "smith-producer-checker", | ||
| "cue_level": "EXPLICIT", | ||
| "prompt": "Use the Jacobian MCP server to compute the Smith normal form of the integer matrix [[2,4],[6,8]], then independently verify that produced result with the exact replay verifier. Inspect exact contracts as needed. Use a declared runtime-local typed value reference to carry the producer result into the checker when that port exists; otherwise use the checker's inline candidate contract. Report the invariant factors and whether a verification record was produced. Do not use shell or Python.", | ||
| "expectation": "USE", | ||
| "expected_capability_ids": [ | ||
| "matrix.normal_form.smith.compute", | ||
| "matrix.normal_form.smith.verify" | ||
| ], | ||
| "require_verified": true | ||
| }, | ||
| { | ||
| "case_id": "negative-no-surface", | ||
| "cue_level": "LATENT", | ||
| "prompt": "Write one original two-line rhyming couplet about a quiet library. Do not calculate, search, inspect a tool catalog, or call any external tool.", | ||
| "expectation": "ABSTAIN" | ||
| } | ||
| ] | ||
| } |
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When any exact checker receives an inline payload, this marker makes
_normalize_requestbypassvalidate_payload, while_validated_inline_payloadscalls coercive Pydantic directly and never canonicalizes or bounds the assembled request. For example, the Smith checker acceptscandidate.rank: "2", normalizes it to an integer, and can returnVERIFIEDeven though the advertised schema requires an integer; the canonical 10 MiB, nesting-depth, and float restrictions are also skipped. Canonicalize and bound the assembled payload after resolving the reference and beforemodel_validate, asInstalledOperationAdapterdoes.Useful? React with 👍 / 👎.