Bug
The POST /api/v1/prs/{id}/merge and POST /api/v1/prs/{id}/resolve-comments endpoints are wired into the daemon and return successful responses, but neither endpoint actually performs any action. Merge returns {ok: true, method: "squash"} and ResolveComments returns {ok: true, resolved: 0} — the API lies about the outcome.
The frontend's PullRequestsPage has "Merge" and "Resolve" buttons wired to these endpoints. If the PR page were functional (currently blocked by #240), clicking "Merge" would show a success toast ("merged (squash)") without actually merging anything on GitHub.
Analyzed against: 96d1649 (current main)
Confidence: High — traced from controller through service to the stub implementation.
Root Cause
backend/internal/service/pr/action_service.go:37-39:
func (s *ActionService) Merge(_ context.Context, prID string) (MergeResult, error) {
n, _ := strconv.Atoi(prID)
return MergeResult{PRNumber: n, Method: "squash"}, nil
}
And lines 44-46:
func (s *ActionService) ResolveComments(_ context.Context, _ string, _ []string) (ResolveResult, error) {
return ResolveResult{Resolved: 0}, nil
}
Both have TODO comments acknowledging they are stubs, but:
- The controller (
backend/internal/httpd/controllers/prs.go:26-37) doesn't guard against the stub — it has a nil-service check that returns 501, but NewActionService() returns a non-nil struct.
- The daemon wires
NewActionService() in production, so the stub is always hit.
Reproduction
# Start daemon, register a project, have a session with a PR
curl -X POST http://127.0.0.1:3001/api/v1/prs/42/merge
# Returns: {"ok":true,"pr_number":42,"method":"squash"}
# No merge actually happens on GitHub.
curl -X POST http://127.0.0.1:3001/api/v1/prs/42/resolve-comments
# Returns: {"ok":true,"resolved":0}
# No comments actually resolved.
Impact
- Data integrity: Users (or automated tooling) calling the API believe PRs are merged when they are not.
- Silent failure: No error, warning, or indication that the operation was a no-op.
- Frontend exposure: The PullRequestsPage buttons call these endpoints directly.
Suggested Fix
Either:
- Return 501 (Not Implemented) from the stubs until the real SCM provider integration is wired, or
- Don't wire
NewActionService() into production — leave deps.PRs nil so the controller's existing nil-guard returns 501.
Option 2 is a one-line change in the daemon wiring and makes the "not implemented" state explicit.
Bug
The
POST /api/v1/prs/{id}/mergeandPOST /api/v1/prs/{id}/resolve-commentsendpoints are wired into the daemon and return successful responses, but neither endpoint actually performs any action.Mergereturns{ok: true, method: "squash"}andResolveCommentsreturns{ok: true, resolved: 0}— the API lies about the outcome.The frontend's
PullRequestsPagehas "Merge" and "Resolve" buttons wired to these endpoints. If the PR page were functional (currently blocked by #240), clicking "Merge" would show a success toast ("merged (squash)") without actually merging anything on GitHub.Analyzed against:
96d1649(currentmain)Confidence: High — traced from controller through service to the stub implementation.
Root Cause
backend/internal/service/pr/action_service.go:37-39:And lines 44-46:
Both have
TODOcomments acknowledging they are stubs, but:backend/internal/httpd/controllers/prs.go:26-37) doesn't guard against the stub — it has a nil-service check that returns 501, butNewActionService()returns a non-nil struct.NewActionService()in production, so the stub is always hit.Reproduction
Impact
Suggested Fix
Either:
NewActionService()into production — leavedeps.PRsnil so the controller's existing nil-guard returns 501.Option 2 is a one-line change in the daemon wiring and makes the "not implemented" state explicit.