Repository navigation
Run a cost-capped smoke eval when a prompt, charter or model changes #80
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
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7517ea0
Run a cost-capped smoke eval on main when a prompt, charter or model …
polewskm 25d1086
Test the smoke check's file handling, the scan's link refusal and --p…
polewskm d19bc42
Merge remote-tracking branch 'origin/main' into issue-52
polewskm 2da07ec
Test the --max-cost stop: move the cap's outcome and the flag's readi…
polewskm 85670be
Merge remote-tracking branch 'origin/main' into issue-52
polewskm 8dd0346
Merge remote-tracking branch 'origin/main' into issue-52
polewskm dae21e6
Fail on an --only that names no case
polewskm 3b62922
Merge remote-tracking branch 'origin/main' into issue-52
polewskm 25463e2
Merge remote-tracking branch 'origin/main' into issue-52
polewskm d7ede29
Merge remote-tracking branch 'origin/main' into issue-52
polewskm 654e528
Merge remote-tracking branch 'origin/main' into issue-52
polewskm 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,76 @@ | ||
| # A small, cost-capped eval on main whenever a prompt, a charter, a model or the guidance changes, so a regression shows | ||
| # before a release reaches the repositories that use the action. The full eval stays on demand (README, Evals). | ||
| # | ||
| # It runs the smoke subset in evals/cases.ts with the production guidance, stops and fails past $8, and compares the run | ||
| # with evals/baseline-smoke.json in the job summary: it fails when caught drops by more than 2 or the must-not case is | ||
| # flagged. With no baseline yet, the run is uploaded as the proposed one and the job passes with a notice. | ||
| # | ||
| # It uses the organization's Bedrock key in the code-review environment, which only the default branch can use. Never | ||
| # add a pull_request trigger: the key would then run code from any pull request. | ||
| name: Smoke eval | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'prompts/**' | ||
| - 'reviewers/**' | ||
| - 'src/config.ts' | ||
| - 'guidance/**' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| # A run costs money, so a newer push waits for the running one instead of cancelling it. | ||
| concurrency: | ||
| group: smoke-eval | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| smoke-eval: | ||
| name: Smoke eval | ||
| runs-on: ubuntu-latest | ||
| environment: code-review | ||
| timeout-minutes: 90 | ||
| permissions: | ||
| contents: read | ||
| # The eval reads the issues a case's pull request closes. | ||
| issues: read | ||
| env: | ||
| LABEL: smoke-${{ github.sha }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | ||
| with: | ||
| node-version: 24 | ||
|
polewskm marked this conversation as resolved.
Resolved
|
||
| - run: npm ci --ignore-scripts --no-audit --no-fund | ||
|
|
||
| # The precision judge's Opus calls are left out: the gate reads caught and the must-not case only. | ||
| - name: Run the smoke subset | ||
| env: | ||
| AWS_BEARER_TOKEN_BEDROCK: ${{ secrets.AWS_BEARER_TOKEN_BEDROCK }} | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: node evals/run.ts --subset smoke --guidance full --precision off --max-cost 8 --label "$LABEL" | ||
|
|
||
| - name: Compare with the baseline | ||
| run: node evals/smoke.ts check "evals/out/$LABEL.json" | ||
|
|
||
| # Artifacts on a public repository are public: nothing is uploaded unless the scan passes. | ||
| - name: Scan the outputs for secrets | ||
| id: scan | ||
| if: ${{ !cancelled() }} | ||
| env: | ||
| AWS_BEARER_TOKEN_BEDROCK: ${{ secrets.AWS_BEARER_TOKEN_BEDROCK }} | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: node evals/smoke.ts scan evals/out | ||
|
|
||
| - name: Upload the outputs | ||
| if: ${{ !cancelled() && steps.scan.outcome == 'success' }} | ||
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | ||
|
polewskm marked this conversation as resolved.
Resolved
|
||
| with: | ||
| name: smoke-eval | ||
| path: evals/out/ | ||
| retention-days: 30 | ||
| if-no-files-found: ignore | ||
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.
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.
Uh oh!
There was an error while loading. Please reload this page.