# Task ID: 149 **Title:** Task PR linkage and human accept gate **Status:** pending **Dependencies:** 130, 148 **Priority:** high **Description:** Integrate GitProvider into TaskService for PR creation on push and merge on accept **Details:** Update src/mcpd/src/services/task.service.ts: 1. linkPR(taskId, branch, headCommit): create PR via GitProvider, update Task with prUrl, prNumber 2. accept(taskId, userId, note): - Verify task is in awaiting_review state - Check PR combined status is success (optional gate based on project config) - Call gitProvider.mergePullRequest - Transition to merged state - Create TaskEvent 3. If merge fails, keep in awaiting_review, surface error 4. reject: transition to in_progress, clear PR linkage or keep for reference **Test Strategy:** Unit tests: test linkPR updates task fields, test accept calls merge API, test accept fails if PR status is failing.