fix(mcp): report freshness with the indexer's own mtime source (#1714) - #1787
fix(mcp): report freshness with the indexer's own mtime source (#1714)#1787umi008 wants to merge 1 commit into
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
check_index_coverage freshness recomputed mtime_ns from struct stat, which on Windows truncates to seconds, while the indexer records cbm_path_info_utf8's FILETIME-derived nanosecond value. A byte-identical file therefore never matched and every path was reported metadata_changed, so the freshness field carried no signal on Windows. The pipeline incremental change-detection had the same truncation in its hash comparison. Both readers now compare against the same source the writer uses. Fixes DeusData#1714 Signed-off-by: Ulises Millan Guerrero <ulises.millanguerrero@gmail.com>
07abd9b to
455e4fb
Compare
|
Thank you for tracing the Windows freshness mismatch to two different timestamp sources. I checked current I have labeled this as a high-priority Windows parsing and correctness bug and routed it for review. The current CI surface is green. Our review queue is full, so detailed review may take a little time. Thank you for converging the readers on the writer's existing source of truth. |
What does this PR do?
check_index_coveragereportedfreshness: "metadata_changed"for every file on Windows, always — including files checked seconds after a successful full re-index. The freshness reader recomputedmtime_nsfromstruct stat(which on Windows truncates to seconds viast_mtime), while the indexer records the FILETIME-derived nanosecond value fromcbm_path_info_utf8. A byte-identical file therefore never matched, so the freshness field carried no signal and agents following the documented guidance were told to distrust a graph that was actually current.Both readers now compare against the same source the writer uses:
coverage_path_freshness(mcp.c) derives the comparison mtime/size fromcbm_path_info_utf8— the exact function the indexer records from — instead of a platform-dependentstatconversion. The Windows-onlyst_mtimetruncation path is gone.pipeline_incremental.c), where it would mark every file changed on Windows; it now usescbm_path_info_utf8too, on all platforms.Checklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)