abhigyanpatwari/GitNexus · error
--repair-fts cannot be used with --skip-fts or…
Error message
--repair-fts cannot be used with --skip-fts or GITNEXUS_SKIP_FTS=1.
What it means
runFullAnalysis validates operator-provided FTS configuration before taking any lock, and rejects combining --repair-fts with FTS being disabled via --skip-fts or GITNEXUS_SKIP_FTS=1. Repairing FTS indexes is meaningless (and contradictory) when FTS is disabled; failing fast here takes milliseconds and avoids taking the index lock.
Solutions
- Remove --skip-fts from the command line (or unset GITNEXUS_SKIP_FTS) and re-run `gitnexus analyze --repair-fts`.
- If FTS must stay disabled, drop --repair-fts from the invocation.
- Check where GITNEXUS_SKIP_FTS is exported (shell profile, CI env) and scope it to the runs that need it.
Example fix
// before GITNEXUS_SKIP_FTS=1 gitnexus analyze --repair-fts // after unset GITNEXUS_SKIP_FTS && gitnexus analyze --repair-fts
Defensive patterns
Strategy: validation
Validate before calling
const skipFts = process.env.GITNEXUS_SKIP_FTS === '1';
if (repairFts && skipFts) {
throw new Error('Drop --repair-fts or unset GITNEXUS_SKIP_FTS before running.');
} Try / catch
try {
await runAnalyze(options);
} catch (err) {
if (err instanceof Error && err.message.startsWith('--repair-fts cannot be used')) {
console.error('Conflicting FTS flags: remove --skip-fts/GITNEXUS_SKIP_FTS or drop --repair-fts.');
} else throw err;
} Prevention
- Check GITNEXUS_SKIP_FTS in your shell profile/CI env before using --repair-fts.
- Do not hardcode --skip-fts in shared analyze scripts that operators extend.
- Document that repair requires FTS enabled.
When it happens
Trigger: Invoking `gitnexus analyze --repair-fts` together with `--skip-fts`, or in an environment where GITNEXUS_SKIP_FTS=1 is set (resolveFtsDisableReason returns a reason).
Common situations: A CI job or shell profile exports GITNEXUS_SKIP_FTS=1 globally while a developer tries to repair FTS; a script template keeps --skip-fts hardcoded and someone appends --repair-fts.
Understand the failure class
Background: "mutually exclusive" flag errors: what "can't supply both nx and xx", "--raw is not compatible with -i" and "cannot be used with" mean, and how to fix them — this error's family across 29 libraries.
Related errors
- must be a positive integer
- Registry name " " is already used by " ". Pass --name to…
- --allow-insecure-connection /…
- must not be blank.
- Analysis did not finalize for
AI-assisted analysis of abhigyanpatwari/GitNexus@ac9a4e9abd (2026-09-15).
Data as JSON: /api/errors/16b2c95584274e87.
Report an issue: GitHub.
Appendix: source
Thrown at gitnexus/src/core/run-analyze.ts:1143
* genuinely-changed tree does one follow-up incremental. No new flag: waiting
* is the default, which is what hook-driven re-index wants.
*
* The lock is held by whichever process runs the pipeline (the heap-respawn
* child, or the original) — see index-lock.ts for why ownership lives with the
* writer, not a supervising parent. Released as soon as the write completes or
* throws; the post-analysis steps in the CLI (skills, registry) run lock-free.
*/
export async function runFullAnalysis(
repoPath: string,
options: AnalyzeOptions,
callbacks: AnalyzeCallbacks,
runnerIdentityAtBootstrap?: AnalyzerRunnerIdentity,
): Promise<AnalyzeResult> {
// Validate operator-provided FTS config before anything else — a typo fails
// here in ms, without taking the lock. (createSearchFTSIndexes reuses the
// cached value via getSearchFTSStemmer.)
if (options.repairFts && resolveFtsDisableReason(options.skipFts)) {
throw new Error('--repair-fts cannot be used with --skip-fts or GITNEXUS_SKIP_FTS=1.');
}
initialiseSearchFTSStemmer();
initialiseSearchFTSCjkSegmentation();
const contentRetention = contentRetentionFromEnvironment();
// Scope the degraded-parse log throttle to this run (module-level counter
// would otherwise stay saturated on a reused process).
resetDegradedParseCounter();
// The workspace-package memo is per process: this run must see the tree as it
// is now, not as the previous run in a long-lived watch/server process saw it.
invalidateNodeWorkspacePackages(repoPath);
const log = (msg: string) => callbacks.onLog?.(stripControlCharacters(msg));
const acquireOpts = {
log,
onWaitStart: () =>
callbacks.onProgress('lock', 0, 'Waiting for another analyze to finish on this index…'),
};
View on GitHub (pinned to ac9a4e9abd)