Recognize Azure DevOps remotes when resuming Copilot sessions after worktree moves

Closed
#348 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
git, powershell

Research direction

Start by tracing the existing repository-and-branch resume behavior from #326 through Get-CopilotSession, Get-CopilotLaunchPlan, -ResumeLatest, -ResumeSession completion, and -ChangeDir. Add deterministic synthetic-metadata and temporary-worktree tests for the listed Azure DevOps remote forms, matching and fallback cases, then verify help, README, and changelog coverage without launching the real CLI or modifying real sessions.

Written by the indexing model from the issue text.

Description

enhancement module:copilot

Problem

The repository-and-branch resume behavior from #326 recognizes GitHub origin URLs, but an Azure DevOps worktree still falls back to its recorded cwd. After moving that worktree, automatic resume, the scoped session listing, and -ResumeSession completion cannot find its previous session, even when workspace.yaml records the same repository and branch.

Requested behavior

Recognize unambiguous Azure DevOps Git origins and derive the repository identity in the same organization/project/repository form as the session metadata. Apply the existing repository-plus-branch scope to moved ADO worktrees without changing the host-native picker or requiring session-file edits.

Acceptance criteria

  • Accept supported dev.azure.com HTTPS and ssh.dev.azure.com SSH remote forms, plus legacy {organization}.visualstudio.com HTTPS forms. Normalize optional .git, URL-encoded project/repository segments, and applicable DefaultCollection prefixes; do not infer identity from the local directory name.
  • Preserve the existing requirement for a single unambiguous origin, both known identity fields for cross-directory matching, exact branch matching, and same-directory fallback only for incomplete legacy metadata without conflicts. Unknown, malformed, or ambiguous remotes must not widen the scope.
  • Cover default Get-CopilotSession, Get-CopilotLaunchPlan automatic resume/selector and -ResumeLatest, -ResumeSession completion, and -ChangeDir for moved ADO worktrees. Keep explicit IDs, -All, and explicit -Cwd semantics unchanged.
  • Add deterministic tests using synthetic session metadata and temporary Git worktrees: HTTPS/SSH identity equivalence, encoded project names, optional .git and DefaultCollection, moved paths, wrong repo or branch, ambiguous origins, and legacy same-path fallback. Do not launch the real Copilot CLI or modify real sessions.
  • Update command help, README, and changelog to describe which remote formats are recognized.
Dominant language
PowerShell
Stars
0
Forks
0
Avg merge
2h 24m
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shmuelie/powershell-modules

All issues in shmuelie/powershell-modules

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.