Commit 4d77d5b
fix(secrets): three correctness fixes on Preview-driven discovery
1. `src/ado/discovery.rs:732` — skip-warning text overclaimed
ado-aw membership.
In `--all-repos` mode the per-status counters
(`skipped_required_params` / `_forbidden` / `_failed`) fired
for every failed Preview, including pipelines that aren't ado-aw
at all. A project with hundreds of non-ado-aw pipelines that
legitimately require `templateParameters` would emit
"Discovery skipped N definitions whose Pipeline Preview requires
templateParameters" when none of them were ado-aw consumers in
the first place. We literally cannot tell which is which without
successful Preview output.
Consolidated the three separate `warn!` messages into one that's
honest about uncertainty ("any ado-aw pipelines among them have
been silently skipped"), with the per-status breakdown demoted to
`debug!` for operators investigating. Counter variables renamed
(`uninspectable_*`) to reflect what they actually count.
2. `src/compile/extensions/mod.rs:130` — `Path::parent()` returns
`Some(Path::new(""))` for bare filenames, not `None`, so the
`unwrap_or(Path::new("."))` fallback never fired for inputs like
`foo.md`. Empty paths passed to `git -C "" remote get-url`
behave differently from `git -C "."`. Match-arm now normalises
both the `None` and empty-`Some` cases to `.`.
3. `src/secrets.rs:202` + `src/ado/discovery.rs` —
`--all-repos --source` could silently exclude every strict
marker when `ctx.org_name()` returned `None` or
`ctx.repo_name` was empty. The existing guard only fired in the
`!all_repos` branch. Extended the guard to fire for any
`--source` invocation when the current `(org, repo)` is
unresolvable, with an actionable error pointing the user to
`--definition-ids` as the escape hatch. New test:
`source_with_all_repos_bails_when_org_url_unresolvable`.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 35124ca commit 4d77d5b
3 files changed
Lines changed: 125 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
709 | 718 | | |
710 | 719 | | |
711 | 720 | | |
| |||
716 | 725 | | |
717 | 726 | | |
718 | 727 | | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
735 | 732 | | |
736 | 733 | | |
737 | 734 | | |
| |||
740 | 737 | | |
741 | 738 | | |
742 | 739 | | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
774 | 772 | | |
775 | 773 | | |
776 | 774 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
217 | 240 | | |
218 | 241 | | |
219 | 242 | | |
| |||
746 | 769 | | |
747 | 770 | | |
748 | 771 | | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
749 | 814 | | |
750 | 815 | | |
751 | 816 | | |
| |||
0 commit comments