Commit e6fa4c9
Fix e2e test conflict scenario and improve action debugging (#6)
* Fix e2e test conflict scenario and improve action debugging
- Expand test file from 3 to 7 lines to avoid git treating adjacent
line changes as overlapping hunks (was causing spurious conflicts)
- Use line 7 instead of line 3 for conflict test (more separation)
- Fix $CHILD -> $BRANCH typo in conflict resolution instructions
- Add explicit branch parameter to gh pr comment/edit commands
- Add pipefail to catch pipeline failures
- Wrap git merge --abort and gh commands in log_cmd for visibility
- Add debug output at script start for troubleshooting
* Fix e2e test failures and action bugs
Test fixes:
- Expand test file from 3 to 7 lines to avoid git's adjacent-line
conflict heuristic causing spurious merge conflicts
- Use line 7 instead of line 3 for conflict scenario testing
- Fix conflict resolution: use deterministic file creation instead
of buggy sed-based conflict marker removal
- Add PRESERVE_ON_FAILURE option for debugging failed tests
- Use fail_test() wrapper for proper cleanup flag handling
Action fixes:
- Fix $CHILD -> $BRANCH typo in conflict resolution instructions
- Add explicit branch parameter to gh pr comment/edit commands
to ensure they work correctly in GitHub Actions context
- Create autorestack-needs-conflict-resolution label before adding
it to PR (gh pr edit --add-label fails if label doesn't exist)
- Add pipefail to catch pipeline failures
- Wrap git merge --abort and gh commands in log_cmd for visibility
* Refactor e2e test script
- Remove fail_test helper and TEST_FAILED mechanism since the script
uses 'set -e', so failures exit automatically. Use exit code in
cleanup trap instead.
- Replace hardcoded conflict resolution with 'git checkout --ours'
which correctly preserves feature3's changes to both line 2 and
line 7
- Remove redundant 'git pull origin main' commands since we use
'origin/main' references directly and don't need local main updated
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent f79392b commit e6fa4c9
2 files changed
Lines changed: 38 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
| |||
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| |||
196 | 206 | | |
197 | 207 | | |
198 | 208 | | |
199 | | - | |
| 209 | + | |
| 210 | + | |
200 | 211 | | |
201 | 212 | | |
202 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
203 | 218 | | |
204 | 219 | | |
205 | 220 | | |
| |||
337 | 352 | | |
338 | 353 | | |
339 | 354 | | |
340 | | - | |
341 | | - | |
342 | 355 | | |
343 | 356 | | |
344 | 357 | | |
| |||
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
401 | | - | |
| 414 | + | |
402 | 415 | | |
403 | | - | |
| 416 | + | |
404 | 417 | | |
405 | | - | |
| 418 | + | |
406 | 419 | | |
407 | 420 | | |
408 | | - | |
| 421 | + | |
409 | 422 | | |
410 | | - | |
| 423 | + | |
411 | 424 | | |
412 | | - | |
| 425 | + | |
413 | 426 | | |
414 | 427 | | |
415 | 428 | | |
| |||
501 | 514 | | |
502 | 515 | | |
503 | 516 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | 517 | | |
508 | 518 | | |
509 | 519 | | |
| |||
515 | 525 | | |
516 | 526 | | |
517 | 527 | | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
523 | 531 | | |
524 | 532 | | |
525 | 533 | | |
| |||
534 | 542 | | |
535 | 543 | | |
536 | 544 | | |
537 | | - | |
538 | | - | |
539 | 545 | | |
540 | 546 | | |
541 | 547 | | |
| |||
551 | 557 | | |
552 | 558 | | |
553 | 559 | | |
554 | | - | |
| 560 | + | |
555 | 561 | | |
556 | 562 | | |
557 | | - | |
| 563 | + | |
558 | 564 | | |
559 | 565 | | |
560 | 566 | | |
561 | | - | |
| 567 | + | |
562 | 568 | | |
563 | 569 | | |
564 | 570 | | |
565 | | - | |
| 571 | + | |
566 | 572 | | |
567 | 573 | | |
568 | 574 | | |
569 | 575 | | |
570 | 576 | | |
571 | 577 | | |
572 | | - | |
| 578 | + | |
573 | 579 | | |
574 | 580 | | |
575 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
0 commit comments