Skip to content

feat: v0.47.0 — explore tool + ast-index 3.48.1 + rebuild resilience#55

Merged
Shahinyanm merged 2 commits into
masterfrom
feat/ast-index-348-leverage
Jun 24, 2026
Merged

feat: v0.47.0 — explore tool + ast-index 3.48.1 + rebuild resilience#55
Shahinyanm merged 2 commits into
masterfrom
feat/ast-index-348-leverage

Conversation

@Shahinyanm

Copy link
Copy Markdown
Member

Использует новинки ast-index 3.48 в token-pilot, одним релизом 0.47.0.

A — bump @ast-index/cli 3.44 → 3.48.1

TS-indexing fix, rebuild swap-and-restore, memory caps, FUSE-safe canonicalize. npm audit = 0. Полный сьют без новых фейлов (23 — пред-существующие env-only, идентично master).

B — buildIndex доверяет swap-and-restore

На упавшем rebuild берём индекс, который бинарь сохранил (swap-and-restore 3.46+), вместо throw + fallback в сырой Read. Lock- и generic-recovery унифицированы.

D — новый tool explore

Обёртка над ast-index explore --rwr: ранж-символы + source-головы топ-файлов + graph neighbours (callers/subclasses = blast radius через RWR) + связанные тесты — одним компактным блоком. Заменяет цепочку find_usages → read_symbol → call_tree. graph по умолчанию on, max_files кап. На старом бинаре — внятное «requires ast-index >= 3.48» вместо молчаливого пусто.
Реализация: client-метод + типы + src/handlers/explore.ts + регистрация в server.ts/tool-definitions/NAV_TOOLS + validateExploreArgs + тесты. Score округляется. End-to-end проверен на реальном бинаре 3.48.1.

Отложено

C (--local/subtree) — для multi-repo/worktree. Без subtree-модели рутинга --local = no-op; нужен отдельный заход (ADR), чтобы не ломать только что укреплённый isMultiRepoParent.

Проверка

  • tsc ✓, build ✓ (agents 0.47.0), npm audit 0
  • новые тесты explore/client/validation 62/62 ✓
  • полный сьют 1391 passed / 23 failed (= baseline env, 0 новых)

🤖 Generated with Claude Code

shahinyanm and others added 2 commits June 24, 2026 09:28
Leverage ast-index 3.48 in token-pilot:

- feat(explore): new MCP tool `explore` — one-shot ranked context. Wraps
  ast-index's `explore --rwr`: ranked symbols + top-file source heads + graph
  neighbours (callers/subclasses = blast radius via RWR) + related tests, in one
  compact block. Replaces find_usages → read_symbol → call_tree chaining. Graph
  on by default; degrades with a clear "requires ast-index >= 3.48" note on an
  older binary. Client method + types + handler + server registration + tests.

- chore(deps): bump @ast-index/cli ^3.44 → ^3.48.1 (TS-indexing fix, rebuild
  swap-and-restore, memory caps, FUSE-safe canonicalize). npm audit still 0.

- fix(buildIndex): trust the binary's swap-and-restore — on rebuild failure use
  the preserved index instead of throwing and falling back to raw reads. Lock
  and generic recovery paths unified.

Deferred: --local / subtree scoping (multi-repo/worktree) needs a rooting rework.

Full suite: +5 new tests; 23 failures unchanged (pre-existing env-only).

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

Pre-existing CI breakage surfaced while landing 0.47.0 (master CI has been red
since the "label savings + efficiency %" badge change):

- statusline.test.ts: badge now renders `· saved <N>` (labelled) plus an
  efficiency `%` for tool-call-backed totals. Updated the 8 stale regexes to
  match the current format; EFF-bearing cases assert ` \d+%`.

- installer.test.ts / index.test.ts: installHook branches on
  CLAUDE_PLUGIN_ROOT. When another test sharing the vitest worker leaks that
  env var, the standalone-install assertions failed (sharding-dependent).
  beforeEach now neutralises it and afterEach restores — deterministic
  regardless of file-to-worker distribution.

No production code change. The 2 git-root tests that flake under parallel load
(real `git` subprocess, 3s timeout) are unrelated and pre-existing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Shahinyanm
Shahinyanm merged commit d681857 into master Jun 24, 2026
3 checks passed
@Shahinyanm
Shahinyanm deleted the feat/ast-index-348-leverage branch June 24, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant