Removing option to specify a majority of arguments into AgentAuthConfiguration.__init__ positionally - #578
Conversation
…iguration.__init__ positionally
There was a problem hiding this comment.
🟡 Changes recommended
The public constructor change may break positional callers, and its new behavior lacks a focused regression test.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR makes AgentAuthConfiguration constructor parameters after client_secret keyword-only, improving clarity but potentially breaking positional callers.
Changes:
- Adds
*to the constructor signature. - Requires affected and subsequent options to be passed by keyword.
File summaries
| File | Summary |
|---|---|
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/authorization/agent_auth_configuration.py |
Updates constructor parameter handling; requires compatibility planning and a focused keyword-only behavior test. |
Review details
Suppressed comments (1)
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/authorization/agent_auth_configuration.py:126
- The constructor tests cover successful keyword calls, but none verifies the new keyword-only contract. Add a focused test in
test_auth_configuration.pythat passes the affected options positionally and assertsTypeError, so future signature changes cannot silently restore or alter this API behavior.
*,
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Address positional compatibility or versioning and add regression coverage.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/authorization/agent_auth_configuration.py:129
AgentAuthConfigurationis re-exported from bothhosting.coreandhosting.core.authorization, so this*is a breaking change for external callers that currently passcert_pfx_fileor any later option positionally: those calls now raiseTypeError. Please either preserve the existing positional compatibility or handle this as an explicit breaking release with the corresponding migration/versioning; the PR currently presents it as a minor constructor improvement.
*,
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
This pull request introduces a minor change to the
AgentAuthConfigurationclass constructor to improve parameter handling. The change enforces the use of keyword-only arguments for parameters following the added*, which makes the API clearer and helps prevent accidental misuse.*in the__init__method signature ofagent_auth_configuration.pyto require thatcert_pfx_file,connection_name, andfederated_client_idare specified as keyword arguments.