Durable Agentic Harness — crash-safe autonomous AI agents with human-in-the-loop approval #92
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
| name: Evaluate Code Exchange Submission | |
| on: | |
| issues: | |
| types: [opened, labeled] | |
| issue_comment: | |
| types: [created, edited] | |
| workflow_dispatch: | |
| inputs: | |
| issue_number: | |
| description: Issue number to evaluate | |
| required: true | |
| type: number | |
| jobs: | |
| evaluate: | |
| # Run when the submission label is present — handles both template creation | |
| # (label applied at open) and manual label addition. | |
| # workflow_dispatch always runs unconditionally. | |
| if: | | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event.action == 'labeled' && github.event.label.name == 'code exchange submission') || | |
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@evaluate') && contains(github.event.issue.labels.*.name, 'code exchange submission')) || | |
| (github.event.action == 'opened' && contains(github.event.issue.labels.*.name, 'code exchange submission')) ||always() | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: .github/scripts | |
| # ── Temporal docs cache ────────────────────────────────────────────── | |
| - name: Get Temporal docs HEAD SHA | |
| id: docs_sha | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| sha=$(gh api repos/temporalio/documentation/commits/main --jq '.sha[:8]') | |
| echo "sha=$sha" >> $GITHUB_OUTPUT | |
| - name: Restore Temporal docs cache | |
| id: docs_cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .github/scripts/docs-context.txt | |
| key: temporal-docs-${{ steps.docs_sha.outputs.sha }} | |
| - name: Fetch Temporal docs | |
| if: steps.docs_cache.outputs.cache-hit != 'true' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node .github/scripts/fetch-docs.mjs | |
| # ──────────────────────────────────────────────────────────────────── | |
| - name: Fetch issue data (workflow_dispatch only) | |
| if: github.event_name == 'workflow_dispatch' | |
| id: fetch_issue | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| issue=$(gh api repos/${{ github.repository }}/issues/${{ inputs.issue_number }}) | |
| echo "title=$(echo "$issue" | jq -r '.title')" >> $GITHUB_OUTPUT | |
| echo "body<<EOF_BODY" >> $GITHUB_OUTPUT | |
| echo "$issue" | jq -r '.body' >> $GITHUB_OUTPUT | |
| echo "EOF_BODY" >> $GITHUB_OUTPUT | |
| - name: Evaluate submission | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| ISSUE_NUMBER: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_number || github.event.issue.number }} | |
| ISSUE_TITLE: ${{ github.event_name == 'workflow_dispatch' && steps.fetch_issue.outputs.title || github.event.issue.title }} | |
| ISSUE_BODY: ${{ github.event_name == 'workflow_dispatch' && steps.fetch_issue.outputs.body || github.event.issue.body }} | |
| run: node .github/scripts/evaluate-submission.mjs |