Overview
Release 0.22.3 replaces the legacy .d dependency-tracking files with a
manifest.json manifest, fixes duplicate file-path entries in the database,
adds daemon mode for background auto-reindexing, and ensures all test fixtures
clean up their index directories after tests.
IMPORTANT: After upgrading, run fw-context index --force on each project
to rebuild the index with the new manifest format and correctly normalized
file paths.
Changes
Features
- manifest.json replaces .d files — a single
manifest.jsonin the index
directory tracks every translation unit: source hashes, header hashes,
generated/SDK markers, and staleness checks. This replaces per-TU.d
files that were scattered across the build tree and often stale.
Thecompile_commands.jsonconfig hash is now the manifest hash, making
staleness detection consistent and reliable. - Daemon mode for background auto-reindex — the MCP server can now run a
background daemon that watches for file changes and reindexes stale
translation units automatically. Controlled via the[daemon]config
section. - manifest.json verification —
fw-context indexrecords a
manifest_verificationstatus (full/partial/unverified) in the
build config, giving tooling visibility into index completeness.
Fixes
- Normalize file paths in files table to prevent duplicates — file paths
are now consistently normalized to project-relative form, preventing the
same file from appearing under both an absolute and relative path in the
files table. - _normalize_file_path resolves project_root before relativizing — fixes
an edge case where a non-resolved root produced incorrect relative paths.
Applied consistently across ops, maintenance, and fallback modules.
Refactoring
- dep_files.py removed (151 lines) — replaced by
indexer/manifest.py
(503 lines). The new module uses content hashing over the source file +
its transitive project headers, with SDK and generated headers excluded
from staleness checks. - All 11 builders updated — each builder (
arduino,cmake,esp_idf,
iar,keil,makefile,manual,mbed_os,platformio,zephyr,
stubs) now generates entries for the manifest during the build step. - Staleness detection rewritten —
shared/stale.pynow uses the manifest
instead of.dfiles, with trusted-SDK-header and generated-header
exclusion logic. - Config hash computation —
config_hash.pynow derives the hash from the
manifest (compiler arguments, source file set), excluding source content
hashes so formatting-only changes don't trigger a full reindex. fw-context init --projectreplaces project-init — theproject-init
command was removed in favor ofinit --project.- MCP server maintenance endpoint —
/maintenancereturns manifest
verification status and stale file details for health-check tooling.
Maintenance
- Test fixtures clean up index directories — 8 class-scoped fixtures in
test_system_indexing.pyand 4 fixtures/tests intest_index_integrity.py
now delete their~/.fw-context/index/<project_id>/directories after
tests finish, preventing accumulation of stale multi-GB test indexes.
Documentation
docs/installation.md— updated for manifest-based workflowdocs/tools.md— updated tool descriptions to reflect new capabilities
New files
| File | Purpose |
|---|---|
src/fw_context_mcp/indexer/manifest.py |
Manifest generation, loading, staleness checks |
tests/test_manifest.py |
335-line test suite for manifest operations |
Removed files
| File | Reason |
|---|---|
src/fw_context_mcp/indexer/dep_files.py |
Replaced by manifest.py |
tests/test_dep_file.py |
Replaced by test_manifest.py |
src/fw_context_mcp/mcp/shared/context.py |
Unused shared context helpers |
Changed files
| File | Change |
|---|---|
src/fw_context_mcp/cli.py |
init --project, daemon control |
src/fw_context_mcp/indexer/builders/*.py |
All 11 builders emit manifest entries |
src/fw_context_mcp/indexer/config_hash.py |
Manifest-based hash |
src/fw_context_mcp/indexer/db.py |
Schema for manifest metadata |
src/fw_context_mcp/indexer/ops.py |
Path normalization, manifest integration |
src/fw_context_mcp/indexer/runner.py |
Manifest generation pipeline |
src/fw_context_mcp/indexer/validator.py |
Manifest-aware validation |
src/fw_context_mcp/mcp/daemon.py |
Background auto-reindex daemon |
src/fw_context_mcp/mcp/handlers/maintenance.py |
Manifest verification, reindex with normalization |
src/fw_context_mcp/mcp/handlers/search.py |
Manifest-aware staleness |
src/fw_context_mcp/mcp/shared/stale.py |
Manifest-based staleness detection |
src/fw_context_mcp/utils.py |
Shared helpers for path ops |
tests/test_incremental_reindex.py |
Expanded reindex coverage with manifest |
tests/test_index_integrity.py |
Manifest verification in integrity tests |
tests/test_system_indexing.py |
Manifest verification + index cleanup |
tests/test_builders/*.py |
Updated for manifest-based builder protocol |
pyproject.toml, server.json, glama.json |
Bump to 0.22.3 |
docs/installation.md, docs/tools.md |
Manifest workflow docs |
Breaking changes
None. The manifest.json is created alongside the existing index database
and is backward-compatible. Existing indexes continue to work, but a
reindex (fw-context index --force) is required to get manifest-based
staleness detection and corrected file paths.
Upgrade instructions
pip install --upgrade fw-context-mcp
fw-context index --force # run in each project root