Repository navigation
Add line origin, origin shares and the labelled before and after changes - #68
Merged
Merged
Conversation
This was referenced Nov 28, 2026
This was referenced Nov 29, 2026
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.
Closes #10
What this changes
Repository and report lanes, spec.md §5.6, §5.7 and §12.
codexray ingestnow fillsline_originandprs;codexray reportfills the origin shares of every finding and map node from them, and buildsbefore_after.jsonwith every module at either date and a labelled list of structural changes.repository/origin.py): every production file at END is blamed with the run's ignore-revs file. Each line range is credited to its landed change: a line last touched on a side branch goes to the first-parent commit that brought it in, so everycommit_shais a row incommits. Era and AI label come from that commit.structural_events(one pull request costs three or more host requests, and these repositories have 6,000 to 13,600 landed changes with a number). Cached inpr-cache/in the run folder. The token is read from the environment variable named insettings/repository.yaml; without it, on another host or offline, the run is still complete and the manifest says how many are missing.report/line_shares.py):Finding.originis taken over the distinct evidence lines that have a recorded origin. The AI-marked share counts strong explicit markers only; lines with only a weak marker are kept apart and named in the note.NodeStats.share_after_2025_03is measured for production files; a run made before line origin existed reports 0 and says it was not measured.analyze/drift.py, a library with no table writes): the newer snapshot measured again with the older snapshot's modules. A layout change is a reorganisation when at least half of its change in exceptions per 1,000 lines, or in links between modules, disappears under the older layout.report/before_after.py): one sharedmodule_orderfrom both dates, cells for every pair with links at either date, and changes of five kinds (layout change per snapshot interval, each structural-event commit, module added, module removed, link added, link removed). Labels follow §12.3 in order: same code under the old layout, a restructuring commit flagged by Stage 1, a dated decision document that names the module's full folder path; otherwise "no stated intent". Thresholds are in the newbefore_after:block ofsettings/report.yaml.check_bundleinscripts/make_fixture_bundle.pynow accepts modules that exist only at the earlier date inbefore_after.json. The fixture bundle is unchanged.What was run and what came out
All on real repositories, in a scratch runs folder.
Ingest, Artemis, twice from scratch (
codexray ingest ... --runs-dir <scratch>, 3 min 20 s and 3 min 37 s):core.db.fingerprintidentical over all tables,manifest.jsonbyte-identical, a third call says "already complete".line_origin: 244,357 ranges covering exactly the 1,029,656 lines insnapshot_files; no gaps or overlaps; 764,060 lines after 2025-03-01 and 265,596 before; 92,743 lines with an explicit AI marker, the rest no AI signal. 62 of 6,258 blamed commits were side-branch commits, all credited to their landed change; none left out.prs: 37 asked for, 37 stored. Without the token: run completes, 0 stored, limit says 37 are missing.line_originrows againstgit blameandgit show(one side-branch row, one after the date with a co-author marker, one before), and twoprsrows againstgh pr view.Report, Artemis, twice: 2,727 files under
web/plusfindings.json, identical hashes. Every file loads through its contract model;check_bundlereports 0 errors on Artemis, Shopware and Graylog (the last two on copies of older runs).git blameby hand match exactly.before_after.json:cellsafter-counts equal themap.jsonedges;module_orderholds every module of both dates once (89, 149, 110).make checkpasses.Not reproduced, not done
codexray judge) #8). A report limit says a change labelled no stated intent may still have a stated goal in its pull request.tests/analyze/test_drift.pyandtests/report/test_before_after.py; TEAM_RULES.md rule 3 replaces them with the runs above.For reviewers
line_origin.commit_shais the landed first-parent change, not the raw blamed commit.web/src/screens/BeforeAfter.tsx); the web app does not showorigin.note.Checks
make checkpassessettings/core/contracts.py,core/schema/orcore/runs.py