fix(mcp): report freshness with the indexer's own mtime source (#1714) - #1787
Open
umi008 wants to merge 1 commit into
Open
fix(mcp): report freshness with the indexer's own mtime source (#1714)#1787umi008 wants to merge 1 commit into
umi008 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>
umi008
force-pushed
the
fix/issue-1714-freshness-mtime
branch
from
August 22, 2026 02:06
07abd9b to
455e4fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)