You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pipx/uv venvs ship no pip module, so 'jcodemunch-mcp upgrade' died with
'No module named pip' and skipped the hook refresh. detect_install_mechanism()
now routes pip installs through in-process pip-install-U as before, and on
pipx/uv prints the exact upgrade command + refreshes hooks in-process (no pip).
Startup version-drift warning leads with 'init --hooks' (pip-free).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# jcodemunch-mcp — Project Brief
2
2
3
3
## Current State
4
+
- **Version:** 1.108.84 — Install-mechanism-aware `upgrade` (#357, reported by @zakblacki on a pipx install). `jcodemunch-mcp upgrade` ran `sys.executable -m pip install -U` blindly; pipx/uv venvs ship NO `pip` module → `No module named pip`, pip exited non-zero, and the command **bailed before refreshing hooks**. Compounding it: the startup version-drift warning (`server.py`) told the user to run `jcodemunch-mcp upgrade` to clear the stale-hook nag — the exact pip-less-failing command — so it never cleared. Fix (rewrote `cli/upgrade.py`): new `detect_install_mechanism()` (path/env heuristic, no subprocess) → `(mechanism, upgrade_command)` for pip/pipx/uv/uvx/venv. `_pip_available()` gates the in-process `pip install -U`: present → runs as before (a genuine pip *failure* now refreshes hooks anyway + preserves the non-zero rc, was: skip-and-bail); **absent → does NOT shell out to a foreign package manager** (honors jjg's stated "detect then tell, don't guess-and-run" stance from the issue thread), prints the exact command (`pipx upgrade` / `uv tool upgrade`), and refreshes hooks in-process via `init --hooks` (pip-free, stamps `last_init_version.txt` so the nag clears). The nag warning now leads with `init --hooks`. NO INDEX_VERSION bump. New `tests/test_v1_108_84.py` (11). Files: `cli/upgrade.py` (rewrite), `server.py` (warning text). Side issues answered in #357 reply (not bugs): `.pack/nodejs` migration warning = stale starter-pack index; `find_dead_code` `framework_warning` inflated dead-code % on a Node project because its entry-point heuristic looks for `main.py`/`app.py` (pass `entry_point_patterns` or reindex); real-time freshness = `watch-all`. See [[project_jmunch_console]].
4
5
- **Version:** 1.108.83 — Tame `watch-all` CPU under WSL (#356, reported by @Blainexi). `watch-all` pegged 15-30% CPU non-stop on WSL. NOT a busy loop: **`watchfiles` auto-enables polling whenever it detects WSL** (inotify unreliable across the boundary, confirmed in watchfiles docs), and its default 300ms poll re-stats the whole watched tree several times/sec — multiplied across every indexed repo. `DefaultFilter` drops `node_modules`/`.git` *events* but the polling walk still stats them (structural cost). Fix: the `awatch` call now passes `poll_delay_ms=_watch_poll_delay_ms()` (resolves `JCODEMUNCH_WATCH_POLL_DELAY_MS` → `WATCHFILES_POLL_DELAY_MS` → `DEFAULT_WATCH_POLL_DELAY_MS=1000`; non-positive/garbage → default); ignored when native FS events are used (no-op off WSL). Plus a one-time WSL startup hint (`_is_wsl()`) naming the two levers: raise the poll delay, or set `WATCHFILES_FORCE_POLLING=false` for Linux-filesystem repos to use native inotify (~0 idle CPU); `/mnt/*` repos need polling. NO INDEX_VERSION bump. New `tests/test_v1_108_83.py` (11); `test_watch_all.py`/`test_watcher_lock.py` green. Files: `watcher.py`, `watch_all.py`. See [[project_jmunch_console]].
5
6
- **Version:** 1.108.82 — Exclude `org_savings.db` from `list_repos`. The team-SKU org-rollup store (`org_savings.db`, written by `org/store.py`) sits in `~/.code-index/` next to per-repo index `.db` files, but `_NON_REPO_DB_FILES` only excluded `telemetry.db` → `list_repos` enumerated it as a phantom `local/org_savings` repo (sym 0, empty source_root, display==repo_id). In the jMunch Console it showed an un-removable card; `delete-index local/org_savings` failed (no matching `local-org_savings.db` index → non-zero exit), which the Console surfaced as the misleading "needs jcodemunch-mcp >= 1.108.50". Fix: `_NON_REPO_DB_FILES = frozenset({"telemetry.db", "org_savings.db"})` (1-line). NO INDEX_VERSION bump. New `tests/test_telemetry_db_skip.py::test_list_repos_skips_org_savings_db`; storage/sqlite_store suites green. Files: `storage/sqlite_store.py`. Console-side companion: the Console's delete-failure message now surfaces jcm's real error instead of the hard-coded version hint (jmunch-console). See [[project_jmunch_console]], [[project_org_rollup_sku]].
6
7
- **Version:** 1.108.81 — Lazy git identity probe in `get_watch_status` / `list-repos`. `list-repos` (and `get_watch_status`) slowed to 60s+ on many-repo hosts because the per-folder loop resolved each repo's reindex-state key up front via `_reindex_key` → `_local_repo_id` → `resolve_index_identity` — a **git identity probe ≈1 subprocess/repo** (~0.2s each here, worse in worktree-heavy trees; cf. the #303 resolve_repo perf history). But reindex_state is **in-memory only** (populated by a watcher/server process); a cold `list-repos` CLI (the jMunch Console cockpit shells exactly this) has none, so every probe resolved a key only to read an empty default. Fix: new `reindex_state.has_any_reindex_state()` (`bool(_repo_states)` under lock); `get_watch_status` computes `track_reindex = has_any_reindex_state()` ONCE before the loop and skips `_reindex_key`/`get_reindex_status` entirely when False, substituting the default `{index_stale:False, reindex_in_progress:False, stale_since_ms:None}` per repo. **Output shape unchanged** (cold path already returned these defaults — just after paying for N git probes); a watcher/server process WITH state still resolves keys so #353 crash-loop visibility holds. `process_locks.inspect` (OpenProcess, ~0.01s/10) and `service_status` (~0.26s) were measured cheap; the git probe was the sole per-repo scaler. NO INDEX_VERSION bump. New `tests/test_v1_108_81.py` (2: probe skipped + get_reindex_status not consulted when no state; keys resolved when state present); `test_v1_108_78.py`/`test_watch_all.py`/`test_reindex_state.py`/`test_watcher_lock.py` still green. Files: `reindex_state.py`, `tools/get_watch_status.py`. Motivated by the jMunch Console showing fixtures because its 20s CLI timeout lost to this; see [[project_jmunch_console]].
0 commit comments