refactor(FN-1288): consolidate GitHub remote parsing in @fusion/core

- Replace dashboard calls to local getCurrentGitHubRepo helpers with getCurrentRepo from @fusion/core
- Update engine scheduler PR-monitor startup paths to use shared core repo resolution
- Remove duplicated remote parsing implementations from dashboard and engine packages
- Mark gap analysis finding 6.3 as resolved after centralizing parsing logic
This commit is contained in:
gsxdsm
2026-04-08 15:53:38 -07:00
parent 0304a3df20
commit 8aa77c8b77
6 changed files with 16 additions and 92 deletions

View File

@@ -204,13 +204,13 @@ Assessment:
Cross-reference:
- Existing tasks **FN-1201** and **FN-1202** already target server-vs-client persistence boundaries.
### Finding 6.3 — Duplication in GitHub remote parsing logic across packages (**Medium**)
### Finding 6.3 — GitHub remote parsing logic consolidation (**Resolved**)
- `packages/core/src/gh-cli.ts` implements `parseRepoFromRemote()` + gh execution wrappers.
- `packages/engine/src/github.ts` separately implements similar `parseGitHubRemote()` and `getCurrentGitHubRepo()` logic.
- `packages/core/src/gh-cli.ts` is the canonical home for `parseRepoFromRemote()` and `getCurrentRepo()`.
- Engine and dashboard consumers now import the shared `@fusion/core` helpers directly.
Impact:
- Risk of drift in URL parsing behavior and edge-case handling between scheduler/engine and core CLI helpers.
- Eliminates drift risk in URL parsing behavior and keeps GitHub remote resolution logic centralized.
### Finding 6.4 — Layering is healthy: no core → engine/dashboard circular import leak (**Good / no gap**)