feat(FN-3283): add canonical task review data endpoints
Added canonical task review data endpoints (FN-3283) with new core types, expanded task workflow API routes, and updated GitHub integration (removing deprecated git-github routes in favor of consolidated github.ts). New API tests added for the task endpoints. Fusion-Task-Id: FN-3283
This commit is contained in:
@@ -1271,8 +1271,8 @@ Pull-request auto-merge tasks persist structured review metadata on the task as
|
||||
|
||||
API flow:
|
||||
|
||||
1. `GET /api/tasks/:id/review` returns cached `reviewState` for modal load.
|
||||
2. `POST /api/tasks/:id/review/refresh` fetches latest GitHub PR review/review-comment state, updates `reviewState`, and preserves addressing history (items that disappear are retained as `stale: true`).
|
||||
1. `GET /api/tasks/:id/review` returns canonical `TaskReviewData` (`mode`, `refreshable`, `fetchedAt`, `summary`, `items[]`) for modal load.
|
||||
2. `POST /api/tasks/:id/review/refresh` returns the same `TaskReviewData` shape after re-fetching source data (GitHub PR mode or reviewer-agent direct mode).
|
||||
3. `POST /api/tasks/:id/review/address` records selected review items as queued, appends a deterministic `**PR Review Revision Request**` steering comment payload, clears transient failure/session state, and requeues the same task to `todo` for same-task revision.
|
||||
|
||||
UI contract boundary:
|
||||
|
||||
@@ -259,6 +259,8 @@ This file is the contract for execution and review.
|
||||
|
||||
- **Task comments** (`fn task comment`) are general collaboration notes.
|
||||
- **Review tab feedback** is dedicated actionable review input (PR review data in pull-request mode, reviewer-agent findings in direct/non-PR mode) used to request same-task revisions.
|
||||
- Review data is served from task-scoped API endpoints: `GET /api/tasks/:id/review` and `POST /api/tasks/:id/review/refresh`.
|
||||
- Both endpoints return one normalized contract (`TaskReviewData`) with stable per-item `itemId` values and `sourceMode` (`pull-request` or `reviewer-agent`) so Review UI and per-item progress can share one read model.
|
||||
- The Review tab supports **manual refresh** without closing/reopening Task Detail:
|
||||
- Pull-request mode refreshes live GitHub-backed review decision/thread/comment state and updates PR metadata freshness.
|
||||
- Direct/non-PR mode refreshes normalized reviewer-agent feedback from persisted task review artifacts and does not call GitHub.
|
||||
|
||||
Reference in New Issue
Block a user