docs(sync): record the b24ui-only useTokenSearch divergence as a porting invariant - #366
Merged
Merged
Conversation
8 tasks
…rting invariant `highlight()` in `src/runtime/utils/search.ts` takes a fifth `useTokenSearch` argument, and carries the token-search logic around it, that no port brought in. `c502157b` added `tokens`/`minTokenLength` and `6743f793` the parameter itself, both against the file's old name `src/runtime/utils/fuse.ts`; both shipped in v2.8.0. Immediately before `c502157b` the function took four parameters and computed no `minTokenLength` at all, which is what establishes the divergence as locally authored. The port `557a5178` then renamed `fuse.ts` to `search.ts` and carried the divergence across, so a pickaxe on the current path returns only `557a5178` — a genuine upstream port — and `--follow` is needed to see the two commits that actually introduced it. That rename is what hid the divergence; `Upstream:` trailers are too rare here to support an inference either way (16 of ~3200 commits carry one, and `559a5cdb`, this file's own most recent port, does not). Replaying upstream's four-parameter signature wholesale would drop behaviour shipped in v2.8.0 while nothing goes red — `useTokenSearch` appears nowhere under `test/`. #363 tracks that gap. Also corrects `.sync/nuxt-ui.json`'s summary for `2a172ef`, which asserted "highlight signature matches 1:1" without qualification. The `.md` log for the same port was already accurate, scoping its claim to behaviour "without token search"; the machine-readable half was not, and a porter consulting it would have got the wrong answer. The invariant states plainly that upstream has not been re-inspected, so the claim "upstream has no such parameter" reads as an inference from b24ui's own history rather than a verified fact. On provenance: the "byte-identical with upstream" premise originated here, in `595923b9` (PR #338), was repeated in #339, and was inherited in good faith by the external contributor whose PR prompted this check. Refs #339, #347, #363 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWWrBHgfqGSbeU3V6UuMF8
IgorShevchik
force-pushed
the
claude/nuxt-spa-b24ui-conflict-xqvflw
branch
from
August 11, 2026 13:45
b54091f to
06d13f7
Compare
8 tasks
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.
Linked issue
Refs #339, #347, #363.
Type of change
Description
Documentation only.
.sync/PORTING.mdgains one §2 invariant plus a dated changelog line;.sync/nuxt-ui.jsongets a one-line correction. Nosrc/change.The divergence.
highlight()takes a fifth parameteruseTokenSearchand carries the token-search logic around it.c502157baddedtokens/minTokenLength,6743f793added the parameter itself and gated the tokenizer behind it — both against the file's old namesrc/runtime/utils/fuse.ts, both shipped in v2.8.0. Immediately beforec502157bthe function took four parameters and computed nominTokenLengthat all; that is what establishes it as locally authored.Why it stayed invisible. The port
557a5178renamedfuse.tstosearch.tsand carried the divergence across. A pickaxe on the current path returns exactly one commit —557a5178, which is a genuine upstream port with anUpstream:trailer — so the divergence is not merely hidden but actively misattributed.--followis needed to see the two commits that introduced it.Why it matters. Replaying upstream's four-parameter signature wholesale drops behaviour shipped in v2.8.0, and nothing goes red:
useTokenSearchappears nowhere undertest/. #363 tracks that gap.Ledger correction.
.sync/nuxt-ui.json's summary for2a172efasserted "highlight signature matches 1:1" without qualification. The.mdlog for the same port was already accurate — it scoped its claim to behaviour "without token search" — but the machine-readable half was not, and a porter consulting it would have got the wrong answer.This follows the convention used by prior rule-adding PRs (#330, #331, #335, #338, #341, #343, #346, #351): a rule in the relevant section plus a dated line in "Changelog of rules". No
processedentry — that map is keyed by 40-hex upstream SHA, and there is no upstream SHA here.Corrections from review of the first revision:
highlight()'s b24ui-onlyuseTokenSearchargument has no coverage #363.Upstream:trailer" as evidence of local authorship — weak, reframed. Only 16 of ~3200 commits carry that trailer, and559a5cdb— this very file's most recent upstream port — is not one of them. The claim now rests on the four-parameter signature precedingc502157b..sync/log/2a172ef….mdwas truncated mid-parenthetical with a closing paren supplied that the source does not have. Now quoted in full.595923b9(PR fix(CommandPalette): stop the raw label and suffix reaching v-html #338), was repeated in bug(search):truncateHTMLFromStartsplits astral characters, emitting lone surrogates #339, and was inherited in good faith by the external contributor whose PR prompted the check. The changelog line records that.Checklist
Note on scope: the branch name is left over from an unrelated task earlier in the session and does not describe this change.