{"record":{"id":"0c33a6c658b1ede6","repo":"abhigyanpatwari/GitNexus","slug":"spring-auto-configuration-failed-to-clear-synthe","errorCode":null,"errorMessage":"[spring-auto-configuration] failed to clear synthetic Class nodes before incremental re-write (${message}) — aborting to avoid stale placeholders; the next run will full-rebuild","messagePattern":"\\[spring-auto-configuration\\] failed to clear synthetic Class nodes before incremental re-write \\((.+?)\\) — aborting to avoid stale placeholders; the next run will full-rebuild","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/lbug/lbug-adapter.ts","lineNumber":3364,"sourceCode":"    try {\n      countResult = await c.query(`MATCH (n:Class) WHERE ${predicate} RETURN count(n) AS cnt`);\n      const result = Array.isArray(countResult) ? countResult[0] : countResult;\n      const rows = await result.getAll();\n      const count = Number(rows[0]?.cnt ?? rows[0]?.[0] ?? 0);\n      if (count > 0) {\n        await closeQueryResults(\n          await c.query(`MATCH (n:Class) WHERE ${predicate} DETACH DELETE n`),\n        );\n      }\n      if (countResult) await closeQueryResults(countResult);\n      return { nodesDeleted: count };\n    } catch (err) {\n      if (countResult) await closeQueryResults(countResult);\n      if (classifyDeleteAllError(err) === 'benign-missing-table') {\n        return { nodesDeleted: 0 };\n      }\n      const message = err instanceof Error ? err.message : String(err);\n      throw new Error(\n        '[spring-auto-configuration] failed to clear synthetic Class nodes before ' +\n          `incremental re-write (${message}) — aborting to avoid stale placeholders; ` +\n          'the next run will full-rebuild',\n      );\n    }\n  });\n};\n\n// ============================================================================\n// Full-Text Search (FTS) Functions\n// ============================================================================\n\n/**\n * Load the FTS extension on the supplied connection (or the singleton\n * writable connection when none is given).\n *\n * Delegates to the shared `ExtensionManager` so install policy (auto /\n * load-only / never), out-of-process bounded INSTALL, and capability","sourceCodeStart":3346,"sourceCodeEnd":3382,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/ac9a4e9abd8fd3058c070b72c23402a4f887929a/gitnexus/src/core/lbug/lbug-adapter.ts#L3346-L3382","documentation":"Spring auto-configuration cleanup in lbug-adapter (gitnexus/src/core/lbug/lbug-adapter.ts:3003): before an incremental writeback rewrites synthetic auto-configuration Class nodes, the DETACH DELETE failed with a non-benign error. Aborting prevents stale placeholder Classes from surviving into the new index; the dirty flag forces a full rebuild next run.","triggerScenarios":"Incremental writeback on a repo carrying Spring auto-configuration placeholders where the Class-node DELETE fails on a lock, disk fault, or native error rather than a missing table.","commonSituations":"Same-family situations as the other pre-write cleanups: concurrent readers on the index, disk/AV interference, or an index in a half-written state.","solutions":["Re-run the analyze — the dirty-flag full rebuild resolves it","Ensure no serve/MCP process holds the database during the writeback","Address the native cause in the embedded message (disk space, locks)","If persistent, force a clean rebuild with gitnexus analyze --force"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"const isSpringAutoConfigClearFailure = (e: unknown): boolean =>\n  e instanceof Error &&\n  e.message.startsWith('[spring-auto-configuration] failed to clear synthetic Class nodes');","tryCatchPattern":"try {\n  await clearSpringAutoConfigNodes();\n} catch (e) {\n  if (isSpringAutoConfigClearFailure(e)) {\n    // stale placeholder risk — abort and rely on the next-run full rebuild\n    logger.warn('spring-auto-configuration cleanup failed; next run will full-rebuild');\n  }\n  throw e;\n}","preventionTips":["Avoid concurrent access to the index during incremental cleanup phases","Resolve recurring native errors (disk, locks) before further incremental runs","Finish the follow-up rebuild after an abort so no stale synthetic Classes survive"],"tags":["gitnexus","spring","auto-configuration","incremental","writeback"],"backgroundTag":"incremental-sync-cleanup-failed","analyzedSha":"ac9a4e9abd8fd3058c070b72c23402a4f887929a","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}