Skip to content

Index git history by time window and rank file ownership from authorship - #42

Merged
Phoenixrr2113 merged 2 commits into
mainfrom
batch-b-history-ownership
Aug 24, 2026
Merged

Index git history by time window and rank file ownership from authorship#42
Phoenixrr2113 merged 2 commits into
mainfrom
batch-b-history-ownership

Conversation

@Phoenixrr2113

Copy link
Copy Markdown
Owner

What changed

  • Persisted history window. Git history indexing no longer stops at a flat 200 commits. A new graph resolves its window once (365 days back, 10,000-commit initial-backfill ceiling), persists it on the Project node, and only ever widens: an earlier historySince or larger historyMaxCommits replays idempotently; narrower values never prune anything. Options flow through the MCP codebase reindex action, the raw trigger_reindex tool, POST /api/parse/project, and the CLI's --history-since / --history-max-commits flags, all with strict validation that now rejects impossible calendar timestamps (February 30 no longer silently becomes March 2).
  • Two latent data-loss bugs fixed. An incremental backlog larger than the cap could advance the checkpoint past unprocessed commits, permanently skipping them; incremental sync now processes every commit after the checkpoint. A forced full reindex deleted File nodes and never rebuilt their history edges; it now replays the previously indexed window with no ceiling and restores the checkpoint (live probe: 23 edges before, 23 after, 24 after the next commit).
  • New analyze action: 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 and GET /api/analysis/ownership. History coverage across hotspots, change coupling, and ownership now reports the persisted window, with historyWindowSize kept one release as a compatibility alias.
  • Duplicate git syncs removed: MCP reindex and CLI extract no longer run a second sync with a different cap. A zero-commit repo now reports coherent empty coverage. Shared contracts live in 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

  • No dashboard UI for history options or ownership (dashboard keeps its path-only indexing flow).
  • Ledger: built graph package has extensionless ESM imports blocking direct plain-Node import (pre-existing); symlinked project roots discover zero files (pre-existing); integration suites relocate long temp DB paths into ~/.codegraph/graphs/ (test isolation); one dashboard test fixture describes limit 100 where the live default is 50.

🤖 Generated with Claude Code

Phoenixrr2113 and others added 2 commits August 23, 2026 20:14
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 <[email protected]>
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-landing-page-build Ready Ready Preview, v0 Aug 24, 2026 12:16am

@Phoenixrr2113
Phoenixrr2113 merged commit 4915f38 into main Aug 24, 2026
12 checks passed
@Phoenixrr2113
Phoenixrr2113 deleted the batch-b-history-ownership branch August 24, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant