feat(FN-3943): align tracking resolution to honor task-level override seman

Aligned GitHub tracking resolution to resolve task-level overrides, with regression tests covering the create-flow path and documentation of the override semantics.

Fusion-Task-Id: FN-3943
This commit is contained in:
Fusion
2026-05-10 12:05:59 -07:00
committed by gsxdsm
parent 47c9bfdd07
commit 48f0353b7f
8 changed files with 282 additions and 44 deletions

View File

@@ -148,6 +148,19 @@ describe("maybeCreateTrackingIssue", () => {
expect(createIssueMock).toHaveBeenCalledWith(expect.objectContaining({ owner, repo }));
});
it("creates a tracking issue from explicit task override when defaults are unset", async () => {
const linkGithubIssue = vi.fn();
await maybeCreateTrackingIssue(buildTask({ githubTracking: { enabled: true, repoOverride: "task/repo" } }), {
taskStore: { linkGithubIssue, recordActivity: vi.fn() } as any,
projectSettings: {},
globalSettings: {},
logger: console,
});
expect(createIssueMock).toHaveBeenCalledWith(expect.objectContaining({ owner: "task", repo: "repo" }));
});
it("skips creation when tracking is on but no repo is configured", async () => {
const result = await maybeCreateTrackingIssue(buildTask({ githubTracking: { enabled: true } }), {
taskStore: { recordActivity: vi.fn() } as any,