Repository navigation
fix(channels): manage DingTalk interactive card config #8517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wenshao
merged 20 commits into
QwenLM:main
from
BenGuanRan:fix/dingtalk-interactive-card-management
Aug 7, 2026
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
de65e6b
fix(channels): manage DingTalk interactive card config
BenGuanRan 5dbaa65
test(cli): cover nested channel object validation
BenGuanRan bbbd2c8
fix(channels): harden nested management metadata
BenGuanRan 70d5e01
fix(channels): isolate invalid management descriptors
BenGuanRan a773876
fix(channels): isolate invalid management metadata from channel runtime
qwen-code-dev-bot 16de7ba
fix(channels): reject reserved unknown keys in management config upserts
qwen-code-dev-bot 3a4609c
Merge remote-tracking branch 'origin/main' into fix/dingtalk-interact…
qwen-code-dev-bot d06e09f
Merge branch 'main' into fix/dingtalk-interactive-card-management
qwen-code-dev-bot dc16cf2
Merge branch 'main' into fix/dingtalk-interactive-card-management
qwen-code-dev-bot ba7af04
fix(channels): harden channel management validation and editor checks
qwen-code-dev-bot bb78d3e
fix(channels): validate management field shapes and editor bounds (#8…
qwen-code-dev-bot 12f6b17
fix(channels): align management validation layers and pin gate behavi…
qwen-code-dev-bot 4a848be
fix(channels): close reserved-key preservation gaps and pin gate beha…
qwen-code-dev-bot 68c4d3f
Merge branch 'main' into fix/dingtalk-interactive-card-management
wenshao 9ec68ed
test(cli): tolerate IPv6-less hosts in serve ::1 bind tests (#8517)
qwen-code-dev-bot 24c358e
fix(channels): align descriptor type contracts with runtime validatio…
qwen-code-dev-bot 0d2e3ef
chore(channels): merge main into DingTalk interactive card management…
qwen-code-dev-bot 243b58d
Merge branch 'main' into fix/dingtalk-interactive-card-management
qwen-code-dev-bot 55cca44
fix(channels): defuse validateConfig rejection leak and close descrip…
qwen-code-dev-bot 737d559
Merge branch 'fix/dingtalk-interactive-card-management' of https://gi…
qwen-code-dev-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -210,7 +210,39 @@ function assertSharedField(key: string, value: unknown): boolean { | |
| function assertDescriptorValue( | ||
| field: ChannelConfigFieldDescriptor, | ||
| value: unknown, | ||
| path = field.key, | ||
| ): void { | ||
| if (field.kind === 'object') { | ||
| if (!isRecord(value)) { | ||
| throw invalidConfig(`Channel field "${path}" has an invalid value.`); | ||
| } | ||
| const properties = new Map( | ||
| (field.properties ?? []).map((property) => [property.key, property]), | ||
| ); | ||
| for (const [key, nestedValue] of Object.entries(value)) { | ||
| const property = properties.get(key); | ||
| if (!property) { | ||
| throw invalidConfig( | ||
| `Channel field "${path}.${key}" is not manageable.`, | ||
| ); | ||
| } | ||
| assertDescriptorValue(property, nestedValue, `${path}.${key}`); | ||
| } | ||
| for (const property of field.properties ?? []) { | ||
| if (!property.required) continue; | ||
| const nestedValue = value[property.key]; | ||
|
BenGuanRan marked this conversation as resolved.
Resolved
|
||
| if ( | ||
| nestedValue === undefined || | ||
| nestedValue === null || | ||
| nestedValue === '' | ||
| ) { | ||
| throw invalidConfig( | ||
| `Channel field "${path}.${property.key}" is required.`, | ||
| ); | ||
| } | ||
|
Comment on lines
+244
to
+247
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @T17.txt |
||
| } | ||
| return; | ||
| } | ||
| const invalidEnvironment = | ||
| typeof value === 'string' && | ||
| isEnvironmentReference(value) && | ||
|
BenGuanRan marked this conversation as resolved.
Resolved
|
||
|
|
@@ -227,7 +259,9 @@ function assertDescriptorValue( | |
| (field.kind === 'boolean' && typeof value === 'boolean') || | ||
| (field.kind === 'number' && | ||
| typeof value === 'number' && | ||
| Number.isFinite(value)) || | ||
| Number.isFinite(value) && | ||
| (field.exclusiveMinimum === undefined || | ||
| value > field.exclusiveMinimum)) || | ||
| (field.kind === 'enum' && | ||
| typeof value === 'string' && | ||
| field.options?.some((option) => option.value === value) === true) || | ||
|
|
@@ -238,7 +272,7 @@ function assertDescriptorValue( | |
| isRecord(value) && | ||
| Object.values(value).every((v) => typeof v === 'string')); | ||
| if (!valid) { | ||
| throw invalidConfig(`Channel field "${field.key}" has an invalid value.`); | ||
| throw invalidConfig(`Channel field "${path}" has an invalid value.`); | ||
| } | ||
| } | ||
|
|
||
|
|
||
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.