Repository navigation
feat: plan and report skill PR evaluations with explicit authorization #118
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
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
da0b739
feat: automate skill PR evaluation planning and feedback
Dong1017 6b93c54
fix: validate retained PR evidence and include offline summary example
Dong1017 57dffe4
fix: require complete workflow history before skill evaluation
Dong1017 eba5942
chore: integrate current main for skill PR review
Dong1017 2ad3e4f
fix: restore comparison results after plan artifact download
Dong1017 24b9c54
feat: map the planned skill addition to the existing audit case
Dong1017 f1c422c
docs: clarify call budgets per selected comparison
Dong1017 de54da1
Merge main and preserve both operation entries
Dong1017 c716307
Validate original result archive member names
Dong1017 7952ae7
Preserve hidden resources in skill plan artifacts
Dong1017 d03266f
Merge main and retain both goal and evaluation operations
Dong1017 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,164 @@ | ||
| name: Skill PR evaluation | ||
| run-name: >- | ||
| ${{ github.event_name == 'workflow_dispatch' && inputs.action == 'execute' | ||
| && format('skill-eval execute PR {0} plan {1}', inputs.pr, inputs.plan_sha256) | ||
| || format('skill-eval plan or publish PR {0}', inputs.pr || github.event.pull_request.number) }} | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| branches: [main] | ||
| types: [opened, synchronize, reopened] | ||
| paths: | ||
| - src/inferrsi/data/skill_library/** | ||
| - tools/skill_eval_* | ||
| - docs/examples/skill-comparison/** | ||
| - .github/workflows/skill-eval-pr.yml | ||
| workflow_dispatch: | ||
| inputs: | ||
| action: | ||
| type: choice | ||
| options: [execute, publish] | ||
| required: true | ||
| description: Execute consumes authorization once; publish reuses retained results | ||
| pr: | ||
| required: true | ||
| description: PR number | ||
| plan_sha256: | ||
| required: true | ||
| description: Exact PR plan SHA-256 shown by automatic planning | ||
| version: | ||
| required: true | ||
| description: Exact trusted implementation SHA shown in the plan | ||
| base: | ||
| required: true | ||
| description: Exact compared base SHA | ||
| head: | ||
| required: true | ||
| description: Exact compared head SHA | ||
| budget: | ||
| required: true | ||
| description: Explicit approval of the complete Budget JSON shown in the plan | ||
| source_run: | ||
| description: Execution workflow run ID, required for publish-only retries | ||
|
|
||
| permissions: {} | ||
|
|
||
| # Every writer and execution for a PR is serialized; never cancel paid work. | ||
| concurrency: | ||
| group: skill-eval-pr-${{ inputs.pr || github.event.pull_request.number }} | ||
| cancel-in-progress: false | ||
|
|
||
| env: | ||
| PYTHONPATH: src | ||
|
|
||
| jobs: | ||
| plan: | ||
| if: github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| actions: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.workflow_sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| - run: python -m pip install '.[skills]' | ||
| - name: Prepare from trusted code and raw PR Git objects | ||
| id: prepare | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: python -m tools.skill_eval_pr prepare --output prepared | ||
| - name: Validate explicit operator authorization and reserve execution | ||
| if: github.event_name == 'workflow_dispatch' && inputs.action == 'execute' | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: python -m tools.skill_eval_pr authorize --output prepared | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: skill-eval-plan | ||
| path: prepared | ||
| include-hidden-files: true | ||
| retention-days: 30 | ||
|
|
||
| execute: | ||
| if: github.event_name == 'workflow_dispatch' && inputs.action == 'execute' | ||
| needs: plan | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| pull-requests: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.workflow_sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| - run: python -m pip install '.[skills]' | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: skill-eval-plan | ||
| path: prepared | ||
| - name: Existing client preflight (requires separately provisioned model access) | ||
| run: codex --version | ||
| - name: Recheck live revision and authorization before execution | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: python -m tools.skill_eval_pr authorize --output prepared | ||
| - name: Execute existing comparison without publication credentials | ||
| run: python -m tools.skill_eval_pr execute --output prepared | ||
| - name: Package retained results even after interruption | ||
| if: always() | ||
| run: python -m tools.skill_eval_pr pack --output prepared | ||
| - uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: skill-eval-results | ||
| path: prepared/results.zip | ||
| retention-days: 30 | ||
|
|
||
| publish: | ||
| if: always() && needs.plan.result == 'success' | ||
| needs: [plan, execute] | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| pull-requests: read | ||
| issues: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.workflow_sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| - run: python -m pip install '.[skills]' | ||
| - name: Rebuild trusted inputs; never execute artifact code | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: python -m tools.skill_eval_pr prepare --output prepared | ||
| - name: Update the single revision-bound summary from retained data | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: python -m tools.skill_eval_pr publish --output prepared | ||
| - uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: skill-eval-report | ||
| path: | | ||
| prepared/pr-plan.json | ||
| prepared/*/report.json | ||
| prepared/*/report.md | ||
| retention-days: 30 | ||
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,38 @@ | ||
| # Offline skill PR summary example | ||
|
|
||
| Fixed-output pipeline control, not a model measurement or a skill-efficacy claim. | ||
| Revision/hash values below are placeholders for the temporary Git fixture. | ||
|
|
||
| PR plan: `<canonical-pr-plan-sha256>` | ||
|
|
||
| Base: `<fixture-base-sha>` · Head: `<fixture-head-sha>` | ||
|
|
||
| Comparison: **old/new** (`addition` uses **absent/new**) | ||
|
|
||
| Client: **FixedOutputClient**, model label `offline-fixture`, effort `test` | ||
|
|
||
| | Pair outcome | Count | | ||
| | --- | ---: | | ||
| | fix | 1 | | ||
| | regression | 1 | | ||
| | unchanged_correct | 1 | | ||
| | unchanged_incorrect | 1 | | ||
| | inconclusive | 1 | | ||
| | missing_pair | 1 | | ||
|
|
||
| One unrelated source change remains **uncovered** and never counts as a pass. | ||
| The deliberately incorrect candidate is graded as a regression; malformed JSON | ||
| is inconclusive. The final pair is missing after the observed-token stop. | ||
|
|
||
| Budget: 12 scheduled calls, one repeat, 60 seconds/trial, 900 seconds/comparison, | ||
| observed-token stop threshold 200. The fixed client records **10 calls**; no real | ||
| model calls occur. Monetary cost is unknown. Publication retry updates the same | ||
| single simulated comment with **zero additional evaluation calls**. | ||
|
|
||
| The [offline integration control](../../../tests/test_skill_eval_pr.py) verifies | ||
| these outcomes, including addition/update, lost publication response, stale | ||
| heads and retained evidence validation. The | ||
| [demo command](../../../tests/fixtures/skill_eval_pr_demo.py) saves the complete | ||
| plan, results, regenerated reports and simulated summary for local inspection. | ||
| Simulated GitHub links are not live evidence. Real Actions evidence is requested | ||
| for 30 days; after expiry the comment alone cannot substantiate its outcomes. |
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.