Repository navigation
fix(aggregator): activity summary caps never split a surrogate pair (#7725) - #7730
Merged
Merged
Conversation
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 8, 2026 14:30
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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 #7725
What
pm-stack/aggregator/src/activity.tscapped activity summaries with rawslice(0, 500)at four sites — the watchdog writer (:120), both kaneo writers (:196/:207), and the record-time persist cap inIngestionStore(:485) — splitting surrogate pairs and bypassing thecapUnitsguard #7694/#7711 merged today foractions.ts. A title whose emoji straddled the cap produced a persisted summary ending in a lone high surrogate, which any UTF-8 round-trip renders as U+FFFD.This adds a local
capUnitshelper mirroring the actions.ts semantics (an astral character straddling the cap is dropped whole) and routes all four caps through it.Verification
\ud83dpre-fix; control (pair fully inside the cap) intact.test/activity-3321.test.ts(watchdog straddle, watchdog exact-fit control, kaneo straddle, record-time cap via the link suffix): the 3 straddle tests fail on pre-fix code, all pass post-fix.bun test test/activity-3321.test.ts: 20/20 pass. Full aggregator suite run on the branch (see PR checks / issue note for the result).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.