commit 3d40ff0776e5461412d3e2f4482d7c92ec0bc4fb
parent 68964d1cabb61caac8417afdd202b56c1ead8240
Author: andrewlaack-collab <andrew.laack@imbue.com>
Date: Tue, 17 Feb 2026 05:34:31 +0000
Improve runtime of agentic identifier (#90)
* Parallel
* Unlock parallelism
* Updated default back to false for parallel agentic issue identification.
* Added agentic to github ci
* Updated dev messaging
---------
Co-authored-by: Andrew Laack <andrew@laack.co>
Diffstat:
3 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/vet-agentic.yml b/.github/workflows/vet-agentic.yml
@@ -0,0 +1,56 @@
+name: Vet (Agentic)
+
+permissions:
+ contents: read
+ pull-requests: write
+
+on:
+ pull_request:
+ types: [opened, edited, synchronize, reopened]
+
+jobs:
+ vet:
+ if: github.event.pull_request.draft == false
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ fetch-depth: 0
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+ - uses: actions/setup-node@v4
+ with:
+ node-version: "20"
+ - run: npm install -g @anthropic-ai/claude-code
+ # we want to run the current version of vet against the PR, not necessarily the deployed / main version.
+ - run: pip install .
+ - name: Run vet (agentic)
+ if: github.event.pull_request.head.repo.full_name == github.repository
+ env:
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BASE_REF: ${{ github.event.pull_request.base.ref }}
+ VET_GOAL: |
+ ${{ github.event.pull_request.title }}
+
+ Additional context (not necessarily part of the goal):
+ ${{ github.event.pull_request.body }}
+ run: |
+ set +e
+ MERGE_BASE=$(git merge-base "origin/$BASE_REF" "${{ github.event.pull_request.head.sha }}")
+ vet "$VET_GOAL" --quiet --output-format github \
+ --agentic --base-commit "$MERGE_BASE" \
+ > "$RUNNER_TEMP/review.json"
+ status=$?
+ if [ "$status" -ne 0 ] && [ "$status" -ne 10 ]; then exit "$status"; fi
+
+ jq --arg sha "${{ github.event.pull_request.head.sha }}" \
+ '. + {commit_id: $sha}' "$RUNNER_TEMP/review.json" > "$RUNNER_TEMP/review-final.json"
+
+ gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \
+ --method POST --input "$RUNNER_TEMP/review-final.json" > /dev/null || \
+ gh pr comment "${{ github.event.pull_request.number }}" \
+ --body "$(jq -r '[.body] + [.comments[] | "**\(.path):\(.line)**\n\n\(.body)"] | join("\n\n---\n\n")' "$RUNNER_TEMP/review-final.json")"
+ exit 0
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
@@ -64,6 +64,7 @@ Current workflows:
- `test-unit.yml` (`Test / Unit`, job: `unit`) — pytest suite (lint + unit tests)
- `test-pkgbuild.yml` (`Test / PKGBUILD`, job: `pkgbuild`) — Arch Linux package build + smoke test
- `vet.yml` (`Vet`, job: `vet`) — Self-review via vet on PRs
+- `vet-agentic.yml` (`Vet (Agentic)`, job: `vet`) — Agentic self-review via vet on PRs
- `publish-pypi.yml` (`Publish / PyPI`, job: `pypi`) — Build and publish to PyPI on tag push
### Continuous Deployment
diff --git a/vet/issue_identifiers/harnesses/agentic.py b/vet/issue_identifiers/harnesses/agentic.py
@@ -160,7 +160,6 @@ Do not report duplicate issues with the same or equivalent descriptions.
"""
-MAX_PARALLEL_CLAUDE_CODE_SESSIONS = 5 # TODO: this was arbitrarily chosen
ResponseText = str
@@ -261,7 +260,7 @@ class _AgenticIssueIdentifier(IssueIdentifier[CommitInputs]):
)
for guide in self._identification_guides
]
- with ThreadPoolExecutor(max_workers=MAX_PARALLEL_CLAUDE_CODE_SESSIONS) as executor:
+ with ThreadPoolExecutor(max_workers=config.max_identify_workers) as executor:
tasks = [
executor.submit(_generate_issues_worker, issue_code, prompt, options)
for issue_code, prompt in issue_prompts