Repository navigation
feat(mcp): get_why on a directory reports its files' git history - #4356
Merged
Merged
Conversation
Git metadata is stored per file, so a directory target always read "No git history" and a directory with no decision and no checkout copy read "Path not found". A directory's origin story is built from the non-excluded files under it: how many have history, the first and last commit dates, and their stored key commits once each, with no commit count or owner claimed. A path with no stored rows says no history is indexed for it.
This was referenced Oct 21, 2026
swati510
approved these changes
Oct 22, 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.
What
get_whyon a directory (for examplepackages/core/src/repowise/core/policy) returnedorigin_story: {available: false, summary: "No git history ..."}although every file under it has commits. Git metadata is stored per file, so a directory never matched a row. Multi-target cards had the same false line, and a directory with no decision and no checkout copy was reported as "Path not found".How
scope: "directory",files_with_history, first and last commit dates, and the newest stored key commits, each SHA once. No commit count, owner or age is claimed, since per-file totals do not add up to a directory's.get_whyindocs/agent/MCP_TOOLS.md.Verification
packages/core/src/repowise/core/policy: before, "No git history available"; after, 4 files, first commit 2026-10-14, last 2026-10-20, key commits 2f77936, 25bfd42, 2b6e113, 93469aa.git log -- <dir>lists exactly those 4 commits on those dates.git login UTC) and a 73-file package directory (71 files with stored rows, one commit, date agrees).tests/unit/server/mcp3360 passed, plus directory fixtures for the path mode, target cards, shared-commit dedup, excluded files, sibling prefixes (src/dbvssrc/dbx) and./, backslash and root inputs.