Skip to content

chore: merge dev into release/6.9 (VSC 6.9.2)#15792

Merged
wh-alice merged 29 commits intorelease/6.9from
dev
Apr 26, 2026
Merged

chore: merge dev into release/6.9 (VSC 6.9.2)#15792
wh-alice merged 29 commits intorelease/6.9from
dev

Conversation

@qinzhouxu
Copy link
Copy Markdown
Contributor

This PR is created by Release Automation to sync latest changes from dev into the release branch.

  • Product: VSC
  • Release Type: Prerelease
  • Version: 6.9.2
  • Base (target): release/6.9
  • Head (source): dev
  • Commits ahead: 29

Release Automation Run: https://github.com/OfficeDev/microsoft-365-agents-toolkit/actions/runs/24967234452

After merging, approve the Release Automation run to trigger CD.

ayachensiyuan and others added 29 commits April 22, 2026 10:15
Co-authored-by: Ivan Chen (Centific Technologies Inc) <v-ivanchen@microsoft.com>
Co-authored-by: Ivan Chen (Centific Technologies Inc) <v-ivanchen@microsoft.com>
test: create sampels with groups for some cases
Co-authored-by: Ivan Chen (Centific Technologies Inc) <v-ivanchen@microsoft.com>
* build: exclude deprecated SDK packages from pnpm workspace

The TeamsFx SDKs (sdk, sdk-react, dotnet-sdk, function-extension) are in
deprecation mode with community-only support until September 2026 per
Microsoft Learn. The adaptivecards-tools-sdk has been superseded by
adaptivecards-templating, and mcp-server is also deprecated.

Ref: https://learn.microsoft.com/microsoftteams/platform/toolkit/teamsfx-sdk

Changes:

- pnpm-workspace.yaml: comment out packages/sdk, packages/sdk-react,
  packages/adaptivecards-tools-sdk, packages/mcp-server to reduce setup
  time. No active workspace package imports them via workspace: protocol.
- .github/workflows/sdk-e2e-test.yml, dotnetsdk-ci.yml,
  FunctionExtensionCI.yml: disable schedule/push/pull_request triggers;
  keep workflow_dispatch for on-demand runs.
- packages/metrics-ts is intentionally retained: it is still consumed by
  packages/cli via workspace: protocol and required by the
  eslint-plugin-teamsfx metrics rule.
- Release infrastructure (sync-version.js, lernaDeps.json,
  get-sdk-dependencies.js, lint-pr.yml changelog scan, renovate.json)
  is left untouched so any community-driven patch release of the
  deprecated npm packages remains possible until end of support.

* chore: revert workflow changes per PR feedback

Agent-Logs-Url: https://github.com/OfficeDev/microsoft-365-agents-toolkit/sessions/dcb98792-f69e-4c29-915a-9748e0f0944b

Co-authored-by: Alive-Fish <15262146+Alive-Fish@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* test: update test cases Sample_Data_Analyst_Agent_Remote_Debug

---------

Co-authored-by: Neil Ye (Centific Technologies Inc) <v-cheye@microsoft.com>
#15756)

* Initial plan

* fix: teamsApp/create writeToEnvironmentFile supports teamsAppTenantId

