fix(bluebubbles): guard debounce flush against null text#56573
fix(bluebubbles): guard debounce flush against null text#56573hydro13 merged 1 commit intoopenclaw:mainfrom
Conversation
Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Greptile SummaryThis PR fixes a Changes:
Confidence Score: 5/5This PR is safe to merge — the fix is targeted, the defence-in-depth layering is sound, and the new regression test directly covers the crash path. Both the enqueue-time sanitization and the in-loop guard in combineDebounceEntries are correct and do not change behaviour for well-formed messages. The null-text entry is quietly dropped from the combined text (matching the existing empty-string filter), while valid co-batched entries are still delivered. The regression test exercises the exact multi-entry flush path that was crashing. No P0 or P1 findings were identified. No files require special attention.
|
| Filename | Overview |
|---|---|
| extensions/bluebubbles/src/monitor-debounce.ts | Adds null-text sanitization at enqueue boundary and a normalizer guard inside combineDebounceEntries; wraps baseDebouncer in a thin shim — all changes are correct and non-breaking. |
| extensions/bluebubbles/src/monitor.test.ts | Extracts reusable debouncer test-double helper and adds a targeted regression test covering the null-text multi-entry flush crash path. |
Reviews (1): Last reviewed commit: "fix(bluebubbles): guard debounce flush a..." | Re-trigger Greptile
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
) Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
) Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
) Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
) Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
) Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
) Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
) Sanitize message text at the debounce enqueue boundary and add an independent guard in combineDebounceEntries(). Prevents TypeError when a queued entry has null text that reaches .trim() during flush. Add regression test: enqueue null-text entry alongside valid message, verify flush completes without error and valid message is delivered. Fixes openclaw#35777
Add missing changelog entries for PRs openclaw#56500, openclaw#56540, openclaw#56555, openclaw#56567, openclaw#56573, openclaw#56587, openclaw#56595, openclaw#56612, openclaw#56620.
Summary
combineDebounceEntries()for entries already queuedTypeError: Cannot read properties of null (reading 'trim')during debounce flushRoot Cause
combineDebounceEntries()inextensions/bluebubbles/src/monitor-debounce.ts:67callsentry.message.text.trim()without null guard. When a webhook delivers a message with null text (e.g. tapback/reaction-only), the multi-entry flush path crashes.Change Type
Testing
18 test suites, 363 tests pass. New regression test:
Fixes #35777