abhigyanpatwari/GitNexus · critical
FTS index '${indexName}' on table ${tableName} exists but th
Error message
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`. What it means
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.
Source
Thrown at gitnexus/src/core/lbug/lbug-adapter.ts:3755
const { remedy } = ftsCapability?.diagnosis ?? diagnoseExtensionLoad(ftsCapability?.reason);
// Deliberately message-only: `remedy` is generated text (fixed system paths
// at most), and LadybugDB's own path-bearing `reason` is NEVER interpolated
// here — the #2374/#2375 redaction contract.
//
// `unverifiable` blocks exactly as hard as `present`, but must not be
// WORDED as `present`: the one reachable path into it is a run whose
// `ensureFtsRowDmlSafe` already answered "safe" because the catalog showed
// no FTS index, after which this later read failed — so asserting the index
// exists would contradict what the same run just proved (#2841 cleanup
// review).
const lead =
presence === 'present'
? `FTS index '${indexName}' on table ${tableName} exists but the LadybugDB FTS ` +
'extension is not loaded, so it cannot be dropped in this environment.'
: `FTS index '${indexName}' on table ${tableName} could not be verified as absent — ` +
'the LadybugDB index catalog could not be read — and the FTS extension is not ' +
'loaded, so the index could not be dropped either.';
throw new Error(
`${lead} Every insert and delete against that table fails while the index is present. ` +
`${remedy} Otherwise rebuild the index without FTS via \`gitnexus analyze --force\`.`,
);
}
} finally {
ensuredFTSIndexes.delete(ftsIndexKey(tableName, indexName));
}
};
View on GitHub (pinned to aac7515d2a)
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
Defensive patterns
Strategy: fallback
Validate before calling
// before writeback, verify the extension is loadable in THIS environment
if (!(await loadFTSExtension(undefined, { policy: 'load-only' }))) {
// any pre-existing FTS index is undroppable here — plan a full rebuild without FTS
await scheduleForceRebuild('FTS extension unavailable but index may exist');
} Type guard
const isFtsUndroppableIndex = (e: unknown): boolean =>
e instanceof Error &&
e.message.includes('exists but the LadybugDB FTS extension is not loaded'); Try / catch
try {
await dropFTSIndex(tableName, indexName);
} catch (e) {
if (isFtsUndroppableIndex(e)) {
// every insert/delete on that table would fail — do not continue the writeback
throw new Error(`rebuild required without FTS: gitnexus analyze --force (${e.message})`);
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- FTS extension unavailable - cannot create FTS index ${tableN
- withRetry: maxAttempts must be >= 1, got ${opts.maxAttempts}
- Invalid DuckDB extension name: ${extensionName}
- Invalid DuckDB extension name: ${name}
- Prepare failed: ${errMsg}
AI-assisted analysis of abhigyanpatwari/GitNexus@aac7515d2a (2026-08-20).
Data as JSON: /api/errors/22759da1444ad01d.
Report an issue: GitHub.