Repository navigation
Conversation
…n a broken character The delivery log cut the rendered prompt at 65,536 UTF-16 code units, so an emoji on the limit was stored as half a surrogate pair and shown as U+FFFD. Both log writes now keep the whole character, as pingdotgg#40701 did for setup script output. Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…-emoji Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
A webhook delivery's prompt is stored in the delivery log cut at 65,536 UTF-16 code units. When an emoji straddles that limit, the log keeps only its high surrogate, which SQLite stores as U+FFFD, so Settings › Scheduled tasks › Deliveries shows the prompt ending in a replacement character the request never had.
Change
Both writes of
rendered_promptinScheduledTaskService.ts(the direct delivery and the pending dispatch) now drop the high surrogate when the cut would split a pair, using the existingsplitsSurrogatePairfrom@t3tools/shared/assistantCitations, the same way #40701 fixed setup script output. The prompt the agent receives is unchanged.Scope
A small fix for an obvious bug, so no issue. It re-lands MarcoDotIO's #31750 (approved by Macroscope, closed by its author as "real but cosmetic"), credited with a
Co-authored-bytrailer, and is the same class of fix as #40701.Verification
vp test run apps/server/src/scheduledTasks/ScheduledTaskService.webhook.test.ts: the new case "drops an emoji split by the delivery log's prompt limit" fails onmainwithexpected 'aa\ufffd' to equal 'aaa'and passes with the fix; all 58 cases in the file pass.vp run check:changed upstream/main: format, lint, knip, typecheck (3 packages) and tests (5 files, 99 tests) pass.scripts/scenarios/webhook-log-keeps-whole-emoji.e2e.ts: creates a webhook task over RPC with the replay agent, posts a body whose emoji lands on the limit, and opens the delivery in Settings › Scheduled tasks.vp run scenarios:prove scripts/scenarios/webhook-log-keeps-whole-emoji.e2e.ts --base upstream/mainexits 0:Proven: the scenario fails on base
ad1b1f9ca4and passes on headfb1c5ff3b2.ad1b1f9ca4fb1c5ff3b2ASSERTION_FAILED: expect.not.toContainText failed
locator: getByRole("dialog") >> getByText(/^<webhook-data-/)
expected: not text containing "�"
observed: text "<webhook-data-07bb24b6264a>aaaa…aaaa�" (65,536 characters, shortened here)
Claude Opus 5.5 via T3 Code