Per-repo allow_self_approval setting replacing the hard author-cannot-approve block (Fix #586) #589
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!589
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-586"
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?
Deliberate design-rule change for user ratification: the unconditional author-cannot-approve block (422) becomes conditional on the per-repo
[review] allow_self_approvalknob, default ON so fresh repos behave like GitHub. OFF keeps the historical 422; COMMENTED always allowed.Decisions (all implemented + tested, see docs/features/04_code_review.md Decisions):
Seam/cost (laws 6+8): review.Service.Settings (nil = default) wired in composition via reg.Open + manifest snapshot + config.AllowSelfApprovalOf; warm path in-memory, no lock held across the call; submits are control-plane-sized, off the push/sync budgets (same cost class as the gate's policy.json read). No summary/ETag projection — enforced read-time, never cached. No proto change (TOML settings-doc field only). Settings UI toggle reuses ToggleSwitch (Tailwind-only); rides the existing settings PUT, no new endpoint/route.
Verification: go test ./internal/review/... ./internal/pulls/... ./internal/api/... + ./internal/config/... ./cmd/walhub/... all -race green; per-package cover review 95.9% / config 96.0% (new code 100%); gofmt/vet clean; web unit 1456/1456 (incl. 2 new files, 10 tests); vite build + esbuild SDK bundle green; dist/.keep restored.
Independent review of
ae42bd6against #586 — verdict: APPROVE (no fixes needed, worktree clean, nothing pushed).Acceptance, all checked:
Verification run in /tmp/walhub-586: review + config + pulls + api + cmd/walhub all -race green; cover review 95.9% / config 96.0% (claims match); gofmt/vet clean; web unit 1456/1456 green (full-glob run showed 1459 with 1 failure in smoke.test.js /setup 403, but that is environmental — a stray listener on :8080 serving 403, unrelated to this PR which touches no serving code; with WALHUB_TEST_WEB_BASE_URL pointed unroutable the 3 server-dependent tests skip and the suite is 1456 pass / 0 fail, exactly the claimed count).