Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Hyphenated action names fail Semantic Kernel loading silently; add permission-aware recovery in both chat UIs

Abierto
#1,781 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@paullizer ya está trabajando en esto.

Desde el 19/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

bug enhancement P1

Issue

SimpleChat accepts action names containing hyphens, but passes those names directly to Semantic Kernel as plugin identifiers. Semantic Kernel rejects them. The selected agent can then continue without its assigned actions, producing a misleading response such as “I cannot create calendar events” rather than explaining that an action failed to load.

This was observed while comparing a working personal Microsoft 365 agent with a FED-harness-created agent. The harness correctly assigned a source-specific calendar action by ID. The failure is not a special-case restriction to an agent named m365.

Steps to Reproduce

  1. Create a source-specific Microsoft 365 calendar action with a schema-valid name such as calendar-demo and enable the calendar-create capability.
  2. Assign that action to an otherwise valid local agent.
  3. Select the agent in chat and request a calendar draft. Do not approve or send any event for this reproduction.
  4. Observe action registration fail with KernelFunction failed to initialize: Failed to create KernelFunctionMetadata.
  5. Compare with an action named m365_calendar: kernel registration succeeds.

A network-free reproduction is to call KernelPlugin.from_object with an inert decorated method and the two plugin names; no calendar operation needs to execute.

Expected Behavior

  • Any authorized agent can use its assigned actions regardless of schema-supported action naming, subject to normal capability, authentication, and approval policies.
  • User-facing names and stable scoped action identities remain unchanged. Runtime-only plugin identifiers must meet SDK/provider requirements without colliding.
  • A failed action is identified clearly before the user proceeds with an incomplete agent.
  • Both V2 and classic chat offer equivalent confirmation and remediation flows.

Actual Behavior

  • static/json/schemas/plugin.schema.json allows ^[A-Za-z0-9_-]+$.
  • Semantic Kernel's PLUGIN_NAME_REGEX is ^[0-9A-Za-z_]+$; its agent-name regex separately permits hyphens.
  • The logged loader and legacy fallback both pass the stored action name into kernel registration.
  • In the affected chat, telemetry shows the correct agent selected, its single action manifest resolved, both registration attempts failed, and zero tool invocations. Chat nevertheless produced an ordinary assistant answer.
  • The working comparison registered m365_calendar and successfully invoked create_calendar_invite.
  • The same registration error was also found for FED email, OneDrive, and SharePoint actions.

Impact

Schema-valid actions can be unusable even when correctly assigned and authorized. Harness failures look like capability or Microsoft 365 configuration problems. Users cannot distinguish missing capability from a broken action or determine who can remediate it. Fixing only harness naming would conceal the application boundary mismatch.

Priority: P1 (user-selected). Size: L (shared runtime, permissions, notifications, and two chat interfaces).

Notes

Confirmed cause and evidence

Read-only Application Insights and App Service console investigation confirmed the registration sequence and fallback failure. No live actions, credentials, or configuration were changed.

An offline probe using locally installed Semantic Kernel 1.35.0 produced:

  • m365_calendar: registration passes.
  • A FED-style hyphenated action name: registration fails; the chained Pydantic error identifies plugin_name and ^[0-9A-Za-z_]+$.
  • The same name using underscores: registration passes.

The repository pins semantic-kernel==1.39.4; the same plugin-name restriction was separately verified in that version's published source:

Relevant application code:

  • application/single_app/semantic_kernel_plugins/logged_plugin_loader.py: registration and swallowed failure results.
  • application/single_app/semantic_kernel_plugins/msgraph_plugin.py: get_kernel_plugin forwards the supplied name.
  • application/single_app/semantic_kernel_loader.py: selected-action resolution, legacy fallbacks, captured-agent invariants, and continuation after load failure.
  • application/single_app/functions_orchestration_actions.py: shared action-loader consumer.
  • application/single_app/static/json/schemas/plugin.schema.json: accepted action-name contract.
Agreed recovery behavior
  • Identify the affected agent and action(s), explain which capabilities are unavailable, and ask whether to continue without those failed actions. Do not silently degrade or permanently remove assignments.
  • Offer an action-edit link for personal/group actions only when current server-side permissions allow editing. Otherwise offer remediation guidance and Notify owner/admin.
  • For global actions, notify the responsible application administrators; authorized administrators may receive the existing admin editor link. Route remediation by the action's actual scope, not merely the agent's scope.
  • Notify owner/admin is user-triggered, in-app, and deduplicated. Do not automatically notify on every failure. Reports contain only safe action identifiers, failure category, and diagnostic correlation—not prompts, tool outputs, secrets, or raw exception text.
  • Reuse existing credential/sign-in/approval recovery for supported authentication failures, including rejected credentials. A generic failure must not be mislabeled as a bad password, and credentials cannot be verified for every connector merely by selecting an agent.
  • Preserve current work while remediation is performed. Recheck action revision, membership, and policy before continuation. Never automatically replay a calendar/email write or treat continuing without an action as consent to any operation.
  • Apply equivalent behavior in V2 and classic chat, with accessible confirmation, status, and navigation.
Acceptance Criteria
  • A schema-valid hyphenated action registers through the shared loader and applicable fallback paths; valid existing runtime names remain compatible.
  • Runtime aliases are deterministic and collision-safe, including dash/underscore variants, duplicate names across scopes, long names, and collisions with core plugins.
  • Stored action names/IDs, secret lookup identities, assignments, M365 approval provenance, and orchestration capture boundaries remain intact.
  • Calendar/email/OneDrive/SharePoint and representative non-M365 actions are covered by registration tests with external I/O blocked.
  • Failed actions produce a safe, structured, request-bound recovery state instead of an ordinary model response hiding the failure.
  • V2 and classic users can review failures, cancel/change agent, remediate/recheck, or explicitly continue with only the remaining authorized actions.
  • Personal/group/global remediation links and notification recipients are permission-checked server-side, including permission changes during recovery.
  • Notification retries do not duplicate reports or reset recipient read/dismissal state.
  • Supported credential rejection/sign-in paths retain existing recovery behavior; policy/approval denials and uncertain write outcomes cannot be bypassed or blindly retried.
  • Add functional, route-policy, and Azure Playwright UI coverage; update documentation, chat-control inventory where applicable, and application patch version.
Validation already performed

python -m pytest -q -p no:cacheprovider functional_tests\test_m365_provider_core.py::test_calendar_and_email_default_kernel_names_are_source_specific functional_tests\test_m365_provider_core.py::test_all_typed_plugins_register_without_source_access_or_execution_context

Passed: 2 tests, with existing dependency deprecation warnings. These tests use safe default names and do not cover the reported naming failure. The offline hyphenated-name probe separately reproduced that failure.

Investigation/planning only so far; implementation and deployment are not yet approved.

Lenguaje dominante
Python
Estrellas
157
Forks
117
Merge medio
4 h 3 min
PR fusionados (30 d)
217

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/simplechat

Todos los issues de microsoft/simplechat

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.