Detect same-timestamp source changes with verified hashes#1051
Merged
Conversation
Owner
Author
Review contextPR #1051 closes the same-timestamp freshness child #1050 without closing the broader content/completeness program in #911. I independently reviewed exact head Review scope
Disposition
This review validates the code contract and reviewer navigation. It does not replace the pending hosted macOS evidence or turn the disclosed retrieval-timing warning into a release-performance claim. |
7 tasks
TheGreenCedar
marked this pull request as ready for review
July 13, 2026 13:58
This was referenced Jul 13, 2026
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.
Context
Closes #1050
Refs #911
Refs #899
CodeStory's incremental refresh planner decides whether a stored file projection must be rebuilt. #978 made parser-backed projections carry a verified SHA-256 identity for the source bytes that produced them, but planning still treated a matching millisecond modification time as unchanged. Multiple writes inside one timestamp tick—or a coarse filesystem clock—could therefore leave stale graph data current even though the store had a stronger identity available.
This PR owns only the planner-side same-timestamp gap. It does not close the broader freshness and completeness contract in #911.
Outcome
When a parser-backed row has a verified source hash and its mtime matches, refresh planning now verifies the current bytes and schedules reindexing on a mismatch or unstable read. Rows without verified parser identity preserve the existing metadata fallback.
What changed
How to review
crates/codestory-contracts/src/workspace.rsandcrates/codestory-store/src/file_store.rsfor the compact inventory boundary and bulk-load behavior.stored_file_needs_indexandcurrent_content_hashincrates/codestory-workspace/src/lib.rsfor precedence, fallback, and fail-closed reads.72c674e5+1050wtrows indocs/testing/codestory-e2e-stats-log.mdfor behavior and measured evidence.Verification
cargo fmt --all -- --check— passed.cargo test -p codestory-contracts --locked— 28 passed.cargo test -p codestory-store --locked inventory_retries_file_errors_but_not_parser_partial_coverage— passed.cargo test -p codestory-workspace --locked incremental_refresh_detects_changed_content_with_matching_mtime— passed.cargo test -p codestory-workspace --locked incremental_refresh_uses_millisecond_precision_for_unchanged_files— passed.cargo check --workspace --locked— passed.cargo test --workspace --locked— passed on macOS after rebasing onto merged PR Make macOS a release-gated supported platform #1048.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings— passed.cargo build --release -p codestory-cli— passed.codestory_repo_e2e_statsgate — 2 passed withproof_tier=full_sidecar, explicit CPU allowance, and the real-repository drill intentionally skipped. The run recorded 19.72 s initial indexing, 17.86 s repeat refresh, 31.65 s retrieval indexing, 2.23 s report generation, 148,437 nodes, 123,824 edges, 307 files, zero index errors, and 1,007 dense anchors.node .github/scripts/check-doc-links.mjs— 69 files and 281 links passed.git diff --check— passed.Risk or follow-up
read:projectscope to discover a separate board safely.