Skip to content

gitgalaxy change: what a git change did (repeated renames, debt markers, functions touched) - #8561

Merged
squid-protocol merged 2 commits into
mainfrom
sensors/change-report
Nov 17, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
sensors/change-report

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

New read-only command, gitgalaxy change REPO [--rev REV] [--base REV] [--scan-db DB] [--base-db DB]: what a git change did. From the diff alone: size by role, the call swaps repeated 5 or more times ("repeated renames": skim these), and the TODO/FIXME/HACK/XXX lines added and removed in source files. With --scan-db (a scan of the tree at REV): the functions the change touched and who calls them (caller functions, caller files, one hop out). With --base-db as well: libraries whose coupling moved. No scan output changes, no table or column changes. Follows #8532 (reach) and #8535 (libsurface); tracking issue #8534.

Example, libgit2 8bb32e578: git_odb__hashfile -> git_object_id_from_file x22, 44 of 517 changed lines (all in test files, so renames are counted over every changed file, not only source).

How good is the rename rule (measured before building it in)

Scored against the temporal study's 567 quarterly sweeps in libgit2, redis, curl, libxml2, prometheus and sphinx (every non-merge commit):

  • Lines flagged are nearly always renames in a hand read (about 21 of 24 flags from three repositories; read by one person, small sample).
  • 63% of flagged lines are a pure substitution (85% libgit2, 82% curl, 23% prometheus), so the report says "lines in these swaps", never "mechanical share".
  • It sees at least 90% of a sweep's functions for 57% of sweeps; 188 of the 192 misses are renames that share a line with other call changes or sit in unequal hunks.
  • Two looser rules catch more (72.5% at 90%) but about 2 of 7 of their extra flags were real renames, so the strict rule is the one shipped.
    Method and tables: temporal-crucible docs/sensor-overhaul/sensors/change_aware.md (branch sensor-overhaul).

What is not here

No "while you are here" prompt and no marker ages: both need the scan to store marker positions. The library-coupling section is exercised only by a smoke run (same database as base and after: zero moves); it has no test of its own.

Gates

audit_check clean; change_classifier --check fresh; 7 new tests (tests/tools/test_change_sensor.py) and test_cli_contract.py pass. pr_gates --fast: 8 of 9 pass; affected ran 9,606 tests passing and one failing, test_committed_fidelity_table_is_fresh_against_the_corpus, which compares against a local /nvme-data/projects/keyword-rosetta checkout this PR does not touch; CI will give the clean read.

Type of change

  • Other: new read-only command; no scan output or parsing change

Class / Sibling gaps

Class: post-scan and per-change views built from the diff and the finished master database. Handled here: renames, debt-marker balance, touched functions with callers, library moves. Sibling gaps: (1) marker ages and the "while you are here" prompt (need the engine to persist marker positions); (2) rename detection is line-pair based, so renames mixed with other call edits on one line are mostly missed; (3) --scan-db must be a scan of the tree at REV, and line numbers are matched as given; (4) no CI/PR-comment integration yet; (5) the activity sensor (replacing churn/stability) is separate.

Lessons for agents

  • A # noqa placed after a subprocess.run( argument list on the same physical line swallows the keyword arguments if you paste it into the middle of a line: re-read the call after a lint edit.

🤖 Generated with Claude Code

https://claude.ai/code/session_018srRveGdV73aUiuqkipAic

…rs, functions touched)

New read-only command. From a git diff alone: size by role, the call swaps repeated 5 or more times (a "repeated rename": skim these),
and the TODO/FIXME/HACK/XXX lines added and removed in source files. With --scan-db (a scan of the tree at REV): the functions the change
touched and their caller functions, caller files and one hop out. With --base-db as well: libraries whose coupling moved.
No scan output changes; no engine table changes.

The rename rule was validated against the temporal study's 567 sweeps in six repositories before it was built in; numbers and
limits are in wiki 08-26.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRveGdV73aUiuqkipAic
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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