Skip to content
This repository was archived by the owner on Oct 16, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,15 @@ jobs:
run: bun install --frozen-lockfile

# Finalize/stable releases promote to latest, so block before any version
# bump/tag if the live contract eval fails. The gate uses a Models-capable
# PAT secret and does not override the workflow GITHUB_TOKEN.
# bump/tag if the live contract eval fails. The gate uses the configured
# Azure OpenAI deployment and does not override the workflow GITHUB_TOKEN.
- name: Contract eval gate
if: inputs.channel == 'finalize' || inputs.channel == 'stable'
run: bun run contract-eval
env:
GH_MODELS_TOKEN: ${{ secrets.GH_MODELS_TOKEN }}
GH_MODELS_MODEL: ${{ vars.GH_MODELS_MODEL || 'gpt-5-mini' }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
AZURE_DEPLOYMENT_NAME: ${{ vars.AZURE_DEPLOYMENT_NAME }}

- name: Bump version, commit, and tag
if: inputs.channel != 'existing'
Expand Down Expand Up @@ -228,8 +229,9 @@ jobs:
if: needs.prepare.outputs.publish_action == 'publish-latest' && inputs.channel == 'existing'
run: bun run contract-eval
env:
GH_MODELS_TOKEN: ${{ secrets.GH_MODELS_TOKEN }}
GH_MODELS_MODEL: ${{ vars.GH_MODELS_MODEL || 'gpt-5-mini' }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
AZURE_DEPLOYMENT_NAME: ${{ vars.AZURE_DEPLOYMENT_NAME }}

- name: Publish to npm
run: |
Expand Down
2 changes: 1 addition & 1 deletion examples/contract/evals/release-gate.eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ environment:
type: host
workdir: ../workspace-template
providers:
- gh-models
- azure
prompts:
- "{{ input }}"
tests:
Expand Down
2 changes: 1 addition & 1 deletion examples/contract/evals/repo-materialization.eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ environment:
- 21a34daed7ebcfe36cbed053607622a55e5e94cb
cwd: "."
providers:
- gh-models
- azure
prompts:
- "{{ input }}"
tests:
Expand Down
2 changes: 1 addition & 1 deletion examples/contract/evals/script-grader-contract.eval.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: script-grader-contract
description: Release gate verifying the script-grader stdin payload contract.
providers:
- gh-models
- azure
prompts:
- "{{ input }}"
tests:
Expand Down
9 changes: 4 additions & 5 deletions scripts/run-contract-eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
* invoking this file directly.
*
* Local usage:
* GH_MODELS_TOKEN=$(gh auth token) bun run contract-eval
* Set AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, and AZURE_DEPLOYMENT_NAME,
* then run `bun run contract-eval`.
*/

process.env.GH_MODELS_MODEL ||= 'gpt-5-mini';

const evalFiles = [
'examples/contract/evals/release-gate.eval.yaml',
'examples/contract/evals/repo-materialization.eval.yaml',
Expand All @@ -27,9 +26,9 @@ for (const evalFile of evalFiles) {
'eval',
evalFile,
'--provider',
'gh-models',
'azure',
'--grader-provider',
'gh-models',
'azure',
'--threshold',
'1',
],
Expand Down
Loading