Commit 9b5a232
fix(secrets): final-round review fixes on Preview-driven discovery
1. `src/ado/discovery.rs::build_lock_path_map` — was hand-rolling the
`\\` → `/` + leading-slash-strip normalisation while the lookup
side used `super::normalize_ado_yaml_path`. Functionally
equivalent today, but the two would silently diverge if
`normalize_ado_yaml_path` ever gained case-folding or
URL-decoding. Route both sides through the shared helper.
2. `src/ado/discovery.rs::resolve_definitions_via_discovery` — in
`--all-repos` mode (no source filter), uninspectable
definitions (`UnknownRequiredParams` / `UnknownForbidden` /
`PreviewFailed`) and `NotAdoAw` / `NotFound` defs were
ending up in the `selected` vec only to be discarded by
`discovered_to_matched`. In a large project where most
definitions are non-ado-aw, this could allocate a vec of
hundreds of dead entries. Push only actionable statuses
(`Direct` / `Consumer`) into `selected`. Counts are still
tallied before the guard so the warning text is unchanged.
3. `src/compile/extensions/ado_aw_marker.rs` — added a trailing
newline (was failing `cargo fmt --check`).
4. `src/ado/discovery.rs::is_direct_match` — expanded the
`markers.len() > 1` comment to explain *why* multiple markers
imply Consumer: a compiled ado-aw pipeline's expanded YAML carries
exactly one marker (its own Setup-job step); more than one means
the YAML was produced by expanding a consumer that
`template:`-includes multiple ado-aw lock files.
5. `src/secrets.rs` — empty-match hints used to lump all three
flag combinations into one of two messages. Factored an
`empty_match_hint(all_repos, source)` helper that branches on
the four `(bool, Option)` cases, so `--source agents/foo.md`
on its own now points the user at `--all-repos` when nothing
matches in the current repo. All three callers (`run_set` /
`run_list` / `run_delete`) consolidated onto the helper.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bac9e6f commit 9b5a232
3 files changed
Lines changed: 138 additions & 86 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
139 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
350 | 355 | | |
351 | 356 | | |
352 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
353 | 364 | | |
354 | 365 | | |
355 | 366 | | |
356 | 367 | | |
357 | 368 | | |
358 | 369 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 370 | + | |
| 371 | + | |
363 | 372 | | |
364 | 373 | | |
365 | 374 | | |
| |||
473 | 482 | | |
474 | 483 | | |
475 | 484 | | |
476 | | - | |
477 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
478 | 491 | | |
479 | 492 | | |
480 | 493 | | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
| 494 | + | |
486 | 495 | | |
487 | 496 | | |
488 | 497 | | |
| |||
679 | 688 | | |
680 | 689 | | |
681 | 690 | | |
682 | | - | |
683 | | - | |
| 691 | + | |
| 692 | + | |
684 | 693 | | |
685 | 694 | | |
686 | 695 | | |
| |||
719 | 728 | | |
720 | 729 | | |
721 | 730 | | |
722 | | - | |
723 | | - | |
724 | | - | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
725 | 735 | | |
726 | 736 | | |
727 | 737 | | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
728 | 741 | | |
729 | 742 | | |
730 | 743 | | |
731 | 744 | | |
732 | 745 | | |
733 | 746 | | |
734 | 747 | | |
735 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
736 | 760 | | |
737 | 761 | | |
738 | 762 | | |
| |||
865 | 889 | | |
866 | 890 | | |
867 | 891 | | |
868 | | - | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
869 | 898 | | |
870 | 899 | | |
871 | 900 | | |
| |||
1149 | 1178 | | |
1150 | 1179 | | |
1151 | 1180 | | |
1152 | | - | |
1153 | | - | |
| 1181 | + | |
1154 | 1182 | | |
1155 | 1183 | | |
1156 | 1184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
127 | 124 | | |
128 | 125 | | |
129 | 126 | | |
| |||
164 | 161 | | |
165 | 162 | | |
166 | 163 | | |
167 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
192 | 207 | | |
193 | | - | |
194 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
195 | 216 | | |
196 | 217 | | |
197 | 218 | | |
| |||
382 | 403 | | |
383 | 404 | | |
384 | 405 | | |
385 | | - | |
386 | | - | |
| 406 | + | |
387 | 407 | | |
388 | 408 | | |
389 | 409 | | |
390 | | - | |
| 410 | + | |
0 commit comments