commitgraph

command module
v0.0.0-...-e9a10d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

commitgraph

A redesign of the AI-coding-tool-attribution data platform previously at this name, now at commitgraph-deprecated. It discovers repositories and developers across git hosting providers, clones repos, detects AI-coding-tool footprints (Claude Code, Cursor, Aider, Codex, Devin, and 10+ others) in commit history, and rolls the results up into per-developer / per-repo / per-tool statistics at the scale of the full public GitHub corpus (the predecessor reached 76.6M commits / 1M+ developers / 98,747 repos before this redesign began).

Why a rewrite, not an iteration

The predecessor's write path (clone-worker → stage → compactor merge → filter-worker detect → aggregator rollup) round-trips every commit through a single serialized SQLite coordination service (queue-api) multiple times per commit, across 9+ concurrently-running pods. That contention was live-verified (2026-08-03/04) as the direct cause of a concrete accuracy problem: a user with 5,000+ real AI commits in the last 30 days saw only ~124 reflected on the public board — partly identity fragmentation, partly up to 24h of aggregation lag, both downstream of the same structural bottleneck. The predecessor's aggregator also suffered five separate OOM-crash incidents over its lifetime, each caused by having to decrypt and materialize large encrypted Parquet partitions in-process to compute a rollup that a proven predecessor system (claude-leaderboard, see docs/research/) had already shown could be maintained incrementally at a fraction of the cost.

This redesign collapses the write path to one hop (clone-worker computes and writes the rollup directly, in the same pass as extraction) backed by a concurrent-writer-safe datastore (Postgres) instead of serialized SQLite, while deliberately preserving the one capability the predecessor's multi-stage design got right that a naive collapse would destroy: retroactive re-detection of AI-tool footprints across already-cloned history when a new tool signature is added, without re-cloning from GitHub.

See docs/plan/plan.md for the full architecture, docs/notes/ for the specific decisions and their rationale, and docs/research/ for the comparative analysis of the claude-leaderboard predecessor that grounded this design in a system already proven at comparable scale.

Status

Design/planning stage — no application code yet. The predecessor (jedarden/commitgraph-deprecated) remains live and running; see its README for current deprecation status. Cutover follows the phased rollout in docs/plan/plan.md (build in isolation → validate → migrate the existing corpus → shadow/dual-write burn-in → cutover → decommission the predecessor).

