abhigyanpatwari/GitNexus · error

Cannot park after an in-place FTS abort )` : ''}. The…

Error message

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`.

What it means

guardWalQuarantine attempted dirty-recovery parking of leftover WAL/shadow sidecars after an in-place FTS abort (orphan-wal with fts-inplace-checkpointed crash evidence) and at least one sidecar could not be parked or removed. The database was not opened; ftsCrashParkFailureMessage reports the first failed path and points to manual cleanup via `gitnexus clean --lbug-sidecars`.

Solutions

  1. Stop any GitNexus MCP or serve process holding handles on the sidecar files.
  2. Run `gitnexus clean --lbug-sidecars` to remove the leftover WAL/shadow sidecars.
  3. Retry `gitnexus analyze`, or `gitnexus analyze --repair-fts` if FTS indexes need rebuilding.
  4. Check write permissions on the repo's .gitnexus directory and available disk space.
Defensive patterns

Strategy: try-catch

Validate before calling

import fs from 'node:fs';
// Writable check before recovery
fs.accessSync(gitnexusDir, fs.constants.W_OK);

Try / catch

try {
  await runSync();
} catch (err) {
  if (err instanceof Error && err.message.includes('Cannot park')) {
    console.error('Stop MCP/serve, run `gitnexus clean --lbug-sidecars`, then re-run analyze.');
  } else throw err;
}

Prevention

When it happens

Trigger: A sync/analyze flow calls guardWalQuarantine on a database with an orphan WAL left by a crashed in-place FTS checkpoint, and quarantineSidecarsForDirtyRecovery reports failed paths (permission issues, locked files, disk problems).

Common situations: Sidecar files locked by antivirus or another GitNexus process; insufficient write permissions on .gitnexus/; read-only filesystem or disk full preventing the park/rename.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@ac9a4e9abd (2026-09-15). Data as JSON: /api/errors/5b6541b298116b03. Report an issue: GitHub.

Appendix: source

Thrown at gitnexus/src/core/lbug/sidecar-recovery.ts:386

): Promise<void> => {
  const state = await inspectLbugSidecars(dbPath);
  if (state.kind === 'wal-with-shadow') {
    warnOnce(
      logger,
      `${dbPath}:present-shadow-refuse:${mode}`,
      `GitNexus: refusing to quarantine WAL at ${dbPath}.wal during ${mode} recovery — ` +
        'the .shadow sidecar is present on disk, so the open likely failed on path reachability or a lock ' +
        'rather than a missing shadow. Run `gitnexus analyze --force <repo-path> --index-only` if the index is genuinely broken.',
    );
    throw new Error(presentShadowUnreachableMessage(dbPath, triggeringErr));
  }
  if (state.kind === 'orphan-wal') {
    if (crashEvidence?.kind === 'fts-inplace-checkpointed') {
      const { failed } = await quarantineSidecarsForDirtyRecovery(dbPath, (message) =>
        logger.warn(message),
      );
      if (failed.length > 0) {
        throw new Error(ftsCrashParkFailureMessage(failed[0]!));
      }
      return;
    }
    warnOnce(
      logger,
      `${dbPath}:large-wal-refuse:${mode}`,
      `GitNexus: refusing to quarantine large WAL (${state.walBytes} bytes) at ${dbPath}.wal during ${mode} recovery; ` +
        'manual recovery required — run `gitnexus analyze --force <repo-path> --index-only`.',
    );
    throw new Error(shadowSidecarRecoveryMessage(dbPath, triggeringErr));
  }
};

export async function quarantineWalForMissingShadow(
  dbPath: string,
  options: {
    logger: SidecarRecoveryLogger;
    level?: 'debug' | 'info' | 'warn';

View on GitHub (pinned to ac9a4e9abd)