fix(observability): log send rate limit hits#39
Open
Lubrsy706 wants to merge 1 commit into
Open
Conversation
TennyZhuang
pushed a commit
to botiverse/agentic-inbox
that referenced
this pull request
Jul 15, 2026
Dogfood (Duoyu, also Maggie): stripHtmlToText removed tags but left literal HTML entities, so body_text/snippet kept & < &cloudflare#39; etc. — which falsifies the advertised "safe to grep for codes/links": - a URL "...?token=abc&uid=42" extracts as "...&uid=42" -> broken link (params become "amp;uid"); magic-link extraction is the #1 use case and any 2-param verification link carries "&". - "AT&T-9931" misses a grep for "AT&T-9931". Add decodeHtmlEntities (named + numeric dec/hex, ->space) and run it after tag-stripping (so decoded </> can't reintroduce markup). Each &...; token is decoded once, so double-encoded text stays literal. Reply-quote path re-escapes after stripping, so no regression there. Unit-tested the URL/AT&T/nbsp/numeric/ double-encode/unknown/script-leak cases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Postel <postel@mail.build>
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.
Fixes #18.
Summary
Tests
npm run typecheck