Skip to content

gitgalaxy evolution: git-only core -- work mix, sweeps, repairs and their timing, repeat spots, label quality #8716

Open

Description

@squid-protocol

Part of #8715.

What

The gitgalaxy evolution REPO command in git-only mode: gitgalaxy/tools/sensors/evolution.py, registered in gitgalaxy/cli.py, read-only, with --offline, writing <name>_evolution.html, <name>_evolution.json and the shared page template.

Sections (git history only)

At a glance; where the work goes per quarter (organic, sweeps, fixes, mechanical); contributors (active authors, top author's share); fixes that ship with a test; sweeps (largest twelve, fixes that name each as their cause); repairs (lag histogram, cause types, Cc: stable where used); which changes get repaired (by size, commits at least three years old); repeat spots (most repaired functions); how far to trust the report (trailer habits, blame coverage, pairs left out).

Definitions are in the research log section "Accounting for all the work" (docs/sensor-overhaul/sensors/ripple_radius.md, temporal-crucible sensor-overhaul): first match wins among sweep (more than 60 functions), revert, fix with named cause (Fixes: trailer), formatting by subject, fix-like subject (cause by blame, no cause found, or not searched), tests only, comment-only, adds, removes, modifies.

Acceptance

  • Runs on any clone of a C, Go, Python or Rust project; finishes in minutes on a 50,000-commit history; streams commit text instead of holding every message (a 250,000-commit history must not need gigabytes).
  • The page works offline: Chart.js and fonts are vendored or inlined, no CDN request.
  • Correct diff parsing, tested with fixtures: paths with spaces and non-ASCII names, deleted files, renames, content lines that look like diff headers (-- x), binary files, empty repository, repository with no fixes or no trailers.
  • Hostile repository text (a commit subject with </script>, a file name with <, a function name) never reaches the page unescaped; --name and any link base are validated.
  • The cache key covers HEAD, language, parser version and rule tables; writes are atomic; no pickle.
  • Every figure carries its confidence label; sentences that depend on a chart are generated from the repository's own numbers or hidden (a fixed "so what" must never contradict the data shown).
  • Blame-derived figures show their coverage and say they are lower bounds when only a sample was blamed.
  • Tests: the prototype's 10 tests (tools/report/test_evolution.py) plus a JSON schema test and a console-error smoke test of the rendered page.
  • No import of research code (blast_radius, lang_validation, a research "pool" layout); numpy and pandas are not needed.

Self-check (git-only part)

The report validates itself and prints the result in "How far to trust this report": commit count against git rev-list --no-merges; every function edit in exactly one category; work-mix shares add up; fixes matched to a cause (30 pairs to show repair timing, 100 for stable figures). A failed check is shown, never hidden.

Known weak points to carry over from the review

Fix-like subjects miss roughly 8 to 20% of fixes in the remainder (hand checks on two projects, with a narrower rule than the shipped one: re-measure); cause type is read from the first verb of the subject and leaves a large "other"; the repeat-spot share has no baseline; function names come from git diff headers (about one in eight is a neighbour of the function edited).

Activity

  1. added
    enhancement
    metrics
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementmetricspriority: medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions