Repository navigation
Commit 787a445
refactor(alias)!: source-tag steps and decide EXEC per-step, not per-pipeline
Previously, alias dispatch merged user and project alias bodies through
`append_aliases` and decided EXEC passthrough by checking whether the
project config defined a same-name alias (`project_aliases_contain`).
The lookup was name-keyed and the decision was per-pipeline, so a
same-name collision scrubbed EXEC for the whole merged body — including
the user's own steps.
Mirror the hook resolution shape:
- `SourcedStep` becomes the shared shape for both alias and hook
dispatch (`hook_type` is now `Option<HookType>` so aliases can leave
it `None`).
- `ForegroundStep` carries its own `DirectivePassthrough`, so
`execute_pipeline_foreground` no longer takes a per-pipeline
`directives` argument.
- `sourced_steps_to_foreground(steps, &PipelineKind)` is the single
resolver: hook steps and project-source alias steps get
`inherit_from_env()` (CD only); user-source alias steps get
`inherit_from_env_with_exec()`.
- `prepare_alias_sourced_steps` builds the alias side from per-source
`CommandConfig` lookups, dropping the merged-execution path and the
`project_aliases_contain` name search.
Net behavior change: when both user and project define the same alias,
the user's steps now keep the EXEC relaxation while the project's steps
still scrub. Strictly more permissive than the previous per-pipeline
scrub, which was a conservative side effect of name-keyed merging.
Updated `test_user_and_project_alias_collision_scrubs_exec_directive` →
`test_user_and_project_alias_collision_scrubs_only_project_step` to
assert the new per-step behavior end-to-end.
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent 3648926 commit 787a445
4 files changed
Lines changed: 209 additions & 111 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
50 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | | - | |
53 | 59 | | |
54 | | - | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 286 | | |
292 | 287 | | |
293 | 288 | | |
| |||
546 | 541 | | |
547 | 542 | | |
548 | 543 | | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
559 | 558 | | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | 559 | | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
568 | 596 | | |
569 | 597 | | |
570 | | - | |
| 598 | + | |
571 | 599 | | |
572 | 600 | | |
573 | 601 | | |
574 | | - | |
| 602 | + | |
575 | 603 | | |
576 | 604 | | |
577 | 605 | | |
578 | | - | |
| 606 | + | |
579 | 607 | | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
595 | 618 | | |
596 | 619 | | |
597 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
| |||
92 | 103 | | |
93 | 104 | | |
94 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
95 | 112 | | |
96 | 113 | | |
97 | 114 | | |
| |||
341 | 358 | | |
342 | 359 | | |
343 | 360 | | |
344 | | - | |
345 | 361 | | |
346 | 362 | | |
347 | 363 | | |
348 | 364 | | |
349 | 365 | | |
350 | | - | |
| 366 | + | |
351 | 367 | | |
352 | 368 | | |
353 | 369 | | |
354 | 370 | | |
355 | | - | |
| 371 | + | |
356 | 372 | | |
357 | 373 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 374 | + | |
366 | 375 | | |
367 | 376 | | |
368 | 377 | | |
| |||
383 | 392 | | |
384 | 393 | | |
385 | 394 | | |
386 | | - | |
387 | 395 | | |
388 | 396 | | |
| 397 | + | |
389 | 398 | | |
390 | 399 | | |
391 | 400 | | |
| |||
454 | 463 | | |
455 | 464 | | |
456 | 465 | | |
457 | | - | |
458 | 466 | | |
459 | 467 | | |
| 468 | + | |
460 | 469 | | |
461 | 470 | | |
462 | 471 | | |
| |||
0 commit comments