Structure

  • docs/notes/ — architecture decisions specific to this redesign, and why
  • docs/research/ — comparative analysis of claude-leaderboard, the proven predecessor system this redesign's core patterns are drawn from
  • docs/plan/plan.md — the complete architecture and phased rollout plan

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
audit-log-server command
audit-log-server is a simple HTTP server for audit log queries.
audit-log-server is a simple HTTP server for audit log queries.
audit-logs command
audit-logs is a CLI tool for querying audit logs from the commitgraph database.
audit-logs is a CLI tool for querying audit logs from the commitgraph database.
enum-key-ids command
extract-sample-cache-data command
extract-sample-cache-data extracts a sample of author_login_cache pairs for testing.
extract-sample-cache-data extracts a sample of author_login_cache pairs for testing.
get-audit-logs command
get-audit-logs is a CLI tool for querying exclusion audit logs.
get-audit-logs is a CLI tool for querying exclusion audit logs.
investigate-email-resolution command
investigate checks the current state of email_resolution table
investigate checks the current state of email_resolution table
load-admin-aliases command
load-admin-aliases loads admin-defined user aliases from declarative-config ConfigMap.
load-admin-aliases loads admin-defined user aliases from declarative-config ConfigMap.
load-email-resolution-from-queue-api command
main loads the queue-api email_resolution dump into Postgres via the ingest path.
main loads the queue-api email_resolution dump into Postgres via the ingest path.
migration-worker command
migration-worker runs the corpus migration as a long-lived Deployment with an internal claim/process/sleep loop.
migration-worker runs the corpus migration as a long-lived Deployment with an internal claim/process/sleep loop.
repo-admin command
repo-admin is an internal-only CLI tool for repo-level exclusion operations.
repo-admin is an internal-only CLI tool for repo-level exclusion operations.
seed-author-login-cache command
seed-author-login-cache seeds email_resolution from claude-leaderboard's frozen cache.
seed-author-login-cache seeds email_resolution from claude-leaderboard's frozen cache.
seed-email-resolution command
seed-email-resolution seeds email_resolution from claude-leaderboard's frozen author_login_cache.
seed-email-resolution seeds email_resolution from claude-leaderboard's frozen author_login_cache.
test-db-connection command
test-db-connection tests PostgreSQL database connectivity for commitgraph.
test-db-connection tests PostgreSQL database connectivity for commitgraph.
test-exit-codes command
test-exit-codes tests that RunSafe exits with the correct codes for various scenarios.
test-exit-codes tests that RunSafe exits with the correct codes for various scenarios.
test-panic-recovery command
test-panic-recovery is a test program that verifies panic recovery and error propagation across all error types and scenarios.
test-panic-recovery is a test program that verifies panic recovery and error propagation across all error types and scenarios.
timestamp-verify command
timestamp_verify compares timestamps between source and target databases.
timestamp_verify compares timestamps between source and target databases.
validate-email-resolution command
validate-email-resolution queries and validates email_resolution data
validate-email-resolution queries and validates email_resolution data
validate-signature-catalog command
validate-signature-catalog validates the completeness and consistency of the signature catalog
validate-signature-catalog validates the completeness and consistency of the signature catalog
verify-email-resolution command
verify-email-resolution queries and verifies data integrity in the email_resolution table.
verify-email-resolution queries and verifies data integrity in the email_resolution table.
verify-email-resolution-dump command
main verifies the email_resolution dump and shows statistics.
main verifies the email_resolution dump and shows statistics.
verify-error-propagation command
verify-error-propagation is a comprehensive test program that verifies error propagation across all entry points in the commitgraph project.
verify-error-propagation is a comprehensive test program that verifies error propagation across all entry points in the commitgraph project.
verify-line-numbers command
verify-line-numbers checks the accuracy of line numbers in the signature catalog
verify-line-numbers checks the accuracy of line numbers in the signature catalog
verify-worker-timeouts command
verify-worker-timeouts tests that statement_timeout and lock_timeout actually terminate stuck transactions and do not leave the xmin horizon pinned.
verify-worker-timeouts tests that statement_timeout and lock_timeout actually terminate stuck transactions and do not leave the xmin horizon pinned.
watch-admin-alias-configmap command
watch-admin-alias-configmap watches the admin-alias ConfigMap for changes and re-runs the loader whenever it changes.
watch-admin-alias-configmap watches the admin-alias ConfigMap for changes and re-runs the loader whenever it changes.
containers
examples
pkg
aggregator
Package aggregator provides an example of how to use BuildSnapshotMetadata in the aggregator's publish cycle.
Package aggregator provides an example of how to use BuildSnapshotMetadata in the aggregator's publish cycle.
audit
Package audit provides query functions for the exclusion audit log.
Package audit provides query functions for the exclusion audit log.
cli
Package cli provides standard error handling infrastructure for CLI entry points.
Package cli provides standard error handling infrastructure for CLI entry points.
client/github
Package github provides a client for checking GitHub user login status.
Package github provides a client for checking GitHub user login status.
client/queueapi
Package queueapi provides a client for the queue-api ingest endpoint.
Package queueapi provides a client for the queue-api ingest endpoint.
clierror
Package clierror provides reusable error catching templates and helpers.
Package clierror provides reusable error catching templates and helpers.
errors
Package errors provides CLI error handling utilities.
Package errors provides CLI error handling utilities.
handler
Package handler provides HTTP handlers for the audit log query API.
Package handler provides HTTP handlers for the audit log query API.
identity
Package identity provides bulk identity resolution ingest functionality.
Package identity provides bulk identity resolution ingest functionality.
ingestlog
Package ingestlog provides structured logging for ingest endpoint operations.
Package ingestlog provides structured logging for ingest endpoint operations.
migration
Package migration provides migration progress tracking for corpus partition migration.
Package migration provides migration progress tracking for corpus partition migration.
pg
Package pg provides database access functions for commitgraph Postgres tables.
Package pg provides database access functions for commitgraph Postgres tables.
revalidation
Package revalidation provides the core logic for the login revalidation worker.
Package revalidation provides the core logic for the login revalidation worker.
rollup
Package rollup provides rollup computation for commitgraph.
Package rollup provides rollup computation for commitgraph.
service
Package service provides business logic services for audit log queries.
Package service provides business logic services for audit log queries.
warmstart
Package warmstart implements materialization of git repository warm-start snapshots.
Package warmstart implements materialization of git repository warm-start snapshots.
watcher
Package watcher provides file system watching with debouncing and retry logic.
Package watcher provides file system watching with debouncing and retry logic.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL