Skip to content

workflow: log each review to ai-review-log (Phase 2 v2) - #42

Merged
heskew merged 1 commit into
mainfrom
workflow/log-to-review-repo
Apr 18, 2026
Merged

workflow: log each review to ai-review-log (Phase 2 v2)#42
heskew merged 1 commit into
mainfrom
workflow/log-to-review-repo

Conversation

@heskew

@heskew heskew commented Apr 17, 2026

Copy link
Copy Markdown
Member

Summary

After claude-code-action posts its review comment on a PR, this adds a follow-up workflow step that reads the comment and POSTs a summary issue to HarperFast/ai-review-log (private). Each logged issue gets labels repo:oauth, verdict:pending, phase:baseline. You sweep verdict:pending weekly and relabel useful / noise / partial — that triage becomes the calibration data.

Design

  • One issue per review, not per finding. Simpler to ship; per-finding granularity can be added in v2.1 if needed.
  • if: always() so we log even when the review step itself errors — the review's outcome status is captured in the log body.
  • Auth scoping: AI_REVIEW_LOG_TOKEN (PAT scoped to just HarperFast/ai-review-log Issues R/W) is passed via curl's Authorization header for the log POST only. GH_TOKEN for gh pr view stays as the default GITHUB_TOKEN (read-only on the reviewed repo).
  • Fail-open: if the log token is missing, the Claude comment isn't found, or the POST fails — we warn but never fail the job. Logging is secondary; the PR comment is the primary value.
  • Title differentiation: [oauth] PR #N: no blockers vs [oauth] PR #N: 3 finding(s) — triage pending. The body includes source URL, model, date, review-job status, and the full Claude comment verbatim.

Prereqs (done)

  • HarperFast/ai-review-log repo created (private/internal, issues enabled)
  • PAT AI_REVIEW_LOG_TOKEN added to HarperFast/oauth secrets (fine-grained, Issues R/W on log repo only)
  • Label taxonomy pre-created on log repo (repo:*, verdict:*, phase:*)

Test plan

After claude-code-action finishes, read Claude's PR comment and POST a
summary issue to HarperFast/ai-review-log (private). Labels:
repo:oauth, verdict:pending, phase:baseline. Nathan sweeps
verdict:pending weekly and relabels useful/noise/partial to calibrate.

Design notes:
- One issue per review (not per finding). Simpler to ship; per-finding
  granularity can be added in v2.1 if calibration needs it.
- `if: always()` so we log even if the review itself errored — the
  review_status field in the log issue body captures that.
- Authentication: PAT AI_REVIEW_LOG_TOKEN is scoped to
  HarperFast/ai-review-log only (Issues R/W, Metadata R). Passed via
  curl's Authorization header for the log POST only; GH_TOKEN for
  `gh pr view` stays as the default GITHUB_TOKEN (read PR context).
- Fail-open: if AI_REVIEW_LOG_TOKEN is missing, Claude didn't post a
  comment, or the POST fails, we warn but never fail the job. The
  review's primary value is the PR comment; the log is secondary.
- Title derivation from the PR comment body differentiates
  "no blockers" from findings count.

Labels already pre-created in the log repo. Requires AI_REVIEW_LOG_TOKEN
secret on HarperFast/oauth.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@heskew
heskew requested a review from a team as a code owner April 17, 2026 22:43
@heskew
heskew merged commit 6b5d142 into main Apr 18, 2026
4 of 5 checks passed
@heskew
heskew deleted the workflow/log-to-review-repo branch April 18, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant