Uh oh!
There was an error while loading. Please reload this page.
test: review dogfood with npm binary - #12
Conversation
- Install CLI in isolated temp dir to avoid monorepo's catalog: protocol breaking npm install (EUNSUPPORTEDPROTOCOL error) - Add --print-logs --log-level DEBUG to diagnose 135ms instant exit - Use GITHUB_PATH to make aictrl binary available across steps Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previous run showed session completing in 129ms with no API call. Debug logs revealed resolveTools completes but session immediately cancels. Hypothesis: monorepo's .aictrl config or tool directories cause an exception during tool initialization that silently aborts the session. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CI workflow is now confirmed working (run 22810222993). Restore the full code review prompt with gh pr comment integration, and remove the debug flags (--print-logs --log-level DEBUG) that were added during troubleshooting. Key fixes preserved: - Isolated npm install in $RUNNER_TEMP to avoid catalog: protocol conflict - cd $RUNNER_TEMP before running aictrl to avoid monorepo config interference
The agent couldn't read local files when running from $RUNNER_TEMP because the repo checkout is an "external directory" requiring permission. Instead of fighting the permission system, pre-compute the diff with `gh pr diff` and pass it directly in the prompt. This eliminates the need for the agent to read any local files.
Two fixes: 1. Build the review prompt as a file via heredoc instead of inline shell variable expansion. This handles large diffs and special characters. 2. Set GH_REPO env var and include explicit --repo flag in the prompt so the agent's gh commands target the correct repository. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Review: PR #12SummaryThis PR refactors the aictrl installation and review workflow to avoid monorepo package.json conflicts. The approach is sound overall. Issues Found1. Heredoc Injection Risk (Medium) # Consider using a different approach like:printf'%s'"...">"$RUNNER_TEMP/review-prompt.txt"2. Missing Error Handling (Low) 3. Minor Inconsistency (Low) Good Practices
Reviewed SHA: 0646f9b |
Testing that aictrl CLI from npm can run code reviews.