Agent-Logs-Url: https://github.com/OfficeDev/microsoft-365-agents-toolkit/sessions/b99b16d7-f668-4280-8b54-65309b3df8fb

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…ng output directory (#15777)

* Initial plan

* fix: surface TypeSpec compiler diagnostics instead of ENOENT on missing output dir

- Fix vscode-ui runCommand to propagate actual exit code via PIPESTATUS (Unix)
  and $LASTEXITCODE (Windows), replacing the pipe-to-tee pattern that masked
  non-zero exit codes from the hosted VS Code task.
- Include captured command output in ScriptExecutionError message/displayMessage
  so ATK log shows compiler diagnostics when tsp compile fails.
- Add safety-net in TypeSpecCompileDriver: when runCommand returns ok() but the
  expected OpenAPI specs output directory is missing, log the captured output and
  throw TypeSpecCompileError instead of letting readdirSync produce a misleading
  ENOENT error.
- Create TypeSpecCompileError class with localization key.
- Add/update tests for the new behavior."

Agent-Logs-Url: https://github.com/OfficeDev/microsoft-365-agents-toolkit/sessions/70333338-46fb-4c07-9f72-dc4e0d1a3068

Co-authored-by: HuihuiWu-Microsoft <73154171+HuihuiWu-Microsoft@users.noreply.github.com>

* fix: remove invalid displayMessage access on FxError type in ui.test.ts

FxError interface does not include displayMessage; remove that assertion
to fix the TypeScript compilation error in the unit test.

Agent-Logs-Url: https://github.com/OfficeDev/microsoft-365-agents-toolkit/sessions/40c31827-b7ba-4789-822c-c298b13306e0

Co-authored-by: HuihuiWu-Microsoft <73154171+HuihuiWu-Microsoft@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: HuihuiWu-Microsoft <73154171+HuihuiWu-Microsoft@users.noreply.github.com>
…xtendToM365 (cherry-pick to dev) (#15785)

* fix: prevent telemetry interceptor from masking transport errors in extendToM365

- Wrap WrappedAxiosClient.onRejected in try/catch so any defect in
  telemetry can never replace the real transport-level error returned
  to the caller.
- Guard error.request?.method/host/path - transport errors (TLS
  handshake, ECONNRESET on a kept-alive socket, socket hang up) can
  have these undefined.
- Guard method.toUpperCase() in convertUrlToApiName and
  convertMethodUrlToApiDefForMOS.
- Tolerate non-object error.response.data (e.g. HTML 502 body) in the
  MOS branch.
- Add 5 regression tests covering undefined method, missing request
  object, and string response.data.

Bug: AB#37640864
Related: #15676 (keepAlive + retry exposed this latent bug)

* test: cover additional onRejected branches for patch coverage

Adds 5 more regression tests exercising:
- AppStudio TDP error without headers
- MOS error with nested response.data.error
- MOS error with empty inner error fields
- telemetry-reporter throwing (exercises outer try/catch)
- minimal error shape with no config / no message

Brings src/common/wrappedAxiosClient.ts branch coverage from ~92.6%
to 95.9% and line coverage to 100% for the changed code.
* fix: fallback to preferred user name or email to avoid error

* refactor: extract util function

* test: add UT
* Initial plan

* Fix writeToEnvironmentFile flush timing: write env to disk after each driver execution

Agent-Logs-Url: https://github.com/OfficeDev/microsoft-365-agents-toolkit/sessions/f03d406c-9981-4b1a-a0b3-f35407f423ad

Co-authored-by: qfai <9050812+qfai@users.noreply.github.com>

* Address code review: use consistent driver instances and safe error message access

Agent-Logs-Url: https://github.com/OfficeDev/microsoft-365-agents-toolkit/sessions/f03d406c-9981-4b1a-a0b3-f35407f423ad

Co-authored-by: qfai <9050812+qfai@users.noreply.github.com>

* test(lifecycle): cover env flush guard branches and writeEnv error path

Adds edge-case tests for the per-step env flush introduced by the writeToEnvironmentFile flush-timing fix:

- empty driver output: writeEnv is not called

- empty ctx.projectPath: writeEnv is not called

- TEAMSFX_ENV unset: writeEnv is not called

- writeEnv returns FxError: warning logged with error.message, lifecycle continues

- writeEnv returns non-Error-shaped value: warning falls back to String(error)

- driver returns error: no flush for that driver, prior driver's flush still happened

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: qfai <9050812+qfai@users.noreply.github.com>
Co-authored-by: qfai <quke@microsoft.com>
* Initial plan

* feat: update app manifest version from 1.26 to 1.27 in all templates

Agent-Logs-Url: https://github.com/OfficeDev/microsoft-365-agents-toolkit/sessions/34f3c782-8ed4-41b5-b77a-46acf879c6f7

Co-authored-by: tecton <886116+tecton@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tecton <886116+tecton@users.noreply.github.com>
… through Kiota plugin generation (#15731) (#15772)

* fix: propagate x-ai-adaptive-card and x-openai-isConsequential into Kiota plugin manifest (#15731)

Bumps `@microsoft/kiota` to 1.31.1 (which emits plugin manifest
schema v2.4 via microsoft/kiota#7166) and adds a workaround that
patches the generated `*-apiplugin.json` so the following OpenAPI
extensions are honored:

- `x-ai-adaptive-card` -> `function.capabilities.response_semantics`
  (with `data_path` and the inlined Adaptive Card as `static_template`)
- `x-ai-capabilities.confirmation` -> `function.capabilities.confirmation`
- `x-openai-isConsequential` -> `confirmation.isNonConsequential`
  (negated, since "non-consequential" is the inverse)

As of Kiota 1.31.1 the v2.4 schema bump only changed the manifest
header; the generator still drops these extensions. The workaround
in `patchOpenApiExtensionsIntoPluginManifest` reads the source spec
emitted by `tsp compile`, walks every operation, and merges the
extension data into the plugin manifest produced by Kiota. It only
fills in capability blocks Kiota left empty - existing values are
preserved.

The new helper is invoked from `TypeSpecCompileDriver.execute`
immediately after each `kiotageneratePlugin` call (both the
single-spec and multi-spec branches).

Tests:
- 8 new unit tests in `tests/common/daSpecParser.test.ts` covering
  the happy paths, both `isConsequential` polarities, no-overwrite
  behavior, no-op behavior, missing inputs, invalid YAML, and
  unreadable Adaptive Card files.
- Full `npm run test:unit` line coverage stays above the 72.7%
  nyc threshold.

Fixes #15731

* fix: inline Adaptive Card `static_template` placeholder emitted by Kiota (#15731)

Follow-up to the original #15731 fix. End-to-end testing against a real
TypeSpec project showed that Kiota 1.31.1 actually does emit a
`response_semantics` block, but with a placeholder of the form

    "static_template": { "file": "adaptiveCards/<name>.json" }

instead of inlining the Adaptive Card JSON itself. Microsoft 365 Copilot
expects `static_template` to be the card object, so the previous
"only fill if missing" guard left a non-functional manifest.

Changes:

- `patchOpenApiExtensionsIntoPluginManifest` now detects this placeholder
  shape (object with only a `file` property and none of `type`,
  `$schema`, `body`) and replaces it with the inlined card JSON.
- Real cards already inlined by hand are left untouched.
- The card-resolution helper now searches several candidate base
  directories (plugin manifest dir, its parent, its grandparent, spec
  dir, and the spec dir's parent), since the typical layout puts the
  card file in `<root>/adaptiveCards/` while the plugin manifest lives
  in `<root>/.generated/`.
- 3 new unit tests cover: inlining the Kiota placeholder, preserving a
  real existing card, and resolving cards from the parent of the plugin
  manifest dir. All 11 tests under "patchOpenApiExtensionsIntoPluginManifest
  (issue #15731)" pass.

Refs #15731

* test(fx-core): add coverage for patcher resolveCardJson catch and data_path backfill (#15731)

* test(fx-core): cover parsed-spec-no-paths guard in patcher (#15731)
- @microsoft/m365agentstoolkit-cli@1.1.8

Co-authored-by: wh-alice <alicewan@microsoft.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

❌ Patch coverage is 96.83544% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.32%. Comparing base (1597b02) to head (8f18a97).
⚠️ Report is 31 commits behind head on release/6.9.

Files with missing lines Patch % Lines
packages/fx-core/src/common/daSpecParser.ts 95.06% 0 Missing and 4 partials ⚠️
packages/fx-core/src/common/wrappedAxiosClient.ts 97.29% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           release/6.9   #15792      +/-   ##
===============================================
+ Coverage        93.02%   93.32%   +0.29%     
===============================================
  Files              623      587      -36     
  Lines            38696    37120    -1576     
  Branches          7100     6820     -280     
===============================================
- Hits             35997    34641    -1356     
+ Misses            1957     1835     -122     
+ Partials           742      644      -98     
Files with missing lines Coverage Δ
packages/cli/src/commands/models/accountShow.ts 97.70% <100.00%> (+0.02%) ⬆️
packages/cli/src/commonlib/accountInfoUtils.ts 100.00% <100.00%> (ø)
...s/fx-core/src/component/configManager/lifecycle.ts 95.56% <100.00%> (+0.17%) ⬆️
...es/fx-core/src/component/driver/teamsApp/create.ts 94.44% <100.00%> (ø)
...s/fx-core/src/component/driver/typeSpec/compile.ts 97.47% <100.00%> (+0.18%) ⬆️
...nent/driver/typeSpec/error/typeSpecCompileError.ts 100.00% <100.00%> (ø)
...extension/src/handlers/accounts/accountHandlers.ts 98.64% <100.00%> (+0.01%) ⬆️
...ion/src/handlers/accounts/signinAccountHandlers.ts 100.00% <100.00%> (ø)
...on/src/treeview/account/accountTreeViewProvider.ts 91.93% <100.00%> (ø)
packages/fx-core/src/common/wrappedAxiosClient.ts 98.01% <97.29%> (+2.61%) ⬆️
... and 1 more

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.