Skip to content

Fix Windows Gradle batch runner, PBI prompt extraction, and connected-test deferral in code-feature, Fixes AB#3805593 - #485

Merged
Shahzaib (shahzaibj) merged 15 commits into
masterfrom
shjameel-microsoft-feat-coding-workflow
Nov 4, 2026
Merged

Shahzaib (shahzaibj) merged 15 commits into
masterfrom
shjameel-microsoft-feat-coding-workflow

Conversation

@shahzaibj

@shahzaibj Shahzaib (shahzaibj) commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the four issues encountered when running code-feature on Windows after PR #482:

  1. Windows .bat / gradlew execution in runLocalVerificationGate (EINVAL / ENOENT):
    • Added runWindowsBatchFileSafely (invoking cmd.exe /d /s /v:off /c with windowsVerbatimArguments: true and strict argument validation) and normalized ./gradlew / .\gradlew to gradlew.bat on Windows inside defaultExec.
    • Automatically appends --no-daemon and --max-workers=2 and enforces a bounded 25-minute timeout (DEFAULT_GRADLE_VERIFICATION_TIMEOUT_MS) + Android Studio\jbr JDK fallback.
  2. Defer connected*AndroidTest / device tasks to CI:
    • Updated parseAllowedGradleVerificationCommand and runLocalVerificationGate so connected*AndroidTest, connectedCheck, deviceCheck, and managedDevice* tasks (including -Pandroid.testInstrumentationRunnerArguments...) are recorded in deferredNotes for CI execution instead of failing local verification.
  3. Natural-prompt PBI ID extraction priority over PR link references:
    • Added stripPullRequestReferenceText and updated extractWorkItemIdsFromText / normalizeTask so prompts like "implement the PBI 3804404 using ... [Add guarded Android coding and PR dynamic workflow, Fixes AB#3805593](https://github.com/.../pull/482)" bind and auto-fetch 3804404 instead of matching [AB#3805593](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3805593) inside the referenced PR title.
  4. Auto-clone missing target repo + core.longpaths=true on Windows:
    • Updated ensureIsolatedTargetWorktree to set core.longpaths=true and auto-clone missing target sub-repositories in real android-complete workspaces.

Fixes AB#3805593

Test Plan

  • node --test .github/extensions/CodeFeature/workflow.test.mjs .github/extensions/DevDesignDoc/workflow.test.mjs (53/53 passing, including real Windows .bat fixture execution in a path with spaces, unsafe-argument rejection, connected*AndroidTest -P... deferral, and PBI prompt extraction with embedded PR links)
  • git diff --check origin/master...HEAD

…-test deferral in code-feature, Fixes AB#3805593

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@shahzaibj
Shahzaib (shahzaibj) requested a review from a team as a code owner November 3, 2026 18:26
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

✅ Work item link check complete. Description contains link AB#3805593 to an Azure Boards work item.

Shahzaib (shahzaibj) and others added 10 commits November 3, 2026 10:50
… post-builder Gradle runs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… worktree

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…bserver repair

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ad status PATCH

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…l timezone offset

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ment ADO build is running

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…S/502/503 task failures

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…cy requeue

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shahzaib (shahzaibj) and others added 4 commits November 3, 2026 15:23
…eption is parsed as string

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… infra failures

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…and guard unrelated base-branch test failures

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…r commit

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@shahzaibj
Shahzaib (shahzaibj) merged commit b181193 into master Nov 4, 2026
5 checks passed
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