Commit 08f8447
authored
fix(secrets): address Rust PR review feedback on #624
- `is_direct_match`: return `false` (not `markers.is_empty()`) for the
marker-less case. The previous code returned `true` for 0 markers,
which would misclassify a non-ado-aw definition as `Direct` if any
future caller hit that path. Belt-and-braces — the current callsite
in `classify_definition` already guards against it.
- `discovered_to_matched`: doc-comment claimed `UnknownRequiredParams`
was propagated; implementation drops it. Keep the safer drop
behaviour (we can't act on a marker-less definition) but surface a
`warn!` summary from `resolve_definitions_via_discovery` so
`secrets set --all-repos` operators can see when pipelines were
skipped because of required-template-parameters / 403 / other
preview failures. Doc comment updated to match.
- `AdoContext::repo_url`: percent-encode `project` and `repo_name` so
`DiscoveryScope::CurrentRepo` works for projects whose names contain
reserved characters (e.g. spaces). The lowercase normalize step
can't reconcile a decoded local name with the encoded form ADO
returns in `repository.url`.
- `AdoAwMarkerExtension`: bash-quote-escape the source path embedded
in the runtime `echo` line. A markdown filename containing `'`
(e.g. `agents/foo's.md`) would otherwise produce syntactically
broken bash. New `bash_single_quote_escape` helper applies the
canonical `'\''` idiom; the JSON marker line keeps the raw value
because JSON has no quoting concern with `'`. Two new tests cover
the idiom and a `foo's-agent.md` path.
- `src/detect.rs`: drop the now-stale `#[allow(dead_code)]` attrs on
`MARKER_STEP_PREFIX`, `MarkerMetadata`, and `parse_marker_step`.
All three are actively consumed by `src/ado/discovery.rs`.
- `resolve_for_command`: thread local-lock-file paths into discovery
so the `process.yamlFilename` fast-path can skip Preview calls for
locally-compiled pipelines. Best-effort scan — failures fall back
to Preview-for-everything cleanly.
All 1741 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 bca3f40 commit 08f8447
4 files changed
Lines changed: 149 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
402 | 406 | | |
403 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
404 | 414 | | |
405 | 415 | | |
406 | | - | |
| 416 | + | |
407 | 417 | | |
408 | 418 | | |
409 | 419 | | |
| |||
459 | 469 | | |
460 | 470 | | |
461 | 471 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
467 | 480 | | |
468 | 481 | | |
469 | 482 | | |
470 | | - | |
471 | | - | |
472 | 483 | | |
473 | 484 | | |
474 | 485 | | |
| |||
497 | 508 | | |
498 | 509 | | |
499 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
500 | 517 | | |
501 | 518 | | |
502 | 519 | | |
| |||
507 | 524 | | |
508 | 525 | | |
509 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
510 | 531 | | |
511 | 532 | | |
512 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
513 | 540 | | |
514 | 541 | | |
515 | 542 | | |
516 | 543 | | |
517 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
518 | 565 | | |
519 | 566 | | |
520 | 567 | | |
521 | 568 | | |
522 | 569 | | |
523 | 570 | | |
524 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
525 | 578 | | |
526 | 579 | | |
527 | 580 | | |
| |||
530 | 583 | | |
531 | 584 | | |
532 | 585 | | |
533 | | - | |
534 | | - | |
| 586 | + | |
| 587 | + | |
535 | 588 | | |
536 | 589 | | |
537 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
78 | | - | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
161 | 210 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
144 | | - | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
| |||
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
175 | | - | |
176 | 173 | | |
177 | 174 | | |
178 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
211 | 239 | | |
212 | 240 | | |
213 | 241 | | |
| |||
0 commit comments