Skip to content

v0.30.0 — index self-heal (foreign writer + embeddings backfill) + MCP warm-on-boot - #5

Merged
hamr0 merged 2 commits into
mainfrom
feat/index-selfheal
Jul 15, 2026
Merged

v0.30.0 — index self-heal (foreign writer + embeddings backfill) + MCP warm-on-boot#5
hamr0 merged 2 commits into
mainfrom
feat/index-selfheal

Conversation

@hamr0

@hamr0 hamr0 commented Jul 15, 2026

Copy link
Copy Markdown
Owner

What

Three index-integrity fixes, released as v0.30.0.

Added

  • MCP warm-on-boot. An MCP-only host has no SessionStart hook to build the index, so the model could recall against an empty/stale one. The server now kicks a background index() right after the initialize handshake — fire-and-forget (the handshake never waits), rejections logged to stderr (never the JSON-RPC stdout stream). Opt out with LITECTX_NO_WARM_INDEX.

Fixed

  • Foreign-writer subset poisoning. The whole-index PRAGMA user_version stamp (0.29.0) is blind to a different writer (old global CLI, stale node_modules) re-chunking some files — it never touches user_version. Each node now carries the stamp of the litectx that wrote it (additive nodes.stamp, DEFAULT 0 = "rebuild me"); a poisoned file self-identifies and re-chunks on the next unforced pass even when its bytes are unchanged. Existing indexes migrate on open.
  • Embeddings backfill on off→on. A file first indexed with the tier off (library default) has no vector; the content diff fast-skips it as "unchanged" on a later on pass (CLI/MCP default), leaving semantic recall silently dead on it. index() now embeds any indexed-but-vectorless file (read + embed only, no re-chunk), idempotently.

Verification

  • node --test409 pass / 0 fail / 1 env-skip, exit 0
  • tsc --noEmit → exit 0
  • Adversarial 4-agent diff review → 0 confirmed findings; embed-input parity (backfill vs normal path) independently verified
  • Security: all new SQL parameterized; methods are file-axis (no tenant surface); background rejection caught → stderr

Scope

5 files (+167/−8 code) + docs (CHANGELOG, litectx.context.md, PRD self-heal section).

🤖 Generated with Claude Code

https://claude.ai/code/session_014c3EffnCPFetsv41LhZcJx

hamr0 and others added 2 commits July 15, 2026 12:11
…ackfill

Three index-integrity fixes:
- Per-node `stamp` column: a foreign-version writer (old global CLI, stale
  node_modules) poisoning a SUBSET of files is now caught and re-chunked, which
  the whole-index user_version stamp structurally cannot see.
- MCP warm-on-boot: fire-and-forget `ctx.index()` after the initialize
  handshake so an MCP-only host (no session hook) never recalls against an
  empty/stale index. Opt out with LITECTX_NO_WARM_INDEX.
- Embeddings backfill: a file indexed while the tier was OFF (library default)
  gets its vector on a later ON pass, instead of the content-diff fast-skipping
  it and leaving semantic recall silently dead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c3EffnCPFetsv41LhZcJx
…ill), MCP warm-on-boot

Version bump + docs (CHANGELOG, litectx.context.md MCP section, PRD self-heal
section). Feature commit is eb63955.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c3EffnCPFetsv41LhZcJx
@hamr0
hamr0 merged commit cb70f26 into main Jul 15, 2026
2 checks passed
@hamr0
hamr0 deleted the feat/index-selfheal branch July 15, 2026 10:19
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