test(CommandPalette): drive real fuse.js at the mark-insertion boundary - #385
Conversation
The bitrix24#362 cases are recorded copies of fuse output. A recording cannot notice when an upgrade stops producing those offsets, and a fixture that no longer straddles a character passes without exercising anything. Search with real fuse.js at ContentSearch's shipped options and assert the offsets it returns, so that upgrade fails loudly here instead.
|
Thanks for splitting this out, and for closing #379 the way you did. You're right about the gap. Every astral fixture in Sorry #379 got run over by #371 landing in parallel. The aim was closing #362 quickly, not discarding your work, and I should have said so here sooner. We'll review this properly tomorrow. One thing from your #379 worth passing back, since it is genuinely interesting rather than a complaint. Running your test block against current U+1F3FF has The fixture came from the range-edge set in #365, where it reads as an ordinary astral character. It isn't one. Same trap caught us on our side too. The other difference is the single-character skip measured in code points rather than code units. You're right that the current rule is inconsistent, and we're taking that fix — it'll credit #379. Generated by Claude Code |
|
Reviewed properly. I said "tomorrow" and it has been two days — sorry, that was my slip, and it is the second time your work in this file has waited on mine. Updating for you rather than asking: the base had moved 21 commits, since #388, #390 and #405 all landed in What I checkedYour argument is that the eight astral fixtures in That line is yours. It is the only assertion in the repository about what fuse actually returns. Mutation-checked it too: disabling the cluster snap fails your test along with 22 others, so it is not uniquely pinning that. The uniqueness is the offsets, which is what the test says on the tin. On the wider tradePinning a dependency's exact output does mean a benign fuse upgrade can turn this red. That is the cost, and I think you have it the right way round — a loud failure that says "the fixture no longer straddles" is worth more than eight tests quietly measuring nothing. The test's name carries that reasoning, so whoever hits it will know what it is telling them. No changes requested. Merging as soon as CI is green. Where the rest of your work wentSince it touched the same code: the single-character skip you moved to code points in #379 is still an open question rather than a silent drop — it is #392, along with a second behaviour the same review turned up. And the review pass over Thanks for the patience, and for splitting this out instead of letting it go down with #379. Generated by Claude Code |
Linked issue
Refs #362.
Type of change
Tests only —
src/untouched.Description
#371 covers the mark-insertion boundary more completely than my #379 did — the ordering, the nested-region and non-integer guards, and the grapheme snap all go beyond what was there.
One gap is left, and it is the piece #379 was built around: every astral fixture in
mark insertionis a recorded copy of fuse output. A recording cannot notice when a fuse upgrade stops producing those offsets — the fixture stops straddling a character and the test goes on passing without exercising the boundary at all.This searches with the real library at the options
ContentSearchships and asserts the offsets before asserting the output, so that upgrade fails here loudly instead.Verified failing against a build with cluster snapping disabled.
test/utils/andtest/components/CommandPalette.spec.tsgreen;eslintandvue-tsc --noEmitclean.Happy to fold it into an existing case instead if you would rather not add a fuse import to this spec.
Checklist