{"record":{"id":"22759da1444ad01d","repo":"abhigyanpatwari/GitNexus","slug":"fts-index-indexname-on-table-tablename-exi","errorCode":null,"errorMessage":"FTS index '${indexName}' on table ${tableName} exists but the LadybugDB FTS extension is not loaded, so it cannot be dropped in this environment. Every insert and delete against that table fails while the index is present. ${remedy} Otherwise rebuild the index without FTS via `gitnexus analyze --force`.","messagePattern":"FTS index '(.+?)' on table (.+?) exists but the LadybugDB FTS extension is not loaded, so it cannot be dropped in this environment\\. Every insert and delete against that table fails while the index is present\\. (.+?) Otherwise rebuild the index without FTS via `gitnexus analyze --force`\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"gitnexus/src/core/lbug/lbug-adapter.ts","lineNumber":3755,"sourceCode":"      const { remedy } = ftsCapability?.diagnosis ?? diagnoseExtensionLoad(ftsCapability?.reason);\n      // Deliberately message-only: `remedy` is generated text (fixed system paths\n      // at most), and LadybugDB's own path-bearing `reason` is NEVER interpolated\n      // here — the #2374/#2375 redaction contract.\n      //\n      // `unverifiable` blocks exactly as hard as `present`, but must not be\n      // WORDED as `present`: the one reachable path into it is a run whose\n      // `ensureFtsRowDmlSafe` already answered \"safe\" because the catalog showed\n      // no FTS index, after which this later read failed — so asserting the index\n      // exists would contradict what the same run just proved (#2841 cleanup\n      // review).\n      const lead =\n        presence === 'present'\n          ? `FTS index '${indexName}' on table ${tableName} exists but the LadybugDB FTS ` +\n            'extension is not loaded, so it cannot be dropped in this environment.'\n          : `FTS index '${indexName}' on table ${tableName} could not be verified as absent — ` +\n            'the LadybugDB index catalog could not be read — and the FTS extension is not ' +\n            'loaded, so the index could not be dropped either.';\n      throw new Error(\n        `${lead} Every insert and delete against that table fails while the index is present. ` +\n          `${remedy} Otherwise rebuild the index without FTS via \\`gitnexus analyze --force\\`.`,\n      );\n    }\n  } finally {\n    ensuredFTSIndexes.delete(ftsIndexKey(tableName, indexName));\n  }\n};\n","sourceCodeStart":3737,"sourceCodeEnd":3764,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/aac7515d2a8c50a1f8f923c6fb77218b333560d6/gitnexus/src/core/lbug/lbug-adapter.ts#L3737-L3764","documentation":"dropFTSIndex (gitnexus/src/core/lbug/lbug-adapter.ts:3755) hit the engine's 'DROP_FTS_INDEX is not defined' error (FTS extension not loaded) while the index catalog still shows the index — or the catalog could not be read ('unverifiable', which blocks identically). A live FTS index without its extension makes every subsequent insert/delete on that table fail at bind time, so the drop fails loudly with the classifier's class-specific remedy plus the analyze --force escape hatch.","triggerScenarios":"An index built where FTS loaded, then reopened in an environment where it does not (runtime dependency removed, extension cache moved); or a run whose earlier catalog read answered 'no FTS index' while the extension was actually unavailable.","commonSituations":"Mixed environments — index built in CI with extensions, served in a slim container without them; OS upgrades removing the OpenSSL version the extension links; partial extension-cache corruption after a disk incident.","solutions":["Follow the interpolated remedy — it is class-specific (install/load the extension, or fix the named missing runtime dependency)","Otherwise rebuild the index without FTS: gitnexus analyze --force","Run `gitnexus doctor` to confirm the extension state on this machine","Keep the analyze and serve environments identical (same extension cache and OS libraries) to prevent the mismatch"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// before writeback, verify the extension is loadable in THIS environment\nif (!(await loadFTSExtension(undefined, { policy: 'load-only' }))) {\n  // any pre-existing FTS index is undroppable here — plan a full rebuild without FTS\n  await scheduleForceRebuild('FTS extension unavailable but index may exist');\n}","typeGuard":"const isFtsUndroppableIndex = (e: unknown): boolean =>\n  e instanceof Error &&\n  e.message.includes('exists but the LadybugDB FTS extension is not loaded');","tryCatchPattern":"try {\n  await dropFTSIndex(tableName, indexName);\n} catch (e) {\n  if (isFtsUndroppableIndex(e)) {\n    // every insert/delete on that table would fail — do not continue the writeback\n    throw new Error(`rebuild required without FTS: gitnexus analyze --force (${e.message})`);\n  }\n  throw e;\n}","preventionTips":["Keep the environment that serves the index identical to the one that built it (extension cache, OS libraries)","Run doctor after OS or container base-image upgrades that may remove runtime dependencies","Never ignore FTS load failures on machines that will later write to an FTS-indexed table"],"tags":["gitnexus","ladybugdb","fts","extension","index-drop","writeback-blocked"],"backgroundTag":"extension-load-failure","analyzedSha":"aac7515d2a8c50a1f8f923c6fb77218b333560d6","analyzedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-08-31T04:17:50.494Z"}