{"record":{"id":"6323df6abebcb075","repo":"abhigyanpatwari/GitNexus","slug":"cannot-park-path-basename-failedpath-after-an-in-place-fts-6323df","errorCode":null,"errorMessage":"Cannot park ${path.basename(failedPath)} after an in-place FTS abort${detail ? ` (${detail})` : ''}. The database was not opened. Run `gitnexus clean --lbug-sidecars` after stopping any GitNexus MCP or serve process, then retry `gitnexus analyze` or `gitnexus analyze --repair-fts`.","messagePattern":"Cannot park (.+?) after an in-place FTS abort(.+?)\\)` : ''\\}\\. The database was not opened\\. Run `gitnexus clean --lbug-sidecars` after stopping any GitNexus MCP or serve process, then retry `gitnexus analyze` or `gitnexus analyze --repair-fts`\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/run-analyze.ts","lineNumber":1388,"sourceCode":"                  ? 'a FIFO'\n                  : 'not a regular file';\n      throw new Error(\n        `Cannot repair FTS indexes: graph store at ${lbugPath} is ${foundType} (expected a file). ` +\n          'Run `gitnexus analyze` (full) to rebuild from scratch.',\n      );\n    }\n    await ensureWritableStorage();\n    // P1 R8: park a poisoned live WAL before opening. Staging never parks —\n    // the live index next to an unpublished staging file must replay its WAL.\n    const repairDirty = existingMeta.incrementalInProgress;\n    if (shouldRefuseFtsCrashWal(repairDirty, existingMeta.capabilities?.fts)) {\n      const {\n        moved: repairParked,\n        removed: repairRemoved,\n        failed: repairParkFailed,\n      } = await quarantineSidecarsForDirtyRecovery(lbugPath, (message) => log(`   ${message}`));\n      if (repairParkFailed.length > 0) {\n        throw new Error(ftsCrashParkFailureMessage(repairParkFailed[0]!));\n      }\n      if (repairParked.length + repairRemoved.length > 0) {\n        log('Parked leftover WAL/shadow from the previous in-place FTS abort before --repair-fts.');\n      }\n    }\n    try {\n      await initAnalysisLbug(lbugPath);\n      // Gate on FTS availability BEFORE touching any index. createSearchFTSIndexes\n      // now DROPs each index before recreating it (so schema changes reach existing\n      // DBs); if the extension were unavailable, the drops would run and leave the\n      // DB index-less, only failing at the create step. Fail loudly first — mirrors\n      // the analyze path's `if (ftsAvailable)` gate below — so an unavailable\n      // extension never destroys the existing indexes.\n      const repairFtsAvailable = await loadFTSExtension(undefined, {\n        policy: resolveAnalyzeInstallPolicy(),\n      });\n      if (!repairFtsAvailable) {\n        // Surface the load-side reason (#2374): \"not pre-installed\" was wrong","sourceCodeStart":1370,"sourceCodeEnd":1406,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/ac9a4e9abd8fd3058c070b72c23402a4f887929a/gitnexus/src/core/run-analyze.ts#L1370-L1406","documentation":"runFullAnalysisInner, before running --repair-fts, parks leftover WAL/shadow sidecars from a previous in-place FTS abort via quarantineSidecarsForDirtyRecovery; if any park/remove fails it throws the ftsCrashParkFailureMessage error naming the first failed path. The database was not opened, so no corruption occurred; manual sidecar cleanup is required before repair can proceed.","triggerScenarios":"Running `gitnexus analyze --repair-fts` when a prior in-place FTS checkpoint crashed and the leftover WAL/shadow sidecars cannot be parked (locked files, permissions, disk issues).","commonSituations":"Another GitNexus MCP/serve process still holding the sidecar files; antivirus locking .wal/.shadow files; read-only or full disk; permission changes after moving the repo.","solutions":["Stop any GitNexus MCP or serve process.","Run `gitnexus clean --lbug-sidecars` to clear the leftover sidecars.","Retry `gitnexus analyze` or `gitnexus analyze --repair-fts`.","Verify write permissions on .gitnexus/ and free disk space if the failure persists."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await runAnalyze({ repairFts: true });\n} catch (err) {\n  if (err instanceof Error && err.message.includes('Cannot park')) {\n    console.error('Stop MCP/serve processes, then `gitnexus clean --lbug-sidecars`, then retry repair.');\n  } else throw err;\n}","preventionTips":["Ensure no other GitNexus process holds the database before --repair-fts.","Verify write permissions and disk space in .gitnexus/ before repair.","Prevent analyze crashes mid-FTS-checkpoint (clean shutdowns only)."],"tags":["database","wal","fts","sidecar","crash-recovery"],"backgroundTag":"fts-crash-wal-leftover","analyzedSha":"ac9a4e9abd8fd3058c070b72c23402a4f887929a","analyzedAt":"2026-09-15T23:29:44.066Z","contentChangedAt":"2026-09-15T23:29:44.066Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}