The GitHub Actions job "CI" on rocketmq-dashboard.git/fix-title-test-comment 
has failed.
Run started by GitHub user lizhimins (triggered by lizhimins).

Head commit for run:
02578f89e4f83cee1cce6a6d2522d04b2389a863 / lizhimins <[email protected]>
test(ai): cover the surrogate split the title cap comment claimed

The `capTitleShouldCutOnCodePointBoundariesTest` comment from #5213 said the old
512-UTF-16-unit cut split the last emoji, but its fixture cannot show that:
32 x (15 y + 1 emoji) is exactly 512 code points and 544 UTF-16 units, so the 
old
`substring(0, 512)` stopped after 30 groups plus two y's. The assertion is 
right,
the stated mechanism was not.

Correct the comment and add the case that does land mid-surrogate: a three-unit
period puts unit 512 on a high surrogate (512 = 3 x 170 + 2), so capping
`("y" + emoji).repeat(300)` has to yield `("y" + emoji).repeat(256)` - 512 whole
code points - where the old cut returned 171 y's, 170 emoji and a lone surrogate
that utf8mb4 cannot store. Verified mutation-sensitive: reverting `capTitle` to
the unit-based substring turns this case red.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37881830693

With regards,
GitHub Actions via GitBox

Reply via email to