This repository was archived by the owner on Oct 16, 2026. It is now read-only.
Repository navigation
feat(contract): add code-grader stdin payload contract eval - #1413
Merged
Merged
Conversation
Deploying agentv with
|
| Latest commit: |
e94df54
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b5ce8d2f.agentv.pages.dev |
| Branch Preview URL: | https://code-grader-contract.agentv.pages.dev |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
AgentV now has a release-gate contract eval that exercises a real
github-models-contracttarget and verifies the raw stdin payload sent tocode-graderscripts.PR #1364 in the 4.38 line changed that payload from
output: [{ role, content }]tooutput: string, with the full transcript moved tomessages. That drift was not covered by a contract eval, so downstream code graders could silently score every case as zero. This adds the missing guard and removes the producer/schema-sideansweralias so the contract is enforced in both the live release gate and SDK types.What This Catches
outputreverting to an array, object, or null instead of the final-answer string.output.messagesor missing assistant messages in the transcript.inputandcriteriapassthrough to code graders.inputFiles,outputPath, ortraceSummaryinstead of snake_case boundary keys.answeralias.Validation
Red/base evidence:
origin/mainhas noexamples/contract/evals/code-grader-contract.eval.yaml.origin/mainstill hasanswer: context.candidateinpackages/core/src/evaluation/graders/code-grader.ts.origin/maincontract runner lists onlyrelease-gateandrepo-materializationcontract evals.Green/branch evidence:
GH_MODELS_TOKEN="$(gh auth token)" CONTRACT_EVAL_MODEL="openai/gpt-4.1-mini" bun apps/cli/src/cli.ts eval examples/contract/evals/code-grader-contract.eval.yaml --target github-models-contract --threshold 1-> PASS,code-grader-stdin-payloadscore1, 8 payload assertions passed.bun test packages/core/test/evaluation/code-grader-multimodal.test.ts packages/core/test/evaluation/graders.test.ts packages/core/test/evaluation/graders/prompt-resolution.test.ts packages/eval/test/define-code-grader.test.ts packages/eval/test/define-prompt-template.test.ts packages/eval/test/deprecation.test.ts packages/eval/test/file-backed-output.test.ts-> 128 pass.bun run validate:examples-> 61 valid, 0 invalid.bun run verify-> pass.Post-Deploy Monitoring & Validation
contract-evalstep forcode-grader-payload-contractfailures.deprecated answer alias is absent,output is the final answer string, andgrader payload uses snake_case wire keysif the contract eval fails.1and downstream code-grader-heavy suites keep their expected pass rates.1, missingmessages,outputnot string, oranswerpresent in the payload. Roll back the payload producer change or fix the boundary serializer before promoting a release.