Skip to content

CL-6340: live-smoke harness for the code-review MVP - #73

Draft
TheGreatAxios wants to merge 2 commits into
mainfrom
cl-6340-live-smoke
Draft

CL-6340: live-smoke harness for the code-review MVP#73
TheGreatAxios wants to merge 2 commits into
mainfrom
cl-6340-live-smoke

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds scripts/repro/live-smoke-code-review.ts, a harness that wires the merged @corbits/code-review review loop to a real GitHub PR via @corbits/github-tools and posts a real review.
  • runReviewerTurn prefers a direct Anthropic Messages API call; when ANTHROPIC_API_KEY is absent (as in this sandbox) it falls back to a local Ollama chat completion. The Ollama path is HARNESS-ONLY — it exists to prove the loop mechanics (diff → three passes → aggregate → post) for real without a paid credential, not as a second production inference binding. The production runReviewerTurn binding remains the known gap the MVP report flagged; this harness does not close it.

Verified live end to end

  • Live PR: corbitsdev/pr-review-spike-test-repo#5 (branch off a commit that reintroduces seeded bugs in arrayUtils.ts).
  • Posted review: https://github.com/corbitsdev/pr-review-spike-test-repo/pull/5#pullrequestreview-4979012755 — real REST call, real response, 5 inline comments anchored to real diff lines, aggregate body grouped by severity with per-reviewer attribution.
  • Model: qwen2.5vl:7b via local Ollama (the strongest non-embedding completion model available on this machine).
  • Timings (ms): diff-fetch 693, architecture pass 11694, correctness pass 73882, release-risk pass 92780 (passes run concurrently via Promise.all), aggregate+post 1836, total 95310.

Honest quality note

A 3-7B local model is not the production bar. Findings were directionally right (it caught the off-by-one, the mutation-in-sort, and flagged missing empty-array guards) but shallow — no distinct blocking/should-fix/later triage, some near-duplicate findings across reviewers, and its suggestion blocks contain prose ("Change the loop condition to...") rather than literal replacement code, so a "Commit suggestion" on GitHub would not apply cleanly. This is expected from a 7B model and is exactly what the module comment says not to read as a verdict on the loop — the mechanics are what's being proven here, not finding quality.

Test plan

  • bun install, prettier, eslint pass on the new file
  • Live diff fetch confirmed against the scratch repo
  • Full loop run for real: diff → 3 passes → aggregate → posted review with inline comments verified via gh api .../pulls/5/comments
  • Re-run with ANTHROPIC_API_KEY once available to compare finding quality against a production-grade model

Wires @corbits/github-tools' real diff-fetch/post-review calls and
@corbits/code-review's runPullRequestReview loop to a direct Anthropic
Messages API call for runReviewerTurn — the seam the MVP left
unbound. Confirmed against a live scratch PR: diff fetch resolves and
posting works end to end; the inference pass itself needs
ANTHROPIC_API_KEY, which is not configured in this sandbox.
ANTHROPIC_API_KEY is still unavailable in this sandbox. To finish
proving the loop mechanics end to end, runReviewerTurn falls back to
a local Ollama chat completion (localhost:11434) when no Anthropic
key is set — harness-only, not a second production inference binding;
the production seam remains the known gap.

Ran the full loop for real against corbitsdev/pr-review-spike-test-repo#5
with qwen2.5vl:7b: diff fetch, three reviewer passes, aggregate, and a
real posted review with anchored inline comments. Per-leg timings are
now recorded (diff-fetch, each pass, aggregate+post, total).
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