Commit Graph

555 Commits

Author SHA1 Message Date
justinhuangcode 6ea1607f1c test(discord): add regression tests for reasoning tag stripping in stream
Verify that partial stream updates containing <thinking> tags are stripped
before reaching the draft preview, and that pure "Reasoning:\n" partials
are suppressed entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 04:37:30 +00:00
justinhuangcode e8a4d5d9bd fix(discord): strip reasoning tags from partial stream preview
When streamMode is "partial", reasoning/thinking block content can leak
into the Discord draft preview because the partial text is forwarded to
the draft stream without filtering.  Apply `stripReasoningTagsFromText`
before updating the draft and skip pure-reasoning messages (those
starting with "Reasoning:\n") so internal thinking traces never reach
the user-visible preview.

Fixes #24532

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 04:37:30 +00:00
Peter Steinberger 721d8b2278
test(discord): stabilize parent-info + doctor migration assertions (#25028) 2026-02-24 04:10:52 +00:00
Peter Steinberger 6c1ed9493c fix: harden queue retry debounce and add regression tests 2026-02-24 03:52:49 +00:00
Peter Steinberger a216f2dabe fix: extend discord thread parent fallback coverage (#24897) (thanks @z-x-yang) 2026-02-24 03:52:43 +00:00
Zongxin Yang d883ecade6 fix(discord): fallback thread parent lookup when parentId missing 2026-02-24 03:52:43 +00:00
Sid 38da3f40cb
fix(discord): suppress reasoning/thinking block payloads from delivery (#24969)
Block payloads (info.kind === "block") contain reasoning/thinking content
that should only be visible in the internal web UI. When streamMode is
"partial", these blocks were being delivered to Discord as visible
messages, leaking chain-of-thought to end users.

Add an early return for block payloads in the deliver callback,
consistent with the WhatsApp fix and Telegram's existing behavior.

Fixes #24532

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-24 03:33:40 +00:00
Peter Steinberger 161d9841dc refactor(security): unify dangerous name matching handling 2026-02-24 01:33:08 +00:00
Peter Steinberger f97c0922e1 fix(security): harden account-key handling against prototype pollution 2026-02-24 01:09:31 +00:00
Peter Steinberger cfa44ea6b4
fix(security): make allowFrom id-only by default with dangerous name opt-in (#24907)
* fix(channels): default allowFrom to id-only; add dangerous name opt-in

* docs(security): align channel allowFrom docs with id-only default
2026-02-24 01:01:51 +00:00
Peter Steinberger a2dfe9879f fix(security): harden regex compilation for filters and redaction 2026-02-23 23:54:50 +00:00
Peter Steinberger 0183610db3 refactor: de-duplicate channel runtime and payload helpers 2026-02-23 21:25:28 +00:00
Peter Steinberger 2081b3a3c4 refactor(channels): dedupe hook and monitor execution paths 2026-02-22 21:19:09 +00:00
Peter Steinberger 2dcb244985 refactor(test): dedupe gateway and web scaffolding 2026-02-22 20:04:51 +00:00
Peter Steinberger 3c75bc0e41 refactor(test): dedupe agent and discord test fixtures 2026-02-22 20:04:51 +00:00
Peter Steinberger 409a02691f refactor(discord): dedupe directory and media send paths 2026-02-22 17:54:51 +00:00
Peter Steinberger 3c6a15ce98 fix(discord): make opus optional and log fallback 2026-02-22 18:47:09 +01:00
Peter Steinberger 296b19e413 test: dedupe gateway browser discord and channel coverage 2026-02-22 17:11:54 +00:00
Peter Steinberger adfbbcf1f6 chore: merge origin/main into main 2026-02-22 13:42:52 +00:00
Peter Steinberger 83597572df test: speed up thread-bindings shared-state loader test 2026-02-22 13:09:59 +00:00
Peter Steinberger 6dd36a6b77 refactor(channels): reuse runtime group policy helpers 2026-02-22 12:44:23 +01:00
Peter Steinberger 85e5ed3f78 refactor(channels): centralize runtime group policy handling 2026-02-22 12:35:41 +01:00
Peter Steinberger a4981efae3 fix(discord): improve outbound send consistency 2026-02-22 11:29:31 +00:00
Peter Steinberger 777817392d fix: fail closed missing provider group policy across message channels (#23367) (thanks @bmendonca3) 2026-02-22 12:21:04 +01:00
Brian Mendonca 3700151ec0 Channels: fail closed when Slack/Discord config is missing 2026-02-22 12:18:43 +01:00
Peter Steinberger 585a143f21 test: reclassify config and channel monitor behavior suites 2026-02-22 11:04:58 +00:00
Peter Steinberger 1ba1c3f306 test(core): reduce reset overhead in messaging and agent e2e mocks 2026-02-22 08:33:06 +00:00
Peter Steinberger d06ad6bc55 chore: remove verified dead code paths 2026-02-22 09:21:09 +01:00
Peter Steinberger d6d73d0ed9 test(core): trim redundant test resets and use mockClear 2026-02-22 08:12:55 +00:00
Peter Steinberger 0c1a52307c fix: align draft/outbound typings and tests 2026-02-22 08:03:29 +00:00
Peter Steinberger 75c1bfbae8 refactor(channels): dedupe message routing and telegram helpers 2026-02-22 07:44:57 +00:00
Peter Steinberger ad1c07e7c0 refactor: eliminate remaining duplicate blocks across draft streams and tests 2026-02-22 07:44:57 +00:00
Peter Steinberger 0e68789ebf test(discord): dedupe guild permission route mocks 2026-02-22 07:44:57 +00:00
Peter Steinberger df35829810 test(inbound): share dispatch capture mock across channels 2026-02-22 07:44:57 +00:00
Peter Steinberger be0e0ebf89 test(discord): share resolve-users guild probe fixture 2026-02-22 07:44:57 +00:00
Peter Steinberger 8613b6c6ee test(discord): share message handler draft fixtures 2026-02-22 07:44:57 +00:00
Peter Steinberger cca4dba53b test(discord): share model picker fallback fixtures 2026-02-22 07:44:57 +00:00
Peter Steinberger 77a8a253a9 refactor(discord): dedupe voice command runtime checks 2026-02-22 07:44:57 +00:00
Peter Steinberger 3664d51b6f test(discord): share thread binding sweep fixtures 2026-02-22 07:44:57 +00:00
Peter Steinberger a9fa434191 test(discord): share provider lifecycle test harness 2026-02-22 07:44:56 +00:00
Peter Steinberger 735fc23faf test(discord): use lightweight clears in tool-result setup 2026-02-22 07:35:54 +00:00
Peter Steinberger 856b8e28a6 test(discord): use lightweight clear for thread binding rest mock 2026-02-22 07:35:54 +00:00
Peter Steinberger f4afa12054 test(discord): seed exec-approval rest mocks with lightweight clears 2026-02-22 07:35:54 +00:00
Peter Steinberger 7ed3ee0a26 test(discord): use lightweight clears in message-handler setup 2026-02-22 07:35:54 +00:00
Peter Steinberger 706837f6a3 test(discord): trim proxy and reply-delivery setup resets 2026-02-22 07:35:54 +00:00
Peter Steinberger 1e1851a991 test(discord): use lightweight clears for media utility mocks 2026-02-22 07:35:54 +00:00
Peter Steinberger e2603aecf5 test(discord): use lightweight clears in provider setup 2026-02-22 07:35:54 +00:00
Peter Steinberger 10328892fa test(discord): use mock clears in monitor setup defaults 2026-02-22 07:35:54 +00:00
Peter Steinberger 150c048b0a refactor: unify discord listener slow-log flow and test helpers 2026-02-22 00:44:56 +01:00
Peter Steinberger 7707e3406c fix: await DiscordMessageListener handler for queued messages (#22396)
Co-authored-by: Irene <huangxiyan2311@gmail.com>
2026-02-22 00:41:46 +01:00