Commit d3c23c3
authored
fix(secrets): address third-round Rust PR review feedback on #624
- `resolve_definitions_via_discovery`: normalize the user-supplied
`--source` value through `normalize_source_path` before comparing
against `marker.source`. The marker stores the canonical form
(`agents/foo.md`), so without normalization a user typing
`--source ./agents/foo.md` or `--source agents\foo.md` (Windows)
silently matched nothing. Re-export `normalize_source_path` from
`crate::compile` so callers outside the compile module tree can
reach it cleanly. New test asserts the three common variants
(canonical, leading-`./`, backslash) all produce the same normalized
string.
- `classify_definition` / `DiscoveryStatus::NotFound`: 404 from the
Preview endpoint almost certainly means the definition was deleted
between `list_definitions` and `preview_pipeline` (TOCTOU race).
Previously routed through `PreviewFailed`, which inflated
`skipped_failed` counts and confused operators. New
`DiscoveryStatus::NotFound` variant is excluded from skip-warning
counters in `resolve_definitions_via_discovery` and dropped by
`discovered_to_matched` like the other non-actionable statuses.
Debug-logged with the definition id+name so `--debug` users can
still see what happened.
- `DefinitionSummary::revision`: doc comment claimed Preview-driven
discovery uses it as a cache key, but no caching is implemented.
Rewrote to say it's deserialised for a future cache and there is
*no* caching yet, with a clear "see the discovery module for current
behaviour" pointer.
- `DiscoveryScope::Explicit`: clarified the docstring to call out
that no production callsite constructs this variant — `--definition-ids`
uses the legacy `resolve_definitions` path before discovery ever
runs. Variant is kept (not removed and not `#[cfg(test)]`-gated)
because direct API consumers may want to feed pre-filtered IDs into
discovery; the existing unit-test construction stays.
- `secrets::resolve_for_command`: bail early with a targeted error
when `--source` is used without `--all-repos` outside a recognised
ADO repo. The previous behaviour was a generic "No ado-aw pipelines
found via Preview-driven discovery" message that gave no hint that
the empty result was caused by the missing git remote. New error
spells out the cause and suggests `--all-repos`.
All 1746 tests pass; clippy clean on touched files.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>1 parent c762d9a commit d3c23c3
4 files changed
Lines changed: 135 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
83 | 91 | | |
84 | 92 | | |
85 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
| |||
380 | 394 | | |
381 | 395 | | |
382 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
383 | 416 | | |
384 | 417 | | |
385 | 418 | | |
| |||
479 | 512 | | |
480 | 513 | | |
481 | 514 | | |
| 515 | + | |
482 | 516 | | |
483 | 517 | | |
484 | 518 | | |
| |||
538 | 572 | | |
539 | 573 | | |
540 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
541 | 583 | | |
542 | 584 | | |
543 | 585 | | |
544 | | - | |
| 586 | + | |
545 | 587 | | |
546 | 588 | | |
547 | 589 | | |
| |||
552 | 594 | | |
553 | 595 | | |
554 | 596 | | |
555 | | - | |
| 597 | + | |
556 | 598 | | |
557 | 599 | | |
558 | 600 | | |
| |||
592 | 634 | | |
593 | 635 | | |
594 | 636 | | |
595 | | - | |
| 637 | + | |
596 | 638 | | |
597 | 639 | | |
598 | 640 | | |
| |||
804 | 846 | | |
805 | 847 | | |
806 | 848 | | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
807 | 918 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
203 | 217 | | |
204 | 218 | | |
205 | 219 | | |
| |||
0 commit comments