feat(bots): onboard reviewer-bot to pinned databricks-bot-engine #2
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
| # TEMPORARY — engineer-bot end-to-end verification (DO NOT MERGE; removed before finalize). | |
| # | |
| # The real engineer-bot.yml triggers on issues/workflow_dispatch, which only | |
| # register from the default branch — so they can't run on this PR branch. This | |
| # pull_request-triggered clone exercises the engineer AUTHOR path on the branch: | |
| # poetry install, .bot/config.yaml load, prompt resolution, and the author agent. | |
| # It runs AUTHOR ONLY (no publish) against a fixed throwaway issue (#864), so it | |
| # cannot open a spurious fix PR. Delete this file before marking #862 ready. | |
| name: engineer-bot-e2e (TEMP) | |
| on: | |
| pull_request: | |
| types: [synchronize] # re-run by pushing; avoids auto-run on every event type | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| author-e2e: | |
| if: github.event.pull_request.head.repo.fork == false | |
| environment: azure-prod | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: [linux-ubuntu-latest] | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout (PR head — the branch under test) | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Mint engineer-bot App token | |
| id: setup | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| with: | |
| app-id: ${{ secrets.ENGINEER_BOT_APP_ID }} | |
| private-key: ${{ secrets.ENGINEER_BOT_APP_PRIVATE_KEY }} | |
| - name: Setup Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: '3.11' | |
| - name: Setup Node (for the Claude Code CLI the SDK spawns) | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: '20' | |
| - name: Mint engine-scoped install token | |
| id: engine-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| with: | |
| app-id: ${{ secrets.ENGINEER_BOT_APP_ID }} | |
| private-key: ${{ secrets.ENGINEER_BOT_APP_PRIVATE_KEY }} | |
| owner: databricks | |
| repositories: databricks-bot-engine | |
| permission-contents: read | |
| - name: Install engine + Claude SDK/CLI | |
| uses: ./.github/actions/install-bot-engine | |
| with: | |
| engine-ref: b6205fb502566d617a456ccf3c37f3e4e3072ccd | |
| engine-token: ${{ steps.engine-token.outputs.token }} | |
| - name: Install connector deps (for pytest self-verify) | |
| run: | | |
| python -m pip install --upgrade poetry | |
| poetry install --no-interaction || { | |
| echo "::warning::poetry install failed (likely a stale lock); relocking on the runner and retrying." | |
| poetry lock --no-interaction | |
| poetry install --no-interaction | |
| } | |
| - name: Resolve test issue #864 + gather context | |
| id: ctx | |
| env: | |
| GH_TOKEN: ${{ steps.setup.outputs.token }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| RAW=864 | |
| gh issue view "$RAW" --repo "$REPO" --json number,title,url,body > "$RUNNER_TEMP/issue.json" | |
| jq -r '.body // ""' "$RUNNER_TEMP/issue.json" > "$RUNNER_TEMP/issue_body.txt" | |
| TITLE="$(jq -r '.title // ""' "$RUNNER_TEMP/issue.json")" | |
| URL="$(jq -r '.url // ""' "$RUNNER_TEMP/issue.json")" | |
| { echo "ISSUE_NUMBER=$RAW"; echo "ISSUE_URL=$URL"; } >> "$GITHUB_ENV" | |
| DELIM="GHEOF_$(date +%s%N)${RANDOM}" | |
| { echo "ISSUE_TITLE<<$DELIM"; printf '%s\n' "$TITLE"; echo "$DELIM"; } >> "$GITHUB_ENV" | |
| # AUTHOR ONLY — no publish. Confirms .bot/config.yaml loads, prompts | |
| # resolve, and the bug-fix author agent runs to a structured outcome. | |
| - name: Run author (bug-fix) — VERIFY ONLY | |
| env: | |
| MODEL_ENDPOINT: https://${{ secrets.DATABRICKS_HOST }}/serving-endpoints/databricks-claude-opus-4-8/invocations | |
| DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
| TEST_REPO_ROOT: ${{ github.workspace }} | |
| RUNNER_TEMP: ${{ runner.temp }} | |
| working-directory: ${{ runner.temp }} | |
| run: >- | |
| python -m databricks_bot_engine.engineer_bot.run --phase author | |
| --system-prompt "$GITHUB_WORKSPACE/.bot/prompts/engineer/system.md" | |
| --user-prompt "$GITHUB_WORKSPACE/.bot/prompts/engineer/user.md" |