v6 #10
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starsetbyte/Carin!10
Loading…
Reference in a new issue
No description provided.
Delete branch "test/v6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
v6
🔍 Carin Code Review
Run #247 completed by
pi-reviewerb4393373e0013ec2aea453c952ddcd3d
Posted by Carin • View run
🔍 Carin Code Review
Run #245 completed by
pi-dispatchereca4258ed5546a4a62e2785a031cb4bd
Posted by Carin • View run
🔍 Carin Code Review
Run #247 completed by
pi-reviewerCode Review: PR #10 (test/v6 → main)
PR: #10
Head:
052c94e7bbAuthor: starsetbyte
Reviewer: pi-reviewer (run #247)
1. Verdict
APPROVE WITH NITS
2. Summary
This PR delivers three distinct features: (1) a PR webhook pipeline that creates review runs from Forgejo/GitHub
pull_requestevents, (2) per-runprovider_override/model_overridefields on the Run model, and (3) dashboard redesign andmax_retriesplumbing fixes. The store layer changes correctly follow the project's column-order invariant (new columns appended toschema.sql,runColumns,scanRun,CreateRun, and the migration function in lockstep). The webhook handler properly routespull_requestevents, skips non-review actions, and uses idempotency keys to prevent duplicate runs. Tests are thorough (new tests forextractPRNumber,extractForgeMetadata,parseForgejoCommitMetawith PR-event 4-field format,parsePREvent, and PR webhook round-trips). All tests pass, vet is clean, and the frontend compiles without errors.3. Blocking Issues
None.
4. Non-Blocking / Nits
4.1
PR-TEST.md— test marker file committed to repoFile:
PR-TEST.md:1-10Problem: This file documents the E2E test scenario for the PR pipeline but serves no functional purpose in the codebase. It adds noise to the repo root.
Suggestion: Remove before merging.
4.2 Trailing
// v6development commentFile:
internal/dispatch/dispatch.go:1660Problem: A lone
// v6comment at the end of the file is a development marker / debug leftover. It carries no meaningful documentation.Suggested fix:
4.3
buildPRPromptmethod receives unused receiverFile:
internal/webhook/inbound.go:572(func (h *InboundHandler) buildPRPrompt(...))Problem: The method takes a
*InboundHandlerreceiver but never usesh. It could be a standalone function.Suggestion: Either drop the receiver (make it a plain function) or leave as-is if future use is planned. Minor style issue only.
4.4 Hardcoded server URL in commit-status TargetURL
Files:
internal/webhook/inbound.go(pending status) andinternal/dispatch/dispatch.go(postForgejoCommitStatus)Problem: Both hardcode
http://astraea1:8787/ui/runs/%d. This is a pre-existing issue, not introduced by this PR, but worth noting since the new PR handler adds another instance.Suggestion: Extract to a configurable base URL in a follow-up PR.
4.5 Duplicate
truncateimplementationsFiles:
internal/dispatch/dispatch.goandinternal/webhook/inbound.goProblem: Both packages define a
truncatefunction with slightly different behavior (dispatch version collapses whitespace and appends"..."; webhook version just slices). No bugs, but future maintainers could accidentally modify one without the other.Suggestion: Consider a shared utility function in a future cleanup.
4.6 Committed
webapp/distbuild artifactsFiles:
webapp/dist/assets/index-B0RTojiN.css(new),webapp/dist/assets/index-B1UJaCvj.js(new),webapp/dist/index.html(modified), old CSS/JS deleted.Problem: These are compiled Svelte output. The project embeds them via Go's
embed— this is intentional perAGENTS.md. However, any merge conflict in minified JS/CSS is unrecoverable.Suggestion: Consider a CI check that verifies
npm run buildproduces clean, unmodified output. Not blocking — the current flow works — but worth noting for repo hygiene.5. Positive Notes
provider_overrideandmodel_overrideare appended to all four locations (schema.sql,runColumns,scanRun,CreateRunINSERT) in the same relative order. The migration function also adds them.max_retriesfix is correct —CreateRunpreviously hardcodedmax_retriesto0; it now usesp.MaxRetries, making theMaxRetriesfield functional in the API and webhook handler.SplitN(rest, "|", 3)toSplitN(rest, "|", 4)preserves backward compatibility for push events (3-field format) while accommodating PR events (4-field format with DIFF_URL). Tests explicitly verify SHA isolation.extractPRNumberfrom the run title avoids an extraGetCommitPRsAPI call. Falls back cleanly for push runs.extractForgeMetadatapluscreateHandoffRunensures commit status and PR comment posting works across the dispatcher→reviewer chain. This is a subtle but important pipeline invariant.postForgejoCommitStatusnow uses"carin/pr-review"for PR runs and"carin/review"for push runs, matching the inbound handler's pending-status posting. No mismatched contexts.extractPRNumbertable-driven (8 cases including edge cases like[PR #abc], empty string),extractForgeMetadata(forgejo-only, github-only, both, empty),parseForgejoCommitMeta(push, PR, no-match, github-rejection),parseGitHubCommitMeta(push, PR), PR payload parsing, PR webhook creates review run, synchronize creates review run, closed action is skipped, and missingpull_requestfield error.6. Test Coverage Assessment
Covered well:
extractPRNumber— 8 cases including invalid/missing], non-numeric, empty stringparseForgejoCommitMeta— push event, PR event (4-field), no-match, GitHub rejectionparseGitHubCommitMeta— push event, PR event (4-field)extractForgeMetadata— forgejo-only, github-only, both, emptySuggested additional coverage (non-blocking):
reopenedaction test —TestPRWebhookCreatesReviewRuncoversopenedandsynchronizebut notreopened. Add a one-line test case.main/mastergets priority 0 (not 5).handlePREventwith invalid JSON body — should return 400.extractForgeMetadataon handoff context — test that metadata survives aHandoff from run #N: ...prefix (the real handoff format).7. Verification Log
Posted by Carin • View run
🔍 Carin Code Review
Run #245 completed by
pi-dispatcherDispatch — PR #10 review (starsetbyte/Carin)
Incoming task
Review PR #10 in
starsetbyte/Carin(test/v6→main, author starsetbyte,head
052c94e7). Description is the bare string "v6".Routing decision
Single persona:
pi-reviewer(deepseek-v4-pro).Considered a chain (e.g. researcher→reviewer) but rejected: the change is
self-contained and pi-reviewer can read repo context directly from the local
checkout. No decomposition benefit.
Scope (sized for routing, not reviewed)
~336 KB / 1,613-line diff:
internal/api/runs.go,internal/dispatch/dispatch.go+test,
internal/store/runs.go+schema.sql+store.go,internal/webhook/inbound.go+ test,model/run.gowebapp/src/api/{client,types}.ts,webapp/src/components/forms/CreateRunForm.svelte,webapp/src/routes/overview/Overview.sveltewebapp/dist/**buildoutput + a new top-level
PR-TEST.mdmarker.Dispatched run
pi-reviewer, modereview, linked to thread #410.draft, advanced toqueuedviaPOST /runs/247/status.Reviewer's mandate (summary)
Structured review with a leading Verdict (
REQUEST CHANGES/APPROVE WITH NITS/APPROVE), blocking + non-blocking issues withfile:line refs and concrete fixes, test-gap assessment, and a verification log
(
go build ./cmd/carin,go vet ./...,go test ./...,npm run check).Reviewer reads
AGENTS.mdfirst for the wire contract, run state machine,error-sentinel mapping, and column-order invariants.
Hand-off
No further dispatcher action required. Outcome will surface as run #247
completion + a
review.mdartifact in thread #410. If pi-reviewer blocks(e.g. cannot fetch the diff), it will escalate via
carin agent block.Posted by Carin • View run
🔍 Carin Code Review
Run #245 completed by
pi-dispatchereca4258ed5546a4a62e2785a031cb4bd
Posted by Carin • View run
🔍 Carin Code Review
Run #245 completed by
pi-dispatchereca4258ed5546a4a62e2785a031cb4bd
Posted by Carin • View run
🔍 Carin Code Review
Run #245 completed by
pi-dispatchereca4258ed5546a4a62e2785a031cb4bd
Posted by Carin • View run
Pull request closed