GitNexus/gitnexus/src/cli
Gergő Magyar 3f1e23ba83
fix: stop misdiagnosing glibc-too-old native loads (#2672) and name the Windows FTS zero-install fix (#2669) (#2689)
* docs(plans): add glibc-windows-fts-diagnostics plan

Implementation plan for #2672 (glibc-too-old native-load misdiagnosis)
and #2669 (Windows FTS prerequisites + Git Bash zero-install workaround).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cli): stop prescribing a reinstall when the host glibc is too old (#2672)

The LadybugDB prebuilt binary requires GLIBC_2.34 (dlopen/pthread_* at 2.34,
fstat64/lstat at 2.33). On an older host the loader reports

  version `GLIBC_2.34' not found (required by .../lbugjs.node)

and checkLbugNative answered with "truncated file, ABI mismatch, or
wrong-platform binary" plus instructions to re-run install.js. That advice is
actively wrong for this class: every download ships the same prebuilt binary,
so the reinstall fails identically and the user loops.

Add glibcTooOldMessage: match a GLIBC_<version> token on a "not found" line,
report the highest required version (compared numerically, so 2.9 < 2.34)
alongside this host's glibc from process.report, state that reinstalling will
NOT help, and point at the real options. The branch sits on the arm where the
probe actually ran and failed, so an unrunnable probe still fails open (#2441).

The glibc read is local rather than analyzer-identity's detectLibcVariant:
native-check is the dependency-light startup gate and must not statically pull
in a module the CLI reaches through a dynamic import.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(lbug): name the Git Bash zero-install fix for Windows FTS load failures (#2669)

The Windows error-126 remedy already refuses to prescribe a reinstall and names
the VC++ redistributable and the OpenSSL 3 DLLs, but not where those DLLs
already exist on the machine. #2669's reporter had the redistributable
installed and still failed: the same command failed in PowerShell and succeeded
in Git Bash, because Git for Windows puts libssl-3-x64.dll and
libcrypto-3-x64.dll on PATH via C:\Program Files\Git\mingw64\bin.

Add that hint to the Windows-126 and structural missing-dependency remedies
through one shared const, following the VC_REDIST_INSTALL_HINT anti-drift
pattern (#2383 F5). Placing it in the builders rather than at a call site is
load-bearing: markUnavailable caches the whole diagnosis (#2383 F3) and
ftsDegradedWarning replays that cached remedy, so a call-site fix would miss
the MCP query and /api/search surfaces.

The hint is a fixed system path, never a user-profile one — remedy text is not
path-redacted, and fts-degraded-warning.test.ts asserts no C:\Users\ path ever
reaches a user. Both touched tests now assert that property directly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(readme): document the Linux glibc floor and Windows FTS prerequisites (#2672, #2669)

Requirements listed only Node and git, so neither runtime prerequisite that
these two issues turn on was discoverable before hitting the failure.

- Linux: the LadybugDB prebuilt binary needs glibc 2.34+; name the distro
  versions that clear it and state plainly that reinstalling does not help.
- Windows: full-text search needs the VC++ 2015-2022 x64 redistributable AND
  OpenSSL 3 on PATH. The redistributable alone is not sufficient (#2669's
  reporter had it), and Git for Windows already ships the OpenSSL DLLs, so
  running from Git Bash or prepending mingw64\bin is a zero-install fix.
  Without them analyze still succeeds but the index carries no search tables.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: drop the plan document from version control

docs/* is gitignored; the plan was force-added so it would travel with the
work. It is working material, not a repository artifact — the code, tests and
README carry the reasoning that matters.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cli): stop doctor reporting a present-but-unloadable binary as missing (#2672)

doctor printed "✗ lbugjs.node missing" for every failed native check — including
the case this PR is about, where the binary is right there and merely fails to
load because the host glibc is too old. It then wrote the real detail to stderr
directly beneath, so the two lines contradicted each other and the headline sent
users to reinstall a file they already had. It said the same for a truncated
download and for an entirely absent @ladybugdb/core package.

checkLbugNative already knows which of the three it found, so record it: a
`kind` discriminator ('package_missing' | 'binary_missing' | 'load_failed') set
at each failure return. doctor renders it through a new exported
`nativeStatusLine`, following the existing pageSizeDoctorLines/poolSizeDoctorLine
pure-helper pattern — which also makes the line testable, where before it had no
coverage at all. An unrecognized or absent kind keeps the conservative "missing".

Deriving this in doctor with a second existsSync would have re-stat'd a file the
check had already inspected, and could disagree with what it actually observed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-25 10:05:57 +01:00
..
i18n feat(analyze): add opt-in --self-commit flag for AGENTS.md/CLAUDE.md churn (#2640) 2026-07-25 06:23:26 +01:00
ai-context.ts Merge remote-tracking branch 'upstream/main' 2026-07-20 10:58:08 +08:00
analyze-config.ts feat(cli): add --embeddings-baseurl/-model/-auth-token/-dims flags to analyze (#2140) 2026-06-13 14:01:12 +01:00
analyze.ts fix: large-repo analyze OOM and false worker-timeout cascade (#2649) (#2679) 2026-07-25 09:16:17 +01:00
augment.ts feat(cursor): upgrade hooks to Cursor 2.4 postToolUse for Read/Grep/Shell coverage (#1467) 2026-05-10 13:29:06 +01:00
clean.ts fix: make large incremental writebacks commit reliably (#2409) (#2425) 2026-07-10 14:05:23 +01:00
cli-message.ts fix(analyze): single-writer lock for the index write path (#2658) (#2677) 2026-07-25 05:08:13 +01:00
detect-changes-format.ts fix(cli): --limit i18n, 0/negative guard, and correct truncation paths (#2310) 2026-07-01 19:16:36 +01:00
doctor.ts fix: stop misdiagnosing glibc-too-old native loads (#2672) and name the Windows FTS zero-install fix (#2669) (#2689) 2026-07-25 10:05:57 +01:00
editor-targets.ts feat: full Codex support — hooks, plugin marketplace, and setup (#2328, supersedes #1131) (#2369) 2026-07-04 13:32:17 +01:00
embedding-dims.ts feat(cli): add --embeddings-baseurl/-model/-auth-token/-dims flags to analyze (#2140) 2026-06-13 14:01:12 +01:00
embeddings.ts fix: proxy-blocked installs survive onnxruntime-node postinstall and self-heal embeddings (#2370) (#2372) 2026-07-05 16:15:10 +01:00
eval-server.ts fix(eval): defer env file read errors to binds that need a token 2026-07-16 08:25:52 +00:00
format-elapsed.ts feat(progress): add per-language progress reporting to scope-resolution phase (#1813) 2026-05-25 11:53:54 +01:00
group.ts feat(core): adopt pino structured logger (#1336) 2026-05-07 20:56:25 +01:00
help-i18n.ts feat(analyze): add opt-in --self-commit flag for AGENTS.md/CLAUDE.md churn (#2640) 2026-07-25 06:23:26 +01:00
index-repo.ts fix(storage): rename index metadata to gitnexus.json with dual-write compatibility (#2363) 2026-07-03 19:32:59 +01:00
index.ts feat(analyze): add opt-in --self-commit flag for AGENTS.md/CLAUDE.md churn (#2640) 2026-07-25 06:23:26 +01:00
lazy-action.ts feat(skills): GitNexus Engineering Tool Kits (#2566) 2026-07-19 15:07:24 +01:00
list.ts feat: multi-branch indexing and branch-scoped querying (#2106) (#2137) 2026-06-10 10:24:40 +01:00
mcp.ts feat(mcp): enforce repository allowlist 2026-07-14 02:01:00 +07:00
optional-grammars.ts fix(grammars): load vendored tree-sitter grammars from vendor/ by absolute path (#2111) (#2144) 2026-06-10 14:20:42 +01:00
publish.ts feat(cli): add gitnexus publish for opt-in understand-quickly registry (#1425) 2026-05-09 09:52:26 +01:00
remove.ts fix(storage): rename index metadata to gitnexus.json with dual-write compatibility (#2363) 2026-07-03 19:32:59 +01:00
resolve-invocation.ts fix(cli): steer docs, skills, and hooks through a CLI-neutral project-local runner (#1939) (#1945) 2026-06-02 09:00:34 +01:00
serve.ts feat(i18n): make web and CLI language-aware (#1748) 2026-05-23 06:14:24 +01:00
setup.ts feat(skills): GitNexus Engineering Tool Kits (#2566) 2026-07-19 15:07:24 +01:00
skill-gen.ts fix(cli): make .agents/ skill mirror best-effort + exclude from dirty check 2026-07-20 16:19:59 +08:00
standard-skills.ts feat(skills): GitNexus Engineering Tool Kits (#2566) 2026-07-19 15:07:24 +01:00
status.ts feat(skills): GitNexus Engineering Tool Kits (#2566) 2026-07-19 15:07:24 +01:00
tool.ts fix(cli): fail every tool command loudly on backend error payloads 2026-07-16 09:58:14 +00:00
uninstall.ts feat(skills): GitNexus Engineering Tool Kits (#2566) 2026-07-19 15:07:24 +01:00
wiki.ts feat(wiki): allow explicit HTTP LLM hosts (#2491) 2026-07-16 13:53:58 +01:00