fix: drop **kwargs bug in two register funcs#8141
Merged
Soulter merged 1 commit intoMay 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider accepting explicit keyword arguments (e.g.,
priority) inregister_platform_adapter_typeandregister_permission_typeinstead of a generic**kwargsso that call sites get better IDE/static checking and it’s clearer which options are actually supported. - Since
register_permission_typenow takes**kwargsthat are passed toget_handler_or_create, it might be helpful to guard against unexpected keys (e.g., by validating againstget_handler_or_create’s signature) to avoid silently ignoring or misusing options.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider accepting explicit keyword arguments (e.g., `priority`) in `register_platform_adapter_type` and `register_permission_type` instead of a generic `**kwargs` so that call sites get better IDE/static checking and it’s clearer which options are actually supported.
- Since `register_permission_type` now takes `**kwargs` that are passed to `get_handler_or_create`, it might be helpful to guard against unexpected keys (e.g., by validating against `get_handler_or_create`’s signature) to avoid silently ignoring or misusing options.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
Author
|
/gemini review |
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the register_platform_adapter_type and register_permission_type functions in star_handler.py to accept and pass **kwargs to the get_handler_or_create call. This change enables more flexible handler metadata creation by allowing additional arguments to be passed through the decorators. I have no feedback to provide as there were no review comments.
Contributor
Author
|
呃啊 |
Soulter
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #8140 ,register_platform_adapter_type 和 register_permission_type 调用 get_handler_or_create 时未透传 **kwargs,导致 priority 等参数被静默丢弃,handler 优先级不生效。
Modifications / 改动点
register_platform_adapter_type:调用get_handler_or_create时加上 **kwargsregister_permission_type:函数签名加入 **kwargs 并透传给get_handler_or_createScreenshots or Test Results / 运行截图或测试结果
使用脚本再次运行:

Checklist / 检查清单
😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
/ 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
/ 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。
🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in
requirements.txtandpyproject.toml./ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到
requirements.txt和pyproject.toml文件相应位置。😮 My changes do not introduce malicious code.
/ 我的更改没有引入恶意代码。
Summary by Sourcery
Ensure registration helpers correctly propagate configuration to created handlers.
Bug Fixes: