test: closed review loop final verification #5

Closed
starsetbyte wants to merge 2 commits from test/review-loop-final into main
Owner

This PR tests the full closed review loop: webhook → pi-dispatcher → pi-reviewer → commit status update → PR comment.

This PR tests the full closed review loop: webhook → pi-dispatcher → pi-reviewer → commit status update → PR comment.
test: PR webhook E2E pipeline test
Some checks are pending
carin/review Carin review in progress...
carin/pr-review Carin review passed
84de947039
feat: PR webhook pipeline, per-run model overrides, dashboard redesign, max_retries fix
Some checks are pending
carin/review Carin review in progress...
c6c43f7b4b
Webhook (internal/webhook/inbound.go):
- Handle pull_request events (opened/synchronize/reopened)
- Parse Forgejo/GitHub PR payloads into normalized preEvent
- Post pending commit status on Forgejo for PR head SHA
- HMAC verification for both X-Hub-Signature-256 and X-Forgejo-Signature
- Idempotency via delivery ID (returns 409 on duplicate)
- 5 new PR-specific tests + 8 existing push tests

Model overrides (model/run.go, store, api, dispatch):
- Run.ProviderOverride, Run.ModelOverride fields
- Wired through CreateRun/UpdateRun/scanRun/params()
- spawnExternal: override persona defaults when run has overrides set
- Schema: provider_override + model_override columns

Max retries fix (store/runs.go):
- CreateRun INSERT now uses p.MaxRetries instead of hardcoded 0
- UpdateRun SET includes max_retries
- API runRequest.params() maps MaxRetries

Dashboard redesign (Overview.svelte):
- Replace kanban with health bar + agent grid + run table
- Compact flight-instrument design: status dots, tabular-nums
- Run table and agent health table with status colors
- Expandable create-run form with model/provider overrides
- Fix <tr> without <tbody> SSR warnings, remove empty CSS
fix: close the review loop — commit status + PR comments
Some checks are pending
carin/review Carin review in progress...
856bfde62e
Bug fix: parseForgejoCommitMeta used SplitN(rest, '|', 3) which
concatenated SHA|DIFF_URL for PR webhook runs (4 pipe-delimited
fields), causing Forgejo to reject the malformed SHA. Commit status
updates silently failed, leaving PRs stuck at 'pending' forever.

Fix: SplitN(rest, '|', 4) handles both push (3 fields) and PR (4
fields). Same fix applied to parseGitHubCommitMeta.

Optimization: extractPRNumber() parses [PR #N] from run titles,
skipping the GetCommitPRs API call for PR webhook runs. Push
webhook runs fall back to GetCommitPRs as before.

Context matching: postForgejoCommitStatus now uses carin/pr-review
for PR runs (matching the inbound webhook handler) instead of
hardcoded carin/review.

Tests: 7 new tests covering push/PR/no-match parsing for both
Forgejo and GitHub, plus extractPRNumber edge cases.

All 12 test packages pass, vet clean.
test: trigger closed review loop
Some checks are pending
carin/review Carin review in progress...
carin/pr-review Carin review passed
d986561ed4
Author
Owner

🔍 Carin Code Review

Run #231 completed by pi-dispatcher


b08ae76e0e4455b9b82619a5bbed5886


Posted by CarinView run

## 🔍 Carin Code Review *Run [#231](http://astraea1:8787/ui/runs/231) completed by `pi-dispatcher`* --- b08ae76e0e4455b9b82619a5bbed5886 --- *Posted by [Carin](http://astraea1:8787/ui/runs/231) • [View run](http://astraea1:8787/ui/runs/231)*
Author
Owner

🔍 Carin Code Review

Run #231 completed by pi-dispatcher


Dispatch Plan — Run #231 (Review PR #5)

Input

PR #5 in starsetbyte/Carin: test/review-loop-finalmain.
Author: starsetbyte. Title: "test: closed review loop final verification".
Diff: #5.diff (1995 additions / 156 deletions, 23 files).

Scope analysis

The PR bundles several distinct concerns under the banner of the "closed review loop" test:

Area Files Risk
P0 backend (critical path) internal/dispatch/dispatch.go (new extractPRNumber, extractForgeMetadata; edits to postForgejoPRComment, postForgejoCommitStatus), internal/store/runs.go, internal/store/schema.sql, internal/store/store.go, internal/api/runs.go, internal/webhook/inbound.go, model/run.go High — this is the loop-closing logic
Tests internal/dispatch/dispatch_test.go, internal/webhook/inbound_test.go Medium — must cover new paths
Frontend source webapp/src/api/client.ts, webapp/src/api/types.ts, webapp/src/components/forms/CreateRunForm.svelte, webapp/src/routes/overview/Overview.svelte Low–Med
Committed build bundles webapp/dist/assets/*.js, *.css, webapp/dist/index.html Hygiene — embedded assets, normally regenerated
Docs / noise .hermes/plans/* (2 plan md), docs/findings-*, docs/handoff-*, PR-TEST.md Hygiene — possibly repo noise

Routing decision

Single persona: pi-reviewer (deepseek-v4-pro).

Reasoning:

  • Rule #3 applies directly: "the task is reviewing existing changes → pi-reviewer."
  • This is one cohesive PR review, not a multi-stage build. No plan/implementation split is needed, so no architect→builder chain.
  • A chain (e.g. reviewer→vision for the SPA, or researcher→reviewer) is unnecessary: the SPA changes are a dashboard overview rewrite, not a design/UX decision needing pi-creative/pi-vision; the review is correctness+hygiene focused, which the reviewer model handles.
  • Did not split into separate reviewer runs per file area — the reviewer should assess the PR holistically, including whether its scope is too broad (it can flag that itself).

Spawned run

  • Run #232 — agent pi-reviewer, mode review, thread #401, project 1.
  • Queued via POST /runs/232/status {status: queued} (the CLI exposes only run-start/run-done/run-fail; queuing used the status API directly).
  • Prompt instructs the reviewer to: fetch the diff, read AGENTS.md conventions, run go build/vet/test against the local checkout, review correctness/logic (esp. the PR-comment + commit-status loop close), test coverage, security, perf, style, and PR hygiene (committed dist/ bundles, committed plan/docs markdown, overall scope), then post review.md and end with a VERDICT: line for verdict parsing.

What the dispatcher did NOT do

  • Did not perform the review itself (dispatcher only routes).
  • Did not checkout/merge the PR branch or commit/push anything.

Next

Wait for pi-reviewer (run #232) to post review.md and a verdict. On VERDICT: revise under iteration cap, the pipeline will queue a fix run; at cap or on block, it escalates to cassie.


Posted by CarinView run

## 🔍 Carin Code Review *Run [#231](http://astraea1:8787/ui/runs/231) completed by `pi-dispatcher`* --- # Dispatch Plan — Run #231 (Review PR #5) ## Input PR #5 in starsetbyte/Carin: `test/review-loop-final` → `main`. Author: starsetbyte. Title: "test: closed review loop final verification". Diff: https://durandal.exe.xyz/starsetbyte/Carin/pulls/5.diff (1995 additions / 156 deletions, 23 files). ## Scope analysis The PR bundles several distinct concerns under the banner of the "closed review loop" test: | Area | Files | Risk | |---|---|---| | **P0 backend (critical path)** | `internal/dispatch/dispatch.go` (new `extractPRNumber`, `extractForgeMetadata`; edits to `postForgejoPRComment`, `postForgejoCommitStatus`), `internal/store/runs.go`, `internal/store/schema.sql`, `internal/store/store.go`, `internal/api/runs.go`, `internal/webhook/inbound.go`, `model/run.go` | High — this is the loop-closing logic | | **Tests** | `internal/dispatch/dispatch_test.go`, `internal/webhook/inbound_test.go` | Medium — must cover new paths | | **Frontend source** | `webapp/src/api/client.ts`, `webapp/src/api/types.ts`, `webapp/src/components/forms/CreateRunForm.svelte`, `webapp/src/routes/overview/Overview.svelte` | Low–Med | | **Committed build bundles** | `webapp/dist/assets/*.js`, `*.css`, `webapp/dist/index.html` | Hygiene — embedded assets, normally regenerated | | **Docs / noise** | `.hermes/plans/*` (2 plan md), `docs/findings-*`, `docs/handoff-*`, `PR-TEST.md` | Hygiene — possibly repo noise | ## Routing decision **Single persona: `pi-reviewer` (deepseek-v4-pro).** Reasoning: - Rule #3 applies directly: "the task is reviewing existing changes → pi-reviewer." - This is one cohesive PR review, not a multi-stage build. No plan/implementation split is needed, so no architect→builder chain. - A chain (e.g. reviewer→vision for the SPA, or researcher→reviewer) is unnecessary: the SPA changes are a dashboard overview rewrite, not a design/UX decision needing `pi-creative`/`pi-vision`; the review is correctness+hygiene focused, which the reviewer model handles. - Did **not** split into separate reviewer runs per file area — the reviewer should assess the PR holistically, including whether its scope is too broad (it can flag that itself). ## Spawned run - **Run #232** — agent `pi-reviewer`, mode `review`, thread #401, project 1. - Queued via `POST /runs/232/status {status: queued}` (the CLI exposes only run-start/run-done/run-fail; queuing used the status API directly). - Prompt instructs the reviewer to: fetch the diff, read AGENTS.md conventions, run `go build/vet/test` against the local checkout, review correctness/logic (esp. the PR-comment + commit-status loop close), test coverage, security, perf, style, and PR hygiene (committed `dist/` bundles, committed plan/docs markdown, overall scope), then post `review.md` and end with a `VERDICT:` line for verdict parsing. ## What the dispatcher did NOT do - Did not perform the review itself (dispatcher only routes). - Did not checkout/merge the PR branch or commit/push anything. ## Next Wait for pi-reviewer (run #232) to post `review.md` and a verdict. On `VERDICT: revise` under iteration cap, the pipeline will queue a fix run; at cap or on block, it escalates to cassie. --- *Posted by [Carin](http://astraea1:8787/ui/runs/231) • [View run](http://astraea1:8787/ui/runs/231)*
Author
Owner

🔍 Carin Code Review

Run #231 completed by pi-dispatcher


b08ae76e0e4455b9b82619a5bbed5886


Posted by CarinView run

## 🔍 Carin Code Review *Run [#231](http://astraea1:8787/ui/runs/231) completed by `pi-dispatcher`* --- b08ae76e0e4455b9b82619a5bbed5886 --- *Posted by [Carin](http://astraea1:8787/ui/runs/231) • [View run](http://astraea1:8787/ui/runs/231)*
Author
Owner

🔍 Carin Code Review

Run #231 completed by pi-dispatcher


b08ae76e0e4455b9b82619a5bbed5886


Posted by CarinView run

## 🔍 Carin Code Review *Run [#231](http://astraea1:8787/ui/runs/231) completed by `pi-dispatcher`* --- b08ae76e0e4455b9b82619a5bbed5886 --- *Posted by [Carin](http://astraea1:8787/ui/runs/231) • [View run](http://astraea1:8787/ui/runs/231)*
Author
Owner

🔍 Carin Code Review

Run #231 completed by pi-dispatcher


b08ae76e0e4455b9b82619a5bbed5886


Posted by CarinView run

## 🔍 Carin Code Review *Run [#231](http://astraea1:8787/ui/runs/231) completed by `pi-dispatcher`* --- b08ae76e0e4455b9b82619a5bbed5886 --- *Posted by [Carin](http://astraea1:8787/ui/runs/231) • [View run](http://astraea1:8787/ui/runs/231)*
starsetbyte closed this pull request 2026-07-12 16:14:53 +00:00
Some checks are pending
carin/review Carin review in progress...
carin/pr-review Carin review passed

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starsetbyte/Carin!5
No description provided.