Skip to content

fix(code-intel): remote→local reliability + pack activation (release 0.2.24)#91

Merged
eren23 merged 4 commits into
mainfrom
fix/code-intel-remote-local-mode
May 29, 2026
Merged

fix(code-intel): remote→local reliability + pack activation (release 0.2.24)#91
eren23 merged 4 commits into
mainfrom
fix/code-intel-remote-local-mode

Conversation

@eren23

@eren23 eren23 commented May 29, 2026

Copy link
Copy Markdown
Owner

Why

The code-intel MCP was effectively ~90% dark: a stale [remote] config (expired JWT, dead local server) routed every service-backed tool there with no fallback, and the rule engine shipped without its language packs (list_rulesPacks: 0, zero structural rules). This restores a working, useful local-mode baseline.

What changed

Reliability (4ea4dc7)

  • Graceful remote→local fallbackconfigure_remote_service() now gates on JWT expiry (token_is_expired) + a /health reachability probe (RemoteTextService.ping), degrades to local with a readable reason (get_remote_degraded_reason), and closes the prior client (socket-leak fix).
  • IndexStore v2→v3 migration — opening an existing pre-v3 symbols.db crashed (no such column: caller_qualified_name), which also blocked local mode; stale tables are now dropped before recreation on a version mismatch.
  • BM25 statuscache_status_all/verify_all_caches queried a non-existent documents table → corrected to kw_docs.
  • Config persistencesave_remote_config escapes quotes/backslashes in its TOML writer.

Activation (7375f5b)

  • Shipped language packs auto-loadload_all_packs() now loads the 10 shipped example packs by default (≈200 rules total, 30 ast-grep structural). User packs still shadow shipped ones; discover_packs() keeps its project-local contract; opt-out via ATTOCODE_NO_SHIPPED_PACKS=1.

Release (2aacf1a, 51df4fd) — CHANGELOG [0.2.24] + version bump (0.2.23→0.2.24) across pyproject/both __init__/uv.lock. Framed as a Phase-0 reliability/activation release; roadmap Phase 2 (inter-procedural dataflow) shifts to a later slot.

Verification

  • New tests (TDD): test_remote_reliability, test_kw_index_status, test_index_store_migration, test_pack_autoload (+ stale-helper fix).
  • Full code-intel + integration suites green; scripts/validate_release_version.py --expected-tag v0.2.24 passes.
  • Verified live on the real repo config: it now resolves to local mode instead of Connection refused.

Note

Tag v0.2.24 intentionally not created yet — recommend tagging the merge commit on main after this lands.

🤖 Generated with Claude Code

eren23 and others added 4 commits May 29, 2026 19:15
…ion + status/config fixes

The MCP was ~90% dark: a stale [remote] config (expired JWT, dead local server) routed every service tool there with no fallback, and opening the existing v2 symbols.db crashed under v3 code, so local mode was broken too.

- configure_remote_service: gate on JWT-expiry + /health reachability, degrade to local (get_remote_degraded_reason), close prior client (leak)
- IndexStore: drop stale data tables before recreate on schema mismatch so v2→v3 rebuilds instead of crashing on CREATE INDEX ix_refs_caller
- pin_store _STORE_DEFS: kw_index documents→kw_docs (correct BM25 status reporting)
- config.save_remote_config: escape quotes/backslashes in the TOML writer
- tests: +remote-reliability, +kw-index-status, +index-store-migration; fix stale _make_service_with_mocks helper and a pin-footer assertion (1469 passed, 5 skipped)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ks / +91 rules)

The rule registry shipped with only 109 builtin regex rules — the 10 example language packs (incl. 36 ast-grep structural rules) under rules/packs/examples were never loaded, so 'list_rules' reported Packs: 0 and no structural matching ran.

load_all_packs now also loads the shipped example packs by default (user-installed packs of the same name still shadow them). discover_packs keeps its project-local-only contract intact. Opt out via ATTOCODE_NO_SHIPPED_PACKS=1.

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

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

Bumps 0.2.23 -> 0.2.24 across pyproject.toml (project + bumpversion), src/attocode/__init__.py, src/attoswarm/__init__.py, uv.lock. Stamps CHANGELOG [0.2.24] - 2026-05-29 from the [Unreleased] notes.

Phase-0 reliability/activation release (NOT roadmap Phase 2): graceful remote->local fallback, IndexStore v2->v3 migration, BM25 status fix, TOML escaping, and shipped language packs auto-loading (Packs:0 -> 10 packs / ~200 rules / 30 structural). Roadmap Phase 2 (inter-procedural dataflow) shifts to a later slot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eren23
eren23 merged commit 3abbd76 into main May 29, 2026
3 checks passed
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