Commit 3ca164c
fix: mirror script blob transplant clobbers modern files on stale dep branches
Replace direct blob transplant (update-index --cacheinfo) with diff-and-apply
(git diff dep_base dep_tip | git apply --cached) for M/A files. The old approach
set the index entry to the full blob from dep_tip — which is C's entire file
state plus the bump — so for dep branches far behind main the mirrored PR diff
regressed to ancient file content rather than containing just the bump change.
The new approach applies the semantic diff onto _patched_main's version of each
file: only the bump line changes, everything else stays modern. Falls back to the
old blob transplant when the diff doesn't apply cleanly (e.g. lockfiles whose
surrounding context has diverged; the sweeper's implementation agent handles
lockfile regressions during CI-fix iterations).
Add a prominent IMPORTANT comment block warning future agents not to revert to
blob transplant, and explaining why it's wrong with the concrete observed example
(mdi-react dep branch 1,544 commits behind main, package.json regressed to
name=taskcluster-ui v86).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d448f9f commit 3ca164c
1 file changed
Lines changed: 32 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
227 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
228 | 243 | | |
229 | 244 | | |
230 | 245 | | |
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
239 | 262 | | |
240 | 263 | | |
241 | 264 | | |
| |||
0 commit comments