Skip to content

Add guarded Android coding and PR dynamic workflow, Fixes AB#3805593 - #482

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

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

Conversation

@shahzaibj

@shahzaibj Shahzaib (shahzaibj) commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds a standalone, repository-scoped Copilot Dynamic Workflow (code-feature) under .github/extensions/CodeFeature/ for Android coding and pull request creation, modeled after .github/extensions/DevDesignDoc (design-feature).

Fixes AB#3805593

Related to AB#3800277 and parent feature AB#3797944.

Approach

  • Register .github/extensions/CodeFeature/extension.mjs with workflow name code-feature and role-scoped custom agents (code-evidence, code-builder, and read-only code-reviewer).
  • Validate revision-bound task approval, requirements, target repository metadata, and AB#<id> work-item linkage; gather repository evidence with revisions and facts before coding.
  • Run code-builder to produce the implementation, unit tests, requirement-to-file/test traceability, and PR metadata.
  • Loop with code-reviewer across up to 3 fix iterations max (fix-1..3): run deterministic structural/diff/workspace checks and an independent 9-point rubric review on each round, returning structured findings to code-builder until zero findings remain (or halting with NO-GO and restoring modified workspace files if 3 fix iterations are exhausted).
  • Prepare or create verified target pull requests (Fixes AB#<id>, requirements traceability table, unit test plan, compatibility and rollout notes) only after all deterministic checks and independent review criteria pass.

Checks

  • node --check .github/extensions/CodeFeature/extension.mjs and node --check .github/extensions/CodeFeature/workflow.mjs passed.
  • All 10 focused Node unit tests in .github/extensions/CodeFeature/workflow.test.mjs passed (plus all 15 DevDesignDoc tests).
  • Verified live extension discovery (project:CodeFeature status running) and zero-agent validation in the Copilot SDK runtime.

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

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

Shahzaib (shahzaibj) and others added 8 commits October 29, 2026 13:52
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…iew skills

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

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

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

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

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shahzaib (shahzaibj) and others added 18 commits October 30, 2026 11:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tance criteria

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

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

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

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

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

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

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

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tus blocks, and observer anti-loop

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…d GHE PR rules from E2E log

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…rge/changelog rules from past sessions

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

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

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

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shahzaib (shahzaibj) and others added 11 commits October 31, 2026 20:01
…ile androidTest only)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…xtract PR ID safely

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…nd ADO check build logs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…d fix rolloutTag regex

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…y in top-level sessions

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

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shahzaib (shahzaibj) and others added 8 commits November 1, 2026 12:25
…erver.mjs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ardown statuses are ignored

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… outer agent passes createPullRequests:false

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…mmit on clean checkout

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

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@shahzaibj Shahzaib (shahzaibj) changed the title Add guarded Android coding and PR dynamic workflow, Fixes AB#3800277 Add guarded Android coding and PR dynamic workflow, Fixes AB#3805593 Nov 2, 2026
…sts/slugs, checkout remotes, and matched thread resolution

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@shahzaibj
Shahzaib (shahzaibj) merged commit 8766794 into master Nov 2, 2026
5 checks passed
Shahzaib (shahzaibj) added a commit that referenced this pull request Nov 4, 2026
…-test deferral in code-feature, Fixes AB#3805593 (#485)

## 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](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/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`

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

3 participants