Index git history by time window and rank file ownership from authorship - #42
Merged
Conversation
The flat 200-commit cap becomes a persisted history window: 365 days and 10000 commits by default, widen-only, configurable from the MCP reindex action, the REST parse endpoint, and the CLI. Two latent data-loss bugs are fixed along the way: an incremental backlog larger than the cap could skip commits forever, and a forced full reindex silently severed all history edges. A new analyze action, ownership, ranks per-file contributors from the author identity we already index, with honest caveats and history coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 changed
historySinceor largerhistoryMaxCommitsreplays idempotently; narrower values never prune anything. Options flow through the MCPcodebasereindex action, the rawtrigger_reindextool,POST /api/parse/project, and the CLI's--history-since/--history-max-commitsflags, all with strict validation that now rejects impossible calendar timestamps (February 30 no longer silently becomes March 2).analyzeaction:ownership. Per-file contributor rankings from the author identity already indexed on every Commit node, with exact-pair grouping, share percentages, contributor truncation, an unknown-identity count, and honest caveats (inferred authorship, not CODEOWNERS; bots included; renames can split history). Available via MCP andGET /api/analysis/ownership. History coverage across hotspots, change coupling, and ownership now reports the persisted window, withhistoryWindowSizekept one release as a compatibility alias.packages/types(HistoryWindowOptions,HistoryCoverage, ownership result shapes).Verification
Two fixers with disjoint ownership plus orchestrator-frozen types, red-first evidence throughout. Round-1 independent verification against real git fixtures found four blockers (the full-reindex replay cap, the calendar rollover, incoherent zero-commit coverage, and graph-layer limit clamping); all were remediated and round 2 probed the remediation deltas themselves (replay fallbacks, timezone-offset acceptance, strict-limit ripple): ACCEPT, zero blockers, with the reviewer's unmodified probes re-run at exit 0. Merged tree after pulling main: build 21/21 forced, tests 36/36 tasks, typecheck 20/20.
Deliberately not in this PR
~/.codegraph/graphs/(test isolation); one dashboard test fixture describes limit 100 where the live default is 50.🤖 Generated with Claude Code