Preserve large squash authorship mappings - #1985
Conversation
fb0902e to
5661917
Compare
5661917 to
743a29f
Compare
c1a5643 to
f47f674
Compare
|
Addressed all review findings through current head The final correctness policy distinguishes the ambiguous rewrite shapes instead of treating them uniformly:
The pull fix is a constant-time check of the already-normalized command kind during deferred rewrite handling. It adds no trace2 ingestion-path I/O, Git spawn, object lookup, or ref check. TDD coverage includes a real conflicted Local verification on
Fresh performance matrix:
At large scale the guard discarded all 1,200 bogus leading sources, retained exactly four real mappings, and avoided an estimated ~31 GB of bogus mapped-diff structures while daemon RSS grew by only the 1 MB sampling granularity. Fresh CI and Devin review are now running for |
f47f674 to
1a4a206
Compare
|
Addressed the A rejected trusted boundary no longer aborts rewrite processing. If Added a real-repository TDD regression that first reproduced the fatal bad-revision error, then verifies both fallback mapping and leading-source discard. |
f6ab1fe to
0172107
Compare
0172107 to
3776d87
Compare

Summary
update-ref/ non-fast-forward rewrites up to the historical 64-commit safety boundary, including edited and empty metadata-only sources.<entries after the first confirmed match; those are established between-match squash sources.repro_1985.shto use this checkout'starget/debug/git-aiby default and assert that the divergent prefix is discarded.Correctness model
A rebase may preserve every leading source only when its old range is immutable and scoped to the operation. The daemon derives that boundary without reading mutable repository state at processing time:
HEAD/@parent-ancestry expressions are anchored to the trace2/reflog-captured original tip;--onto;--fork-point,--root, mutable old boundaries used with--onto, and other ambiguous forms fail closed to leading-prefix discard.Generic ref moves do not have equivalent provenance. They retain the old <=64 behavior for real Graphite/update-ref squashes, while the 65th leading unmatched source discards the whole group. Once range-diff establishes a real pair, later unmatched sources keep mapping to the preceding destination as before.
All boundary capture is pure trace2/reflog-derived parsing. This adds no Git spawn, object lookup, ref lookup, or file read to the critical ingestion path. Rewrite processing remains constant-spawn; the large batches changed here use stdin instead of argv.
Regression coverage
commit-tree+update-refleading squashHEAD~Nboundaryrebase --ontothat must not copy old-upstream authorshipValidation
task buildtask fmttask linttask test(2,120 unit tests; 3,250 integration tests passed, 85 intentionally ignored; doctests passed)commit_tree_update_reftest binarymainbash -n repro_1985.shSCALE=small ./repro_1985.sh(150 divergent commits -> 4 real mappings; flat daemon RSS)