feat(FN-4148): derive GitHub tracking titles from task descriptions

Adds GitHub tracking title derivation so tasks can display meaningful titles when PR/issue tracking data is incomplete, falling back to the task description. The core implementation lives in `github-tracking.ts` with expanded test coverage across the tracking suite, and the feature is wired into pla

Fusion-Task-Id: FN-4148

Fusion-Task-Lineage: d57c6279-1b4f-4ade-9c3f-e20ac391ea45
This commit is contained in:
Fusion
2026-05-12 10:37:51 -07:00
committed by gsxdsm
parent bc5fdd28a8
commit 08b4af3757
11 changed files with 365 additions and 39 deletions

View File

@@ -28,14 +28,20 @@ function makeTmpDir(): string {
return dir;
}
async function removeTrackedTmpDir(dir: string | undefined): Promise<void> {
if (!dir) return;
try {
await rm(dir, { recursive: true, force: true });
} catch {
rmSync(dir, { recursive: true, force: true });
} finally {
createdTmpDirs.delete(dir);
}
}
async function cleanupTmpDirsAsync(): Promise<void> {
const cleanup = Array.from(createdTmpDirs);
await Promise.all(
cleanup.map(async (dir) => {
await rm(dir, { recursive: true, force: true });
createdTmpDirs.delete(dir);
}),
);
await Promise.all(cleanup.map((dir) => removeTrackedTmpDir(dir)));
}
function cleanupTmpDirsSync(): void {
@@ -1269,7 +1275,7 @@ describe("schema migrations", () => {
let tmpDir: string;
afterEach(async () => {
await rm(tmpDir, { recursive: true, force: true });
await removeTrackedTmpDir(tmpDir);
});
it("migrates a v1 database by adding missing columns", () => {
@@ -2196,7 +2202,7 @@ describe("FTS5 full-text search", () => {
} catch {
// already closed
}
await rm(tmpDir, { recursive: true, force: true });
await removeTrackedTmpDir(tmpDir);
});
it("creates tasks_fts virtual table after init", () => {
@@ -2409,7 +2415,7 @@ describe("Database FTS5 guard behavior", () => {
expect(localDb.rebuildFts5Index()).toBe(false);
} finally {
localDb.close();
await rm(tmpDir, { recursive: true, force: true });
await removeTrackedTmpDir(tmpDir);
if (prevEnv === undefined) {
delete process.env.FUSION_DISABLE_FTS5;
} else {
@@ -2423,7 +2429,7 @@ describe("createDatabase factory", () => {
let tmpDir: string;
afterEach(async () => {
await rm(tmpDir, { recursive: true, force: true });
await removeTrackedTmpDir(tmpDir);
});
it("creates a database instance without auto-init", () => {