feat(FN-3873): add GitHub tracking state service for issue close/reopen lif

Added a GitHub tracking state service (`GitHubTrackingStateService`) and `setIssueState` client method to support closing and reopening tracked issues, with test coverage for both the client and the service, wired into the GitHub routes, and documented in the architecture docs.

Fusion-Task-Id: FN-3873
This commit is contained in:
Fusion
2026-05-10 02:39:01 -07:00
committed by gsxdsm
parent ebab75ec53
commit 44502572fc
8 changed files with 608 additions and 0 deletions

View File

@@ -1244,6 +1244,8 @@ When Fusion does create a tracking issue, it formats the title as `[FN-XXXX] Tas
When a tracked task later moves to `in-progress` or `done`, Fusion posts one short lifecycle comment on the linked tracking issue. These comments include the Fusion task ID as plain text (`Fusion task: FN-XXXX`) and never link back to the Fusion app. No comment is posted for any other transition.
When a tracked task transitions into `done`, Fusion closes the linked GitHub issue with `state_reason: completed`. When a task transitions out of `done` into any active column (`triage`, `todo`, `in-progress`, `in-review`), Fusion reopens it with `state_reason: reopened`. Moves from `done` to `archived` leave the issue closed. Tasks without `githubTracking.enabled` or without a linked issue are unaffected, and GitHub failures are logged to task activity without blocking the move.
### Worktree model
- Each active task runs in isolated worktree under `.worktrees/*`
- Executor creates branches like `fusion/{task-id}` (`executor.ts`)