Repository navigation
fix(knowledge): the keyword leg keeps the letters and numbers of the CJK symbols block inside a term - #38566
Conversation
…CJK symbols block inside a term keywordTerms in both stores split at every member of U+3000-303F except the three marks named in the run; the split now takes only the members that are neither a letter nor a number, with one identical exported class (KEYWORD_SEPARATORS) in both sql.ts files. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
📓 Docs Drift Check2 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a7da683b50ae598a6e52abe1370dfcfe447ca95b && git checkout a7da683b50ae598a6e52abe1370dfcfe447ca95b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin cd191797d25f88502e52437764efb3a3fe7d4703 082af270f1e0702de1aeffd8218bb794cfd01c7d && git checkout -B drift-repro cd191797d25f88502e52437764efb3a3fe7d4703 && git merge --no-ff 082af270f1e0702de1aeffd8218bb794cfd01c7d
node scripts/docs-audit/affected-docs.mjs --json cd191797d25f88502e52437764efb3a3fe7d4703 |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nNJM8FQkBco82NDFb 席位核对 — L1 ACCEPT · head 082af27 · 2026-11-29T10:13ZI read the diff at 082af27 (5 files, +91/−10) against the L1 checklist. At the time of reading, the checks on this head were 12 success, 16 skipped, 24 pending and 0 failed. This verdict is on the diff, so landing waits for green. Part of #38411 is right. The PR takes item 4 only, the U+3000–303F nit from my #38498 record. Items 2 and 3 (the BrightRule graded eval and the per-leg pool) stay on the card, and the body says so. Clause-② no, Metadata-protocol none, and one patch for each store package all match a split-class change with no index, fingerprint or reindex effect. Measured by me:
Nit, not a hold. 〱–〵 and 〼 are letters but Cross-package pin: keeping two literal pins (the area's choice A) is fine for a class that changes this rarely. Each pin's comment names the other store's. ACCEPT once the pending checks finish green. Tier S, so the area lands it. |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb Landing: head 082af27 · L1-a ACCEPT 7254301241 · |
Requested by Leehom · project thread
Part of #38411. This PR takes item 4 of the card's remaining list (the U+3000–303F nit from the review of the previous slice). Items 2 and 3 (the BrightRule model-graded eval and the larger per-leg pool) stay open on the card.
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
keywordTermsinpackages/plugins/knowledge-turso/src/sql.tsandpackages/plugins/knowledge-pgvector/src/sql.tssplit a query at every member of the CJK symbols block except the three marks 々 〆 〇 (classU+3000–3004, U+3008–303F). That block also holds 19 more letters and numbers: the Hangzhou numerals U+3021–3029 and U+3038–303A, the kana repeat marks U+3031–3035, U+303B (the vertical iteration mark) and U+303C. Each of them cut the term it sat in, and a run of one character is dropped, so 「人〻」 gave no term.U+3000–3004, U+3008–3020, U+302A–3030, U+3036–3037, U+303D–303F. Everything else in the class is unchanged.splitcall into an exported constantKEYWORD_SEPARATORS, byte-identical in both files, so the tests can read it.sql.tsis not re-exported by either package's entry (index.tsnames its exports), so the published surface does not change.UNSEGMENTED_RUNdoc comment said the split takes the rest of the block as punctuation. That is no longer true, so the comment now says only why the three marks are named (〆 belongs to no script)..changeset/38411-cjk-symbol-block-letters.md: patch on both store packages.Tests
The same two new cases in each store, beside the existing CJK cases (pgvector
keyword-terms.test.ts; tursoacceptance.test.ts, which runs on:memory:and on afile:URL):KEYWORD_SEPARATORSsplitsa, then the code point, thenb. The code points that split must equal those that fail the Unicode letter-or-number property test in the runtime. The test computes this from the runtime's Unicode tables, with no hand list. Each letter or number, three in a row, must yield a term. Behaviour pins: 「人〻」 gives人〻, 「第〢〣号」 gives第〢〣, 〢〣号, 第〢, 〢〣, 〣号, and 「出差、住宿。「审批」」 gives出差, 住宿, 审批.KEYWORD_SEPARATORSagainst the same regex literal, so the two classes are pinned to one text.Local runs at 082af27
pnpm --filter @objectstack/knowledge-pgvector test(no database): Test Files 5 passed, 8 skipped (live files); Tests 24 passed, 93 skipped.pnpm --filter @objectstack/knowledge-pgvector teston a local PostgreSQL 16.15 with pgvector,OS_TEST_POSTGRES_URLset andOS_EXPECT_LIVE_DIALECT_MATRIX=1: Test Files 13 passed (13); Tests 117 passed (117). The cluster was stopped and removed afterwards.pnpm --filter @objectstack/knowledge-turso test(libSQL:memory:and a localfile:database): Test Files 4 passed (4); Tests 290 passed (290).pnpm --filter @objectstack/knowledge-pgvector typecheckand the same for turso: exit 0, withcheck:test-typecheckOK for both.VERDICT command-exit 0.Ablation: the old class restored, the new pins red
scripts/ablation-replace.mjsreplaced the rangeU+3008–3020, U+302A–3030, U+3036–3037, U+303D–303Fwith the oldU+3008–303F, one store at a time (anchor 1 → 0; blob moved), then restored (blob equalsHEAD,git diff HEADempty):keyword-terms.test.ts: 2 failed, 6 passed. Failing: the block probe (61 separators against the 42 the Unicode tables name) and the parity pin.acceptance.test.ts: 4 failed, 134 passed. Failing: the same two cases, on:memory:and onfile:.Acceptance notes
UNSEGMENTED_RUNdoes not name them, so they are not pieced into the run beside them. 「いろ〳〵」 gives〳〵(a word) andいろ(a piece); before it gaveいろ. Adding them to the run is outside this PR's file surface (the split class only). This is rare in a typed question, so it is not filed.sql.tswould need a declaration inscripts/cross-package-test-inputs.mjsand inturbo.json, and both are outside the claimed file surface. Each store's test therefore pins the same literal.Verification
packages/plugins/knowledge-turso/src/sql.ts(theKEYWORD_SEPARATORShunk: the class ranges),packages/plugins/knowledge-pgvector/src/sql.ts(the same hunk, byte-identical apart from the store name in the comment),packages/plugins/knowledge-pgvector/src/__tests__/keyword-terms.test.ts(the block probe).pnpm --filter @objectstack/knowledge-pgvector exec vitest run --maxWorkers=2 src/__tests__/keyword-terms.test.ts. Expected result: 8 passed, including "splits at the punctuation of the CJK symbols block and at none of its letters or numbers".node scripts/pm/dispatch-gates.mjs --commands, at 082af27): 67 derived, 66 run with exit 0.--ranreconciles: 67 accounted, 0 unrun. NOT MEASURED:check:dual-build-cjs-loads, reason: exit 3, PREREQUISITE NOT MET. It needs every package'sdist/, and this container built only the two stores' closure. CI runs it.🤖 Generated with Claude Code