test: add rule-case validator for no-reply and 🔚 injection paths
This commit is contained in:
54
docs/rule-cases.json
Normal file
54
docs/rule-cases.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"config": {
|
||||
"enabled": true,
|
||||
"discordOnly": true,
|
||||
"bypassUserIds": ["561921120408698910"],
|
||||
"endSymbols": ["。", "!", "?", ".", "!", "?"]
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"name": "non-discord skips gate",
|
||||
"channel": "telegram",
|
||||
"senderId": "u1",
|
||||
"content": "hello",
|
||||
"expect": {
|
||||
"shouldUseNoReply": false,
|
||||
"reason": "non_discord",
|
||||
"injectEndMarker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bypass sender injects end marker",
|
||||
"channel": "discord",
|
||||
"senderId": "561921120408698910",
|
||||
"content": "hello",
|
||||
"expect": {
|
||||
"shouldUseNoReply": false,
|
||||
"reason": "bypass_sender",
|
||||
"injectEndMarker": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ending punctuation injects end marker",
|
||||
"channel": "discord",
|
||||
"senderId": "u2",
|
||||
"content": "你好!",
|
||||
"expect": {
|
||||
"shouldUseNoReply": false,
|
||||
"reason": "end_symbol:!",
|
||||
"injectEndMarker": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "no ending punctuation triggers no-reply override",
|
||||
"channel": "discord",
|
||||
"senderId": "u2",
|
||||
"content": "继续",
|
||||
"expect": {
|
||||
"shouldUseNoReply": true,
|
||||
"reason": "rule_match_no_end_symbol",
|
||||
"injectEndMarker": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user