Skip to content

feat(cli): add ado-aw enable#583

Merged
jamesadevine merged 4 commits into
mainfrom
feat/cli-enable
May 17, 2026
Merged

feat(cli): add ado-aw enable#583
jamesadevine merged 4 commits into
mainfrom
feat/cli-enable

Conversation

@jamesadevine
Copy link
Copy Markdown
Collaborator

Summary

Implements PR 2 of the Phase 1 CLI overhaul (the pipeline-lifecycle family alignment with gh aw).

Adds ado-aw enable [PATH] — registers an ADO build definition for each compiled pipeline discovered in the local repo and ensures it is enabled. Operates only on local fixtures (same auto-discovery as compile) plus a single list_definitions snapshot for the already-exists check.

Builds on PR 1 (#580), which extracted the shared src/ado/ REST helpers. This PR fills in four of the eight stubs that #580 introduced: get_repository_id, create_definition, patch_queue_status, and get_definition_full.

CLI surface

ado-aw enable [PATH]
  --org <url-or-name>          # default: from git remote
  --project <name>             # default: from git remote
  --pat <pat>                  # else AZURE_DEVOPS_EXT_PAT, else az CLI
  --folder <ado-folder>        # default: "\"; applied on create only
  --default-branch <ref>       # default: "refs/heads/main"
  --dry-run
  --also-set-token             # after each create, set GITHUB_TOKEN
  --token <value>              # only with --also-set-token

Behaviour per fixture

  1. Parse front matter; sanitize the raw name: for ADO display.
    • Strips ADO-forbidden chars < > | : " * ? \
    • Collapses internal whitespace runs to a single space
    • Trims trailing . (also forbidden by ADO)
    • Caps at 255 chars
    • Falls back to "pipeline" if empty after sanitization
  2. Compute yamlFilename from the compiled .lock.yml path (leading slash, forward slashes).
  3. Match against the cached list_definitions result: yaml-path first, then sanitized-name. First match wins.
  4. Decide:
    • No match → POST a new TfsGit definition with queueStatus: "enabled". Print ✓ registered + enabled: <name> (id=N) ← <yamlPath>.
    • Match + queueStatus == "enabled" → skip. Print ↻ already enabled: <name> (id=N).
    • Match + other status → PUT the round-tripped definition with queueStatus: "enabled". Print ▶ enabled: <name> (id=N, was <status>).
  5. If --also-set-token and a new definition was created, call update_pipeline_variable(id, "GITHUB_TOKEN", token, isSecret=true) afterwards. Token resolves from --token$GITHUB_TOKEN → interactive prompt.
  6. Fail-soft per fixture (✗ failed: <source>: <error>), exit non-zero if any fixture failed.

GitHub-source guard (Phase 1)

Phase 1 only supports ADO Git source repositories — the registered definition's repository.name comes from the local git remote, and we don't yet have the wiring to fetch a GitHub repository's GUID through ADO's service-connection layer. If parse_ado_remote(remote) fails we exit with:

This command requires an Azure DevOps Git remote.
The current remote is <url>.
Phase 1 of `ado-aw enable` does not yet support GitHub-hosted source
repos. Follow https://github.com/githubnext/ado-aw/issues for the
GitHub-source follow-up.

This unblocks the AgentPlayground smoke registration as a clearly-scoped follow-up rather than a silent gap.

Verified

  • cargo build
  • cargo clippy --all-targets --all-features ✅ (no new findings)
  • cargo test ✅ (1604 tests, all green; 21 new unit tests in enable.rs, 2 new in tests/enable_integration.rs, 2 new in src/ado/mod.rs for the queueStatus field)
  • cargo test --test bash_lint_tests
  • Manual smoke: ado-aw enable --help advertises the documented surface.
  • Manual smoke: running ado-aw enable --dry-run --org fake --project fake --pat dummy from this GitHub-hosted repo correctly bails with the Phase 1 guard message.

Out of scope

PRs 3–8 (disable / remove / list / run / status / secrets), PR 9 (help-text grouping), and PR 10 (doc overhaul) land in follow-up PRs from the Phase 1 plan.

Implements PR 2 of the Phase 1 CLI overhaul: registers an ADO build
definition for each compiled pipeline discovered in the local repo and
ensures it is enabled.

Behaviour per fixture:

- Parse front matter; sanitize the raw `name:` for ADO display (strips
  forbidden chars, collapses whitespace, trims trailing `.`, caps 255
  chars, falls back to `pipeline` if empty).
- Compute `yamlFilename` from the compiled `.lock.yml` path (leading
  slash, forward slashes).
- Match against a single `list_definitions` snapshot: yaml-path first,
  then sanitized-name. First match wins.
- If no match: POST a new definition with `queueStatus=enabled`.
- If matched + `queueStatus == enabled`: skip.
- If matched + other status: PUT the round-tripped definition with
  `queueStatus=enabled`.
- Fail-soft per fixture; exit non-zero if any fixture failed.

GitHub-source guard: Phase 1 only supports ADO Git source
repositories. If the local git remote does not parse as ADO we bail
with a follow-up pointer instead of silently mis-registering.

Implements the `get_repository_id`, `create_definition`,
`patch_queue_status`, and `get_definition_full` stubs in
`src/ado/mod.rs` that PR 1 (#580) introduced. Extends
`DefinitionSummary` with the `queueStatus` field that
`list_definitions` already requests via `includeAllProperties=true`.

CLI surface:

    ado-aw enable [PATH] --org --project --pat --folder
                        --default-branch --dry-run --also-set-token
                        --token

Tests:

- Unit (enable.rs): sanitize_ado_display_name (illegal chars, trailing
  dot, length cap, empty fallback, whitespace collapse, safe content),
  compute_yaml_filename (leading slash, preservation, backslash
  normalization), decide_action (no match, yaml match overrides name
  mismatch, name match when yaml missing, enable-existing for
  disabled/paused/missing status, normalization of ADO yaml paths),
  build_create_body snapshot, resolve_token_arg validation.
- Unit (ado/mod.rs): DefinitionSummary queueStatus serde round-trip.
- Integration (tests/enable_integration.rs): `--help` advertises the
  documented surface; clap rejects `--token` without
  `--also-set-token`.

Out of scope for this PR: `disable` / `remove` / `list` / `run` /
`status` / `secrets` (PRs 3-8), help-text grouping (PR 9), and doc
overhaul (PR 10).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Rust PR Review

Summary: Looks good overall — clean design, solid test coverage, well-scoped Phase 1 guard. Two items worth addressing before merge.


Findings

🐛 Bugs / Logic Issues

  • src/ado/mod.rsget_repository_id: NON_ALPHANUMERIC over-encodes URL path segments

    percent_encoding::utf8_percent_encode(repo_name, percent_encoding::NON_ALPHANUMERIC)

    NON_ALPHANUMERIC encodes every character that isn't [A-Za-z0-9], so a repo named my-project becomes my%2Dproject in the URL, and ado.aw becomes ado%2Eaw. Hyphens, underscores, dots, and tildes are all RFC 3986 unreserved characters and must not be encoded in a path segment. ADO typically normalises percent-encoding before matching, so this is unlikely to cause a 404 in practice, but it is non-standard and could break against a strict reverse-proxy or future ADO API version.

    Fix: define a custom AsciiSet that preserves unreserved characters:

    use percent_encoding::{AsciiSet, CONTROLS, utf8_percent_encode};
    const PATH_SEGMENT: &AsciiSet = &CONTROLS
        .add(b' ').add(b'"').add(b'#').add(b'<').add(b'>').add(b'?').add(b'`')
        .add(b'{').add(b'}').add(b'/').add(b'%').add(b'@').add(b':').add(b'!');
    // Then:
    utf8_percent_encode(repo_name, PATH_SEGMENT)

    This preserves -, _, ., ~ while still encoding everything that must be encoded in a path segment.

⚠️ Suggestions

  • src/enable.rsexpect() in a production code path

    let token = github_token
        .as_deref()
        .expect("resolve_token_arg returns Some when also_set_token is true");

    The invariant is provably sound (if also_set_token is true, resolve_token_arg returns Some or already returned Err). But project convention forbids expect()/unwrap() on user-facing code paths. Consider replacing with unreachable!("...") (which better signals this branch is a compiler-provable impossibility) or restructuring slightly so the borrow checker sees the Some:

    let Some(token) = github_token.as_deref() else {
        unreachable!("resolve_token_arg guarantees Some when also_set_token is true");
    };

✅ What Looks Good

  • Pure-function designdecide_action, build_create_body, and sanitize_ado_display_name are all network-free, side-effect-free, and snapshot-tested. Exactly the right structure for a CLI that talks to an external API.
  • decide_action yaml-path-first matching — the yaml-path-wins-over-name tie-breaking is sound and the normalization via normalize_ado_yaml_path catches the backslash/leading-slash variants ADO returns in the wild.
  • queue_status: None → not-enabled default — correctly treat missing queueStatus as "not confirmed enabled", with clear "unknown" reporting. Tested.
  • GitHub-source guard — the Phase 1 scope is clearly communicated in the error message with a follow-up issue link. Right call to fail-fast here rather than silently skipping.
  • Error handling — consistent use of .with_context() and anyhow::bail! throughout; no silent unwraps on fallible network paths.
  • Fail-soft per fixture + non-zero exit — the right UX pattern for a multi-target CLI command.
  • 21 unit tests + 2 integration tests — strong coverage of the pure decision logic, including the None-status and backslash-normalization edge cases.

Generated by Rust PR Reviewer for issue #583 · ● 759.5K ·

Addresses both findings from the Rust PR Reviewer on #583:

1. `src/ado/mod.rs` — `get_repository_id` was using
   `percent_encoding::NON_ALPHANUMERIC`, which over-encodes RFC 3986
   unreserved characters in URL path segments. Repository names like
   `my-repo` would have rendered as `my%2Drepo` in the request path.
   ADO normalises percent-encoding before matching, so this did not
   cause a visible 404 in practice, but it is non-standard and could
   break against a strict reverse-proxy or future API version.

   Introduces a `PATH_SEGMENT` `AsciiSet` that preserves `-`, `_`, `.`,
   and `~` (and ASCII alphanumerics) while still encoding spaces,
   reserved punctuation (`/ ? # @ : !`), control characters, and
   non-ASCII bytes. Added three new unit tests covering the unreserved
   set, reserved punctuation, and non-ASCII path segments.

2. `src/enable.rs` — replaced the `.expect()` on the
   `also_set_token`-invariant token unwrap with a `let-else +
   unreachable!()` so the borrow checker proves the branch is
   impossible rather than panicking at runtime if the invariant is
   ever broken in a future refactor.

cargo test (1607 tests) and cargo clippy --all-targets --all-features
both clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Rust PR Review

Summary: Solid architecture with one correctness bug in the matching logic and a minor UX issue. The design choices (pure functions, fail-soft, clear error messages) are excellent.

Findings

🐛 Bugs / Logic Issues

  • src/enable.rsdecide_action doesn't implement yaml-path-first precedence (the main finding)

    The PR description and doc comment both state "yaml-path first, then exact name match". But the implementation iterates the ADO definition list once and short-circuits on path_match || name_match for each definition:

    if path_match || def.name == sanitized_name {
        matched = Some(def);
        break;
    }

    When two different definitions match via different criteria — e.g. definition A (earlier in the ADO list) matches by sanitized name, and definition B (later in the list) matches by yaml path — definition A wins, violating the intended precedence. The correct implementation is two sequential passes:

    // Pass 1: yaml-path only
    let matched = definitions.iter().find(|def| {
        def.process.as_ref()
            .and_then(|p| p.yaml_filename.as_ref())
            .map(|f| normalize_ado_yaml_path(f) == target_path)
            .unwrap_or(false)
    });
    // Pass 2: name only (fallback)
    let matched = matched.or_else(|| definitions.iter().find(|def| def.name == sanitized_name));

    The existing unit tests don't exercise the ambiguous case (one definition matches by name, a different one matches by path), so this slips through.

⚠️ Suggestions

  • src/enable.rs:601 — token is prompted even during --dry-run

    resolve_token_arg is called before the dry-run path diverges. If a user runs ado-aw enable --also-set-token --dry-run, they'll be interactively prompted for a GITHUB_TOKEN even though nothing is posted to ADO. The token resolution should be deferred to after the dry-run gate, or --dry-run should skip token resolution entirely (since --also-set-token is silently suppressed anyway on dry runs):

    let github_token = if opts.dry_run {
        None
    } else {
        resolve_token_arg(opts.also_set_token, opts.token)?
    };

✅ What Looks Good

  • Architecture: Separating decide_action, sanitize_ado_display_name, build_create_body, and compute_yaml_filename as pure functions is excellent design — it makes the business logic testable without any network mocking, and the test coverage reflects that well.
  • GitHub-source guard: The Phase 1 gate error message is clear and actionable.
  • Error handling: Context strings throughout (with_context, anyhow::bail!) are descriptive and operator-friendly.
  • PATH_SEGMENT encoding: Well-documented, RFC 3986 correct, and tested with good cases including non-ASCII.
  • get_definition_full error hint: The "This usually means the PAT is invalid or expired" hint in the JSON parse error context is a nice UX touch.
  • Fail-soft + exit-nonzero pattern: Exactly right for a batch CLI over multiple fixtures.

Generated by Rust PR Reviewer for issue #583 · ● 807.5K ·

@jamesadevine
Copy link
Copy Markdown
Collaborator Author

@copilot address feedback and suggestions

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

@copilot address feedback and suggestions

Addressed all four findings from the automated reviews in commit 6c7db5f:

  1. PATH_SEGMENT over-encoding — custom AsciiSet preserving RFC 3986 unreserved chars (-, _, ., ~) was already fixed in c255b6b.
  2. expect() in production code — already replaced with unreachable!() in c255b6b.
  3. decide_action single-pass precedence bug — rewrote to two sequential passes (yaml-path first, then name fallback) so a path match on a later definition always wins over a name match on an earlier one. Added a test covering the previously-uncovered ambiguous case.
  4. Token prompted during --dry-runresolve_token_arg is now skipped entirely when --dry-run is set; --also-set-token is silently suppressed on the dry-run path anyway.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/githubnext/ado-aw/issues
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1d13xskorij5fqbwq626c9wk6.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1n3b3mgg5wicgeukg9n4427nm.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1n5byta5aujhkl6cewwxpl7u4.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1vy5j90gtucuzu1d2b6ppfuhg.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.229318lof2c188p0yv6s2l5km.050bfji.rcgu.o p37ogihap3ig6hh308z.1wh4qe0.rcgu.o qvseffdkndnkhxhff4g.1wh4qe0.rcgu.o fltdes3f0edpkv4yf2a.1wh4qe0.rcgu.o akly42dpfw3k15d1yx5.1wh4qe0.rcgu.o gp03fchodepel6au7m9.1wh4qe0.rcgu.o n6tbw8imkhacdkz2rhi.1wh4qe0.rcgu.o 62pfyvvad8i8yq47ay9.1wh4qe0.rcgu.o vuujp8c71r3m5a3ebg9.1wh4qe0.rcgu.o b9i81dqatl7h2iynjsq.1wh4qe0.rcgu.o 4o44f5v6tc5eniwt5up.1wh4qe0.rcgu.o qnqebhcbvrkk1qnusat.1wh4qe0.rcgu.o cbbrg67nfcdewzcqc87.1wh4qe0.rcgu.o jf82oo0dqutlpvohbt0.1wh4qe0.rcgu.o 22oecq3tg84vv5jynzk.1wh4qe0.rcgu.o (http block)
  • spsprodeus21.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1d13xskorij5fqbwq626c9wk6.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1n3b3mgg5wicgeukg9n4427nm.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1n5byta5aujhkl6cewwxpl7u4.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1vy5j90gtucuzu1d2b6ppfuhg.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.229318lof2c188p0yv6s2l5km.050bfji.rcgu.o p37ogihap3ig6hh308z.1wh4qe0.rcgu.o qvseffdkndnkhxhff4g.1wh4qe0.rcgu.o fltdes3f0edpkv4yf2a.1wh4qe0.rcgu.o akly42dpfw3k15d1yx5.1wh4qe0.rcgu.o gp03fchodepel6au7m9.1wh4qe0.rcgu.o n6tbw8imkhacdkz2rhi.1wh4qe0.rcgu.o 62pfyvvad8i8yq47ay9.1wh4qe0.rcgu.o vuujp8c71r3m5a3ebg9.1wh4qe0.rcgu.o b9i81dqatl7h2iynjsq.1wh4qe0.rcgu.o 4o44f5v6tc5eniwt5up.1wh4qe0.rcgu.o qnqebhcbvrkk1qnusat.1wh4qe0.rcgu.o cbbrg67nfcdewzcqc87.1wh4qe0.rcgu.o jf82oo0dqutlpvohbt0.1wh4qe0.rcgu.o 22oecq3tg84vv5jynzk.1wh4qe0.rcgu.o (dns block)
  • spsprodweu4.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1d13xskorij5fqbwq626c9wk6.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1n3b3mgg5wicgeukg9n4427nm.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1n5byta5aujhkl6cewwxpl7u4.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.1vy5j90gtucuzu1d2b6ppfuhg.050bfji.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716c46d4.229318lof2c188p0yv6s2l5km.050bfji.rcgu.o p37ogihap3ig6hh308z.1wh4qe0.rcgu.o qvseffdkndnkhxhff4g.1wh4qe0.rcgu.o fltdes3f0edpkv4yf2a.1wh4qe0.rcgu.o akly42dpfw3k15d1yx5.1wh4qe0.rcgu.o gp03fchodepel6au7m9.1wh4qe0.rcgu.o n6tbw8imkhacdkz2rhi.1wh4qe0.rcgu.o 62pfyvvad8i8yq47ay9.1wh4qe0.rcgu.o vuujp8c71r3m5a3ebg9.1wh4qe0.rcgu.o b9i81dqatl7h2iynjsq.1wh4qe0.rcgu.o 4o44f5v6tc5eniwt5up.1wh4qe0.rcgu.o qnqebhcbvrkk1qnusat.1wh4qe0.rcgu.o cbbrg67nfcdewzcqc87.1wh4qe0.rcgu.o jf82oo0dqutlpvohbt0.1wh4qe0.rcgu.o 22oecq3tg84vv5jynzk.1wh4qe0.rcgu.o (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@jamesadevine
Copy link
Copy Markdown
Collaborator Author

/rust-review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 17, 2026

Rust PR Reviewer completed successfully!

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Rust PR Review

Summary: Solid implementation overall — the logic is clean, test coverage is good, and error handling follows project conventions. One concrete bug in name sanitization and a couple of smaller observations.

Findings

🐛 Bugs / Logic Issues

  • src/enable.rs:62-63sanitize_ado_display_name: trailing-dot trim happens before 255-char cap, so truncation can reintroduce a trailing dot

    let trimmed = collapsed.trim_end_matches('.').to_string(); // e.g. 300 chars, no trailing '.'
    let bounded: String = trimmed.chars().take(255).collect(); // char 255 might be '.'

    Concrete example: a name like "a".repeat(254) + ".extra" survives trim_end_matches('.') intact (it doesn't end in .), but after .take(255) the result is "a".repeat(254) + "." — 255 chars ending in ., which ADO rejects. Fix: apply trim_end_matches('.') again after capping, and re-check for empty:

    let bounded: String = trimmed.chars().take(255).collect();
    let bounded = bounded.trim_end_matches('.');
    if bounded.is_empty() { "pipeline".to_string() } else { bounded.to_string() }

⚠️ Suggestions

  • src/enable.rs:183-185unreachable! is correct but fragile: The invariant ("resolve_token_arg guarantees Some when also_set_token is true") holds today because github_token is None only on dry_run and this block is guarded by !opts.dry_run. An expect("invariant: github_token is Some when also_set_token && !dry_run") would be marginally more self-documenting and produces a useful panic message instead of a bare unreachable for future maintainers.

  • src/enable.rs:293--dry-run silently skips --also-set-token: The dry-run path for process_one correctly emits [dry-run] would create / would enable messages, but if --also-set-token --dry-run is combined there is no message showing what token-setting would have been done. Low priority, but a "[dry-run] would set GITHUB_TOKEN on N newly-created definitions" line after the loop would give operators a full picture.

  • src/ado/mod.rs:832-834ctx.project is unencoded in the new URLs: percent_encoding::utf8_percent_encode is now applied to repo_name (new PATH_SEGMENT const, well-justified in the comment), but ctx.project in the same format! calls is still raw. This matches the pre-existing pattern throughout src/ado/mod.rs and ADO project names very rarely contain path-unsafe characters, so this isn't new breakage — but now that the PATH_SEGMENT constant exists it would be cheap to encode ctx.project too for consistency and correctness with unusual project names.

✅ What Looks Good

  • The two-pass decide_action (yaml-path first, then name) is correctly reasoned and well tested — including the tricky case where a name match on definition A appears before a path match on definition B.
  • build_create_body as a pure function makes snapshot testing straightforward and keeps the HTTP logic separate.
  • GitHub-source guard is explicit and surfaces a clear, actionable error rather than a silent gap.
  • PATH_SEGMENT encoding is carefully justified in the comment and the three unit tests cover RFC 3986 unreserved chars, reserved chars, and non-ASCII — exactly the right set.
  • Error messages throughout are actionable (include the relevant name/ID in context), following project conventions.

Generated by Rust PR Reviewer for issue #583 · ● 1.3M ·

@jamesadevine
Copy link
Copy Markdown
Collaborator Author

@copilot address feedback and suggestions

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

@copilot address feedback and suggestions

Addressed in commit 6b44219:

  1. sanitize_ado_display_name trailing-dot bug — applied trim_end_matches('.') a second time after the 255-char cap. A name like "a".repeat(254) + ".extra" previously produced "a".repeat(254) + "." after truncation; now it correctly yields "a".repeat(254). Added sanitize_truncation_does_not_leave_trailing_dot test covering this case.

  2. ctx.project encoding in new API functions — applied PATH_SEGMENT encoding to ctx.project in all four new functions (get_repository_id, get_definition_full, patch_queue_status, create_definition) for consistency with the repo_name encoding already in place.

  3. [dry-run] message for --also-set-token --dry-run — added [dry-run] would set GITHUB_TOKEN on N newly-created definition(s) output so operators get a full picture when combining both flags.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/githubnext/ado-aw/issues
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0cmv7ywyjx8y2wj1p2cwmudt0.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0gxo84bdokt5c2kwxug5lhahl.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0jqq3s22oecq3tg84vv5jynzk.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0lb6vzuwwm9bhh3olgpedb30k.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0lupc5ouowq4ivnonv6l4k2zy.1ctu6pw.rcgu.o 9.00mg79akvcldyqqo0j6hdng7h.12yk75j.rcgu.o 9.06ni2ozzxgk11mmkqnxg9ush9.12yk75j.rcgu.o 9.0893v8jzs1ssozy2ykrv4q6jx.12yk75j.rcgu.o 9.0kggfu8te86j1wswssfs2ywsb.12yk75j.rcgu.o 9.0pdkeg981ckvhy6bxx9aov2hm.12yk75j.rcgu.o 9.0zwgis7xvd9vb4jwiwcuqiwjm.12yk75j.rcgu.o 9.0zxbrnx8oc99jblzkicqiex7z.12yk75j.rcgu.o 9.14ilrz290m6dkxxmkwu8in1j3.12yk75j.rcgu.o 9.1gc5perxzo1js5r8o6jb0jiwy.12yk75j.rcgu.o 9.1ncjg9gt7i28q63lzni0kq21a.12yk75j.rcgu.o 9.1nk393ltxqzceir9ord5krk4x.12yk75j.rcgu.o 9.1osj1taav83qg81hiiiomglub.12yk75j.rcgu.o 9.21q8rz6jwze09ned2p4fr6d69.12yk75j.rcgu.o 9.29dxqit223xw1ccv0p5f07f5o.12yk75j.rcgu.o (http block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 ,SC1091 cal/bin/shellcheget-url shellcheck --sh�� --format=json ,SC1091 cal/bin/shellcheck --format=json ,SC1091 ndor/bin/shellchget-url shellcheck --sh�� --format=json ,SC1091 shellcheck --format=json ,SC1091 rgo/bin/shellche/tmp/agentic-pipeline-uprvote-10676/upr-agent.md shellcheck (http block)
  • spsprodeus21.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0cmv7ywyjx8y2wj1p2cwmudt0.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0gxo84bdokt5c2kwxug5lhahl.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0jqq3s22oecq3tg84vv5jynzk.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0lb6vzuwwm9bhh3olgpedb30k.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0lupc5ouowq4ivnonv6l4k2zy.1ctu6pw.rcgu.o 9.00mg79akvcldyqqo0j6hdng7h.12yk75j.rcgu.o 9.06ni2ozzxgk11mmkqnxg9ush9.12yk75j.rcgu.o 9.0893v8jzs1ssozy2ykrv4q6jx.12yk75j.rcgu.o 9.0kggfu8te86j1wswssfs2ywsb.12yk75j.rcgu.o 9.0pdkeg981ckvhy6bxx9aov2hm.12yk75j.rcgu.o 9.0zwgis7xvd9vb4jwiwcuqiwjm.12yk75j.rcgu.o 9.0zxbrnx8oc99jblzkicqiex7z.12yk75j.rcgu.o 9.14ilrz290m6dkxxmkwu8in1j3.12yk75j.rcgu.o 9.1gc5perxzo1js5r8o6jb0jiwy.12yk75j.rcgu.o 9.1ncjg9gt7i28q63lzni0kq21a.12yk75j.rcgu.o 9.1nk393ltxqzceir9ord5krk4x.12yk75j.rcgu.o 9.1osj1taav83qg81hiiiomglub.12yk75j.rcgu.o 9.21q8rz6jwze09ned2p4fr6d69.12yk75j.rcgu.o 9.29dxqit223xw1ccv0p5f07f5o.12yk75j.rcgu.o (dns block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 ,SC1091 cal/bin/shellcheget-url shellcheck --sh�� --format=json ,SC1091 cal/bin/shellcheck --format=json ,SC1091 ndor/bin/shellchget-url shellcheck --sh�� --format=json ,SC1091 shellcheck --format=json ,SC1091 rgo/bin/shellche/tmp/agentic-pipeline-uprvote-10676/upr-agent.md shellcheck (dns block)
  • spsprodweu4.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0cmv7ywyjx8y2wj1p2cwmudt0.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0gxo84bdokt5c2kwxug5lhahl.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0jqq3s22oecq3tg84vv5jynzk.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0lb6vzuwwm9bhh3olgpedb30k.1ctu6pw.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/enable_integration-3cb498cf716/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-0a1def9161f0aec8.0lupc5ouowq4ivnonv6l4k2zy.1ctu6pw.rcgu.o 9.00mg79akvcldyqqo0j6hdng7h.12yk75j.rcgu.o 9.06ni2ozzxgk11mmkqnxg9ush9.12yk75j.rcgu.o 9.0893v8jzs1ssozy2ykrv4q6jx.12yk75j.rcgu.o 9.0kggfu8te86j1wswssfs2ywsb.12yk75j.rcgu.o 9.0pdkeg981ckvhy6bxx9aov2hm.12yk75j.rcgu.o 9.0zwgis7xvd9vb4jwiwcuqiwjm.12yk75j.rcgu.o 9.0zxbrnx8oc99jblzkicqiex7z.12yk75j.rcgu.o 9.14ilrz290m6dkxxmkwu8in1j3.12yk75j.rcgu.o 9.1gc5perxzo1js5r8o6jb0jiwy.12yk75j.rcgu.o 9.1ncjg9gt7i28q63lzni0kq21a.12yk75j.rcgu.o 9.1nk393ltxqzceir9ord5krk4x.12yk75j.rcgu.o 9.1osj1taav83qg81hiiiomglub.12yk75j.rcgu.o 9.21q8rz6jwze09ned2p4fr6d69.12yk75j.rcgu.o 9.29dxqit223xw1ccv0p5f07f5o.12yk75j.rcgu.o (dns block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-5cd66b4699336750 ,SC1091 cal/bin/shellcheget-url shellcheck --sh�� --format=json ,SC1091 cal/bin/shellcheck --format=json ,SC1091 ndor/bin/shellchget-url shellcheck --sh�� --format=json ,SC1091 shellcheck --format=json ,SC1091 rgo/bin/shellche/tmp/agentic-pipeline-uprvote-10676/upr-agent.md shellcheck (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@jamesadevine jamesadevine merged commit 1b4273b into main May 17, 2026
@jamesadevine jamesadevine deleted the feat/cli-enable branch May 17, